FairRoot/PandaRoot
PndFTSTopoPerformance.cxx
Go to the documentation of this file.
1 // **************************************************************************
2 // *
3 // Developed by: Igor Kulakov <I.Kulakov@gsi.de> *
4 // Maksym Zyzak <M.Zyzak@gsi.de> *
5 // *
6 // Permission to use, copy, modify and distribute this software and its *
7 // documentation strictly for non-commercial purposes is hereby granted *
8 // without fee, provided that the above copyright notice appears in all *
9 // copies and that both the copyright notice and this permission notice *
10 // appear in the supporting documentation. The authors make no claims *
11 // about the suitability of this software for any purpose. It is *
12 // provided "as is" without express or implied warranty. *
13 // *
14 //***************************************************************************
15 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
16 
17 #include "PndFTSTopoPerformance.h"
18 
19 #include "PndFTSCounters.h"
20 
22 #include "PndFTSCAPerformance.h"
24 
25 #ifdef DRAW
26 #include "PndFTSCADisplay.h"
27 #define MAIN_DRAW
28 #endif //DRAW
29 
30 #include "PndFTSCAGBHit.h"
31 #include "PndFTSCAMCTrack.h"
32 #ifndef HLTCA_STANDALONE
33 #include "PndFTSCAMCPoint.h"
34 #endif
35 
36 #include "PndFTSCAGBTrack.h"
37 #include "PndFTSCAGBTracker.h"
38 #include "PndFTSCAGBTracker.h"
40 
41 #include "PndFTSCADisplay.h"
42 
43 #include "KFParticleSIMD.h"
44 #include "TParticlePDG.h"
45 #include "TDatabasePDG.h"
46 
47 #include "TMath.h"
48 #include "TROOT.h"
49 #include "Riostream.h"
50 #include "TFile.h"
51 #include "TH1.h"
52 #include "TH2.h"
53 #include "TProfile.h"
54 #include "TStyle.h"
55 
56 PndFTSTopoPerformance::PndFTSTopoPerformance():fTopoReconstructor(0),fPrimVertices(),fFindParticlesMode(3)
57 {
58 }
59 
60 void PndFTSTopoPerformance::SetNewEvent(
61  const PndFTSCAGBTracker * const tracker,
65 {
66  assert( PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance") != 0 );
67 
68  PndFTSParticlePerformanceBase::SetNewEvent(tracker, hitLabels, mcTracks, localMCPoints);
69 
70  nRecoTracks = fTracker->NTracks();
71 } // void PndFTSTopoPerformance::SetNewEvent
72 
73 void PndFTSTopoPerformance::SetNewEvent2( const PndFTSTopoReconstructor * const TopoReconstructor)
74 {
75  assert( fTracker != 0 ); // should be called after SetNewEvent
76 
77  fTopoReconstructor = TopoReconstructor;
78 } // void PndFTSTopoPerformance::SetNewEvent2
79 
80 void PndFTSTopoPerformance::CheckMCTracks()
81 {
82  mcData = PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->GetMCData();
83 
84  // find prim vertex
85  PndFTSCAMCTrack *iPrimMC = (*fMCTracks).Data();
86  for( ;(iPrimMC->MotherId() != -1) && (iPrimMC < (*fMCTracks).Data() + nMCTracks); iPrimMC++);
87  if (iPrimMC < (*fMCTracks).Data() + nMCTracks) {
88  PndFTSCAMCVertex primVertex;
89  primVertex.SetX( iPrimMC->X() );
90  primVertex.SetY( iPrimMC->Y() );
91  primVertex.SetZ( iPrimMC->Z() );
92  fPrimVertices.push_back(primVertex);
93  }
94 } // void PndFTSTopoPerformance::CheckMCTracks()
95 
96 void PndFTSTopoPerformance::GetMCParticles()
97 {
98  // convert MC tracks into KF MC Particles
99 
100  vMCParticles.clear();
101 
102  // all MC tracks are copied into KF MC Particles
103  for(int iMC=0; iMC < nMCTracks; iMC++)
104  {
105  PndFTSCAMCTrack &mtra = (*fMCTracks)[iMC];
106  KFMCParticle part;
107  part.SetMCTrackID( iMC );
108  part.SetMotherId ( mtra.MotherId() );
109  part.SetPDG ( mtra.PDG() );
110  vMCParticles.push_back( part );
111  }
112  // find relations between mother and daughter MC particles
113  const unsigned int nMCParticles = vMCParticles.size();
114  for ( unsigned int iP = 0; iP < nMCParticles; iP++ ) {
115  KFMCParticle &part = vMCParticles[iP];
116  for(unsigned int iP2 = 0; iP2 < nMCParticles; iP2++) {
117  KFMCParticle &part2 = vMCParticles[iP2];
118 
119  if(part.GetMotherId() == part2.GetMCTrackID()) {
120  part2.AddDaughter(iP);
121  }
122  }
123  }
124 
125  for(unsigned int iMC=0; iMC < vMCParticles.size(); iMC++)
126  {
127  KFMCParticle &part = vMCParticles[iMC];
128  part.SetMCTrackID( iMC );
129 // if(part.NDaughters() > 0 && part.GetPDG() == 310)
130 // {
131 // std::cout << iMC << " " << part.GetPDG() << " "<<std::endl;
132 // for(int iD=0; iD<part.NDaughters(); iD++)
133 // {
134 // int dId = part.GetDaughterIds()[iD];
135 // PndFTSCAMCTrack &mtra = (*fMCTracks)[vMCParticles[dId].GetMCTrackID()];
136 // std::cout << " d" <<iD<<" " << dId << " " << vMCParticles[dId].GetPDG() <<" " << mtra.X() << " " << mtra.Y() << " " << mtra.Z() << " " << mtra.Px() << " " << mtra.Py() << " " << mtra.Pz() <<std::endl;;
137 // }
138 // }
139  }
140 }
141 
142 void PndFTSTopoPerformance::FindReconstructableMCParticles()
143 {
144  const unsigned int nMCParticles = vMCParticles.size();
145 
146  for ( unsigned int iP = 0; iP < nMCParticles; iP++ ) {
147  KFMCParticle &part = vMCParticles[iP];
148  CheckMCParticleIsReconstructable(part);
149  }
150 }
151 
152 void PndFTSTopoPerformance::CheckMCParticleIsReconstructable(KFMCParticle &part)
153 {
154  if ( part.IsReconstructable() ) return;
155 
156  // tracks
157  if ( /*part.NDaughters() == 0*/ part.GetPDG() == -211 ||
158  part.GetPDG() == 211 ||
159  part.GetPDG() == 2212 ||
160  part.GetPDG() == -2212 ||
161  part.GetPDG() == 321 ||
162  part.GetPDG() == -321 ||
163  part.GetPDG() == 11 ||
164  part.GetPDG() == -11 ||
165  part.GetPDG() == 13 ||
166  part.GetPDG() == -13 ) { // TODO other particles
167 
168  switch ( fFindParticlesMode ) {
169  case 1:
170  part.SetAsReconstructable();
171  break;
172  case 2:
173  {
174  int iMCPart = part.GetMCTrackID();
176  PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->GetMCData()[iMCPart];
177 
178  if(mc.IsReconstructable())
179  part.SetAsReconstructable();
180  }
181  break;
182  case 3:
183  {
184  int iMCPart = part.GetMCTrackID();
185 
187  PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->GetMCData()[iMCPart];
188 
189  if(mc.IsReconstructed())
190  part.SetAsReconstructable();
191  }
192  break;
193  default:
194  part.SetAsReconstructable();
195  };
196  }
197  // mother particles
198  else
199  {
200  for(int iPart=0; iPart<fParteff.nParticles; iPart++)
201  {
202  if(part.GetPDG() == fParteff.partPDG[iPart])
203  {
204  const unsigned int nDaughters = fParteff.partDaughterPdg[iPart].size();
205  if( part.GetDaughterIds().size() != nDaughters ) return;
206  vector<int> pdg(nDaughters);
207 
208  for(unsigned int iD=0; iD<nDaughters; iD++)
209  pdg[iD] = vMCParticles[part.GetDaughterIds()[iD]].GetPDG();
210 
211  vector<bool> isDaughterFound(nDaughters);
212  for(unsigned int iDMC=0; iDMC<nDaughters; iDMC++)
213  isDaughterFound[iDMC] = 0;
214 
215  bool isReco = 1;
216  for(unsigned int iDMC=0; iDMC<nDaughters; iDMC++)
217  for(unsigned int iD=0; iD<nDaughters; iD++)
218  if(pdg[iD] == fParteff.partDaughterPdg[iPart][iDMC]) isDaughterFound[iDMC] = 1;
219 
220  for(unsigned int iDMC=0; iDMC<nDaughters; iDMC++)
221  isReco = isReco && isDaughterFound[iDMC];
222 
223  if(!isReco) return;
224  }
225  }
226 
227 
228  const vector<int>& dIds = part.GetDaughterIds();
229  const unsigned int nD = dIds.size();
230  bool reco = 1;
231  for ( unsigned int iD = 0; iD < nD && reco; iD++ ) {
232  KFMCParticle &dp = vMCParticles[dIds[iD]];
233  CheckMCParticleIsReconstructable(dp);
234  reco &= dp.IsReconstructable();
235  }
236  if (reco) part.SetAsReconstructable();
237  }
238 }
239 
240 void PndFTSTopoPerformance::MatchParticles()
241 {
242  // get all reco particles ( temp )
243  MCtoRParticleId.clear();
244  RtoMCParticleId.clear();
245  MCtoRParticleId.resize(vMCParticles.size());
246  RtoMCParticleId.resize(fTopoReconstructor->GetParticles().size() );
247 
248  // match tracks ( particles which are direct copy of tracks )
249  for( unsigned int iRP = 0; iRP < fTopoReconstructor->GetParticles().size(); iRP++ ) {
250 // CbmKFParticle &rPart = fTopoReconstructor->GetParticles()[iRP];
251  const KFParticle &rPart = fTopoReconstructor->GetParticles()[iRP];
252 
253  if (rPart.NDaughters() != 1) continue;
254 
255  const int rTrackId = rPart.DaughterIds()[0];
256  const int mcTrackId = recoData[rTrackId].GetMCTrackId();
257 
258 // std::cout << "reco " << rPart.X() << " " << rPart.Y() << " " << rPart.Z() << " " << rPart.Px() << " " << rPart.Py() << " " << rPart.Pz() <<" " << rPart.Q()<< std::endl;
259 //
260 // PndFTSCAMCTrack mcTrack = (*PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fMCTracks)[mcTrackId];
261 //
262 // PndFTSCALocalMCPoint *points = &((*(PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fLocalMCPoints)).Data()[mcTrack.FirstMCPointID()]);
263 //
264 // std::cout << "mc " << points[0].X() << " " << points[0].Y() << " " << points[0].Z() << " " << points[0].Px() << " " << points[0].Py() << " " << points[0].Pz() <<" " << mcTrack.PDG()<< std::endl;
265 
266 // #ifdef DRAW
267 // if( mcTrackId == 2346 || mcTrackId == 2347 )
268 // {
269 // if(iRP==0)
270 // {
271 // PndFTSCADisplay::Instance().ClearView();
272 // PndFTSCADisplay::Instance().SetTPCView();
273 // PndFTSCADisplay::Instance().DrawTPC();
274 // }
275 //
276 // PndFTSCADisplay::Instance().DrawGBTrack( rTrackId, kBlue, 2. );
277 //
278 // PndFTSCADisplay::Instance().SpecDrawMCTrackPointsGlobal( (*PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fMCTracks)[mcTrackId], PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fLocalMCPoints, kRed, 0.3 );
279 //
280 // PndFTSCADisplay::Instance().DrawGBPoint( rPart.X(), rPart.Y(), rPart.Z(), kGreen );
281 // KFParticle rPart1 = rPart;
282 // const Double_t vtx[3] = {0,0,18};
283 // rPart1.TransportToPoint(vtx);
284 // PndFTSCADisplay::Instance().DrawGBPoint( rPart1.X(), rPart1.Y(), rPart1.Z(), kMagenta );
285 // const KFParticle &mPart = fTopoReconstructor->GetParticles()[2];
286 // PndFTSCADisplay::Instance().DrawGBPoint( mPart.X(), mPart.Y(), mPart.Z(), kOrange );
287 //
288 // PndFTSCADisplay::Instance().Ask();
289 // }
290 // #endif
291 
292  if ( recoData[rTrackId].IsGhost(PParameters::MinTrackPurity) ) continue;
293 
294  for ( unsigned int iMP = 0; iMP < vMCParticles.size(); iMP++ ) {
295  KFMCParticle &mPart = vMCParticles[iMP];
296  if ( mPart.GetMCTrackID() == mcTrackId ) { // match is found
297  if( mPart.GetPDG() == rPart.GetPDG() ) {
298  MCtoRParticleId[iMP].ids.push_back(iRP);
299  RtoMCParticleId[iRP].ids.push_back(iMP);
300  }
301  else {
302  MCtoRParticleId[iMP].idsMI.push_back(iRP);
303  RtoMCParticleId[iRP].idsMI.push_back(iMP);
304  }
305 // KFMCParticle &mmPart = vMCParticles[mPart.GetMotherId()];
306 // if(mmPart.GetPDG()==310) std::cout << "!!!!! " << rTrackId << " " << iMP << " " << mcTrackId<< std::endl;
307  }
308  }
309  }
310 
311  // match created mother particles
312  for( unsigned int iRP = 0; iRP < fTopoReconstructor->GetParticles().size(); iRP++ ) {
313 // CbmKFParticle &rPart = fTopoReconstructor->GetParticles()[iRP];
314  const KFParticle &rPart = fTopoReconstructor->GetParticles()[iRP];
315  const unsigned int NRDaughters = rPart.NDaughters();
316  if (NRDaughters < 2) continue;
317 
318  unsigned int iD = 0;
319  int mmId = -2; // mother MC id
320  {
321  const int rdId = rPart.DaughterIds()[iD];
322  if ( !RtoMCParticleId[rdId].IsMatched() ) continue;
323  const int mdId = RtoMCParticleId[rdId].GetBestMatch();
324  mmId = vMCParticles[mdId].GetMotherId();
325  }
326  iD++;
327  for ( ; iD < NRDaughters; iD++ ) {
328  const int rdId = rPart.DaughterIds()[iD];
329  if ( !RtoMCParticleId[rdId].IsMatched() ) break;
330  const int mdId = RtoMCParticleId[rdId].GetBestMatch();
331  if( vMCParticles[mdId].GetMotherId() != mmId ) break;
332  }
333  if ( iD == NRDaughters && mmId > -1 ) { // match is found and it is not primary vertex
334  KFMCParticle &mmPart = vMCParticles[mmId];
335  if( mmPart.GetPDG() == rPart.GetPDG() &&
336  mmPart.NDaughters() == rPart.NDaughters() ) {
337  MCtoRParticleId[mmId].ids.push_back(iRP);
338  RtoMCParticleId[iRP].ids.push_back(mmId);
339  }
340  else {
341  MCtoRParticleId[mmId].idsMI.push_back(iRP);
342  RtoMCParticleId[iRP].idsMI.push_back(mmId);
343  }
344  }
345  }
346 }
347 
348 void PndFTSTopoPerformance::MatchTracks()
349 {
350  recoData = PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->GetRecoData();
351  GetMCParticles();
352  FindReconstructableMCParticles();
353  MatchParticles();
354  CalculateEfficiency();
355 
356 } // void PndFTSTopoPerformance::MatchTracks()
357 
358 void PndFTSTopoPerformance::CalculateEfficiency()
359 {
360  KFPartEfficiencies partEff; // efficiencies for current event
361 
362  const int NRP = fTopoReconstructor->GetParticles().size();
363  for ( int iP = 0; iP < NRP; ++iP ) {
364 // const CbmKFParticle &part = fPF->GetParticles()[iP];
365  const KFParticle &part = fTopoReconstructor->GetParticles()[iP];
366  const int pdg = part.GetPDG();
367 
368  const bool isBG = RtoMCParticleId[iP].idsMI.size() != 0;
369  const bool isGhost = !RtoMCParticleId[iP].IsMatched();
370 
371  for(int iPart=0; iPart<fParteff.nParticles; iPart++)
372  if ( pdg == fParteff.partPDG[iPart] )
373  partEff.IncReco(isGhost, isBG, fParteff.partName[iPart].Data());
374  }
375 
376  const int NMP = vMCParticles.size();
377  for ( int iP = 0; iP < NMP; ++iP ) {
378  const KFMCParticle &part = vMCParticles[iP];
379  if ( !part.IsReconstructable() ) continue;
380  const int pdg = part.GetPDG();
381  const int mId = part.GetMotherId();
382 
383  const bool isReco = MCtoRParticleId[iP].ids.size() != 0;
384  const int nClones = MCtoRParticleId[iP].ids.size() - 1;
385 
386  for(int iPart=0; iPart<fParteff.nParticles; iPart++)
387  {
388  if ( pdg == fParteff.partPDG[iPart] ) {
389  partEff.Inc(isReco, nClones, fParteff.partName[iPart].Data());
390  if ( mId == -1 )
391  partEff.Inc(isReco, nClones, (fParteff.partName[iPart]+"_prim").Data());
392  else
393  partEff.Inc(isReco, nClones, (fParteff.partName[iPart]+"_sec").Data());
394  }
395  }
396  }
397 
398  fNEvents++;
399 
400  fParteff += partEff;
401 
402  partEff.CalcEff();
403  fParteff.CalcEff();
404 
405  // cout.precision(3);
406  //if(fNEvents%100 == 0)
407  {
408  cout << " ---- KF Particle finder --- " << endl;
409  // cout << "L1 STAT : " << fNEvents << " EVENT " << endl << endl;
410  //partEff.PrintEff();
411  // cout << endl;
412  cout << "ACCUMULATED STAT : " << fNEvents << " EVENTS " << endl << endl;
413  fParteff.PrintEff();
414 
415  cout<<endl;
416  // cout<<"CA Track Finder: " << L1_CATIME/L1_fNEvents << " s/ev" << endl << endl;
417  }
418 }
419 
420 void PndFTSTopoPerformance::FillHistos()
421 {
422  PndFTSParticlePerformanceBase::FillHistos();
423 
424  const int nParticles = fTopoReconstructor->fRTrackIds.size();
425 
426  for(int iP = 0; iP < nParticles; iP++){
427 
428  const int itr = fTopoReconstructor->fRTrackIds[iP];
429  const int iMC = recoData[itr].GetMCTrackId();
430 
431 
432  if ( recoData[itr].IsGhost(PParameters::MinTrackPurity) ) continue;
433 
434  PndFTSCAMCTrack &mc = (*fMCTracks)[iMC];
435 
436  if(mc.MotherId() < 0)
437  {
438  continue;
439  }
440 // PndFTSCAMCTrack &mmc = (*fMCTracks)[mc.MotherId()];
441 
442  // const PndFTSCAGBTrack &t = fTracker->Track( itr );
443  // PndFTSCATrackParam p = t.Param();
444  KFParticle &p = fTopoReconstructor->fKFPTopoReconstructor->GetParticle(iP);
445 
446  float mcParPoint[6]={0};
447 
448  for(;;){ // technical DO // track pulls and residuals at track end
449  // find point which corresponds to our track end - mcPoint
450  int nFirstMC = mc.FirstMCPointID();
451  int nMCPoints = mc.NMCPoints();
452  PndFTSCALocalMCPoint *points = &((*fLocalMCPoints).Data()[nFirstMC]);
453 
454  int MCindex=-1;
455  PndFTSCALocalMCPoint mcPoint;
456  for(int iMCPoint=0; iMCPoint<nMCPoints; iMCPoint++)
457  {
458  // get global CS
459  mcPoint = points[iMCPoint];
460 
461  // check if the point correspond to our track end
462  if (fabs(p.X() - mcPoint.X()) < 2.f) {
463  if (fabs(p.Y() - mcPoint.Y()) < 2.f) {
464  if (fabs(p.Z() - mcPoint.Z()) < 2.f) {
465  MCindex = iMCPoint;
466  break;
467  }
468  }
469  }
470  }
471  if(MCindex == -1) break;
472 
473  // get mc info
474  const float mcX = mcPoint.X();
475  const float mcY = mcPoint.Y();
476  const float mcZ = mcPoint.Z();
477  const float mcPx = mcPoint.Px();
478  const float mcPy = mcPoint.Py();
479  const float mcPz = mcPoint.Pz();
480 
481  mcParPoint[0] = mcX;
482  mcParPoint[1] = mcY;
483  mcParPoint[2] = mcZ;
484  mcParPoint[3] = mcPx;
485  mcParPoint[4] = mcPy;
486  mcParPoint[5] = mcPz;
487 
488 
489  if ( CAMath::Sqrt( mcPx*mcPx + mcPy*mcPy /*+ mcPz*mcPz*/ ) < 0.010 ) break;
490 
491  KFParticle &pTmp = p;
492 
493  GetHisto("resX")->Fill ( pTmp.GetX() - mcX );
494  GetHisto("resY")->Fill ( pTmp.GetY() - mcY );
495  GetHisto("resZ")->Fill ( pTmp.GetZ() - mcZ );
496  GetHisto("resPx")->Fill( pTmp.GetPx() - mcPx );
497  GetHisto("resPy")->Fill( pTmp.GetPy() - mcPy );
498  GetHisto("resPz")->Fill( pTmp.GetPz() - mcPz );
499 
500  if ( pTmp.GetErrX() > 0 ) GetHisto("pullX")->Fill ( ( pTmp.GetX() - mcX ) / pTmp.GetErrX() );
501  if ( pTmp.GetErrY() > 0 ) GetHisto("pullY")->Fill ( ( pTmp.GetY() - mcY ) / pTmp.GetErrY() );
502  if ( pTmp.GetErrZ() > 0 ) GetHisto("pullZ")->Fill ( ( pTmp.GetZ() - mcZ ) / pTmp.GetErrZ() );
503  if ( pTmp.GetErrPx() > 0 ) GetHisto("pullPx")->Fill( ( pTmp.GetPx() - mcPx ) / pTmp.GetErrPx() );
504  if ( pTmp.GetErrPy() > 0 ) GetHisto("pullPy")->Fill( ( pTmp.GetPy() - mcPy ) / pTmp.GetErrPy() );
505  if ( pTmp.GetErrPz() > 0 ) GetHisto("pullPz")->Fill( ( pTmp.GetPz() - mcPz ) / pTmp.GetErrPz() );
506 
507  break;
508  }
509 
510  for(;;){ // technical DO // track pulls and residuals at vertex
511  // get mc info
512 
513 
514  const float mcX = mc.X();
515  const float mcY = mc.Y();
516  const float mcZ = mc.Z();
517  const float mcPx = mc.Px();
518  const float mcPy = mc.Py();
519  const float mcPz = mc.Pz();
520 
521  // transport to vertex
522  KFParticle pTmp = p;
523  const double vertex[3] = { mcX, mcY, mcZ };
524  pTmp.TransportToDS( pTmp.GetDStoPoint(vertex) );
525 
526  int mcMotherId = mc.MotherId();
527  int mcMotherPDG = 0;
528  if(mcMotherId>-1)
529  {
530  PndFTSCAMCTrack &mcMother = (*fMCTracks)[mcMotherId];
531  mcMotherPDG = mcMother.PDG();
532  }
533 // if(mcMotherPDG!=310) break;
534 // #ifdef DRAW
535 //
536 // if(mcMotherPDG==310)
537 // {
538 // PndFTSCADisplay::Instance().ClearView();
539 // PndFTSCADisplay::Instance().DrawTPC();
540 //
541 // // PndFTSCADisplay::Instance().SpecDrawMCTrackPointsGlobal( (*PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fMCTracks)[iMC], PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fLocalMCPoints, kRed, 0.3 );
542 // //
543 // float param[8] = {mcX, mcY, mcZ, mcPx, mcPy, mcPz, 0, 0};
544 // PndFTSCADisplay::Instance().DrawGBPoint( mcX, mcY, mcZ, kBlack );
545 // PndFTSCADisplay::Instance().DrawGBPoint( pTmp.X(), pTmp.Y(), pTmp.Z(), kGreen );
546 //
547 // float vtx[3] = {mcX, mcY, mcZ};
548 // for(int iP=0; iP<8; iP++)
549 // param[iP] = p.Parameters()[iP];
550 //
551 // std::cout << "Rec ";
552 // for(int iP=0; iP<8; iP++)
553 // std::cout << param[iP] << " ";
554 // std::cout << std::endl;
555 // double b[3];
556 // p.GetFieldValue(vertex, b);
557 // PndFTSCADisplay::Instance().DrawParticleGlobal( param, p.Q(), 0, p.GetDStoPoint(vertex)*10, b[2], kBlue, 2 );
558 //
559 // double mcQ = 0;
560 // for( int iP = 0; iP < mc.NMCPoints(); iP++ ) {
561 // PndFTSCALocalMCPoint mcPoint = (*fLocalMCPoints).Data()[mc.FirstMCPointID()+iP];
562 //
563 // double mcX0 = mcPoint.X();
564 // double mcY0 = mcPoint.Y();
565 // double mcZ = mcPoint.Z();
566 // mcQ = mcPoint.QP()/CAMath::Abs(mcPoint.QP());
567 // PndFTSCADisplay::Instance().DrawGBPoint((float)mcX0, (float)mcY0, (float)mcZ, kRed, (Size_t)1);
568 // }
569 //
570 // const float kCLight = 0.000299792458;
571 // float bq = b[2]*mcQ*kCLight;
572 // float pt2 = mcParPoint[3]*mcParPoint[3] + mcParPoint[4]*mcParPoint[4];
573 //
574 // float dx = vtx[0] - mcParPoint[0];
575 // float dy = vtx[1] - mcParPoint[1];
576 // float a = dx*mcParPoint[3]+dy*mcParPoint[4];
577 // float dS = 0;
578 // dS = atan2( bq*a, pt2 + bq*(dy*mcParPoint[3] -dx*mcParPoint[4]) )/bq;
579 // for(int i=0; i<6; i++)
580 // param[i] = mcParPoint[i];
581 // PndFTSCADisplay::Instance().DrawParticleGlobal( param, mcQ, 0, dS*10, b[2], kGreen, 2 );
582 //
583 // std::cout << "MC ";
584 // for(int iP=0; iP<8; iP++)
585 // std::cout << param[iP] << " ";
586 // std::cout << std::endl;
587 // std::cout << "URA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " << b[2] << std::endl;
588 // PndFTSCADisplay::Instance().Ask();
589 // }
590 // #endif
591 
592 // if ( mcX*mcX+mcY*mcY < 50*50 ) break; // dbg // TPC-vertices only
593 // if ( pTmp.GetPt() < 1.f ) break; // dbg
594 // if ( mc.MotherId() != -1 ) break; // dbg // primary only !!
595 
596  // fill histos
597 
598  if ( CAMath::Sqrt( mcPx*mcPx + mcPy*mcPy /*+ mcPz*mcPz*/ ) < 0.010 ) break;
599  // if ( TMath::Abs( qPt ) > 1.e-4 ) pt = 1. / TMath::Abs( qPt );
600 
601  // std::cout << " MC " << mcX << " " << mcY << std::endl;
602  // std::cout << " diff " << pTmp.GetX() - mcX << " " << pTmp.GetY() - mcY << std::endl;
603  GetHisto("resAtProdPointX")->Fill ( pTmp.GetX() - mcX );
604  GetHisto("resAtProdPointY")->Fill ( pTmp.GetY() - mcY );
605  GetHisto("resAtProdPointZ")->Fill ( pTmp.GetZ() - mcZ );
606  GetHisto("resAtProdPointPx")->Fill( pTmp.GetPx() - mcPx );
607  GetHisto("resAtProdPointPy")->Fill( pTmp.GetPy() - mcPy );
608  GetHisto("resAtProdPointPz")->Fill( pTmp.GetPz() - mcPz );
609 
610  if ( pTmp.GetErrX() > 0 ) GetHisto("pullAtProdPointX")->Fill ( ( pTmp.GetX() - mcX ) / pTmp.GetErrX() );
611  if ( pTmp.GetErrY() > 0 ) GetHisto("pullAtProdPointY")->Fill ( ( pTmp.GetY() - mcY ) / pTmp.GetErrY() );
612  if ( pTmp.GetErrZ() > 0 ) GetHisto("pullAtProdPointZ")->Fill ( ( pTmp.GetZ() - mcZ ) / pTmp.GetErrZ() );
613  if ( pTmp.GetErrPx() > 0 ) GetHisto("pullAtProdPointPx")->Fill( ( pTmp.GetPx() - mcPx ) / pTmp.GetErrPx() );
614  if ( pTmp.GetErrPy() > 0 ) GetHisto("pullAtProdPointPy")->Fill( ( pTmp.GetPy() - mcPy ) / pTmp.GetErrPy() );
615  if ( pTmp.GetErrPz() > 0 ) GetHisto("pullAtProdPointPz")->Fill( ( pTmp.GetPz() - mcPz ) / pTmp.GetErrPz() );
616 
617  break;
618  }
619 
620  for(;;){ // technical DO // vertex pulls and residuals
621  if (fPrimVertices.size() == 0) break; // no prim tracks
622 
623  // get mc info
624  const float mcX = fPrimVertices[0].X();
625  const float mcY = fPrimVertices[0].Y();
626  const float mcZ = fPrimVertices[0].Z();
627 
628  // prim vertex
629  KFParticle &pTmp = fTopoReconstructor->fKFPTopoReconstructor->GetPrimVertex();
630 
631  // fill histos
632 
633  GetHisto("resVertexX")->Fill ( pTmp.GetX() - mcX );
634  GetHisto("resVertexY")->Fill ( pTmp.GetY() - mcY );
635  GetHisto("resVertexZ")->Fill ( pTmp.GetZ() - mcZ );
636 
637  if ( pTmp.GetErrX() > 0 ) GetHisto("pullVertexX")->Fill ( ( pTmp.GetX() - mcX ) / pTmp.GetErrX() );
638  if ( pTmp.GetErrY() > 0 ) GetHisto("pullVertexY")->Fill ( ( pTmp.GetY() - mcY ) / pTmp.GetErrY() );
639  if ( pTmp.GetErrZ() > 0 ) GetHisto("pullVertexZ")->Fill ( ( pTmp.GetZ() - mcZ ) / pTmp.GetErrZ() );
640 
641  break;
642  }
643  }
644 
645  //fill histograms for found short-lived particles
646  for(unsigned int iP=0; iP<fTopoReconstructor->GetParticles().size(); iP++)
647  {
648 
649  int iParticle = fParteff.GetParticleIndex(fTopoReconstructor->GetParticles()[iP].GetPDG());
650  if(iParticle < 0) continue;
651 
652  Double_t M, ErrM;
653  Double_t dL, ErrdL; // decay length
654  Double_t cT, ErrcT; // c*tau
655  Double_t P, ErrP;
656  Double_t Pt;
657  Double_t Rapidity;
658  Double_t Theta;
659  Double_t Phi;
660  Double_t Z;
661 // CbmKFParticle TempPart = fTopoReconstructor->GetParticles()[iP];
662  KFParticle TempPart = fTopoReconstructor->GetParticles()[iP];
663  TempPart.GetMass(M,ErrM);
664  TempPart.GetMomentum(P,ErrP);
665  Pt = TempPart.GetPt();
666  Rapidity = TempPart.GetRapidity();
667  TempPart.GetDecayLength(dL,ErrdL);
668  TempPart.GetLifeTime(cT,ErrcT);
669  Double_t chi2 = TempPart.GetChi2();
670  Int_t ndf = TempPart.GetNDF();
671  Double_t prob = TMath::Prob(chi2, ndf);//(TDHelper<float>::Chi2IProbability( ndf, chi2 ));
672  Theta = TempPart.GetTheta();
673  Phi = TempPart.GetPhi();
674  Z = TempPart.GetZ();
675 
676  KFParticleSIMD tempSIMDPart(TempPart);
677  fvec l,dl;
678  KFParticleSIMD pv(fTopoReconstructor->GetPrimVertex());
679 // KFParticleSIMD pv;
680 // for(int iC=0; iC<6; iC++)
681 // pv.CovarianceMatrix()[iC] = 0;
682 
683  tempSIMDPart.GetDistanceToVertexLine(pv, l, dl);
684  dL = sqrt(TempPart.X()*TempPart.X() + TempPart.Y()*TempPart.Y() + TempPart.Z()*TempPart.Z() );
685 
686  //for all particle-candidates
687  hPartParam[iParticle][ 0]->Fill(M);
688  hPartParam[iParticle][ 1]->Fill(P);
689  hPartParam[iParticle][ 2]->Fill(Pt);
690  hPartParam[iParticle][ 3]->Fill(Rapidity);
691  hPartParam[iParticle][ 4]->Fill(dL);
692  hPartParam[iParticle][ 5]->Fill(cT);
693  hPartParam[iParticle][ 6]->Fill(chi2/ndf);
694  hPartParam[iParticle][ 7]->Fill(prob);
695  hPartParam[iParticle][ 8]->Fill(Theta);
696  hPartParam[iParticle][ 9]->Fill(Phi);
697  hPartParam[iParticle][10]->Fill(Z);
698  hPartParam[iParticle][11]->Fill(l[0]/dl[0]);
699 
700 
701  hPartParam2D[iParticle][0]->Fill(Rapidity,Pt,1);
702 
703  if(!RtoMCParticleId[iP].IsMatchedWithPdg()) //background
704  {
705  if(!RtoMCParticleId[iP].IsMatched())
706  {
707  // for ghost particles - combinatorial background
708  hPartParamGhost[iParticle][ 0]->Fill(M);
709  hPartParamGhost[iParticle][ 1]->Fill(P);
710  hPartParamGhost[iParticle][ 2]->Fill(Pt);
711  hPartParamGhost[iParticle][ 3]->Fill(Rapidity);
712  hPartParamGhost[iParticle][ 4]->Fill(dL);
713  hPartParamGhost[iParticle][ 5]->Fill(cT);
714  hPartParamGhost[iParticle][ 6]->Fill(chi2/ndf);
715  hPartParamGhost[iParticle][ 7]->Fill(prob);
716  hPartParamGhost[iParticle][ 8]->Fill(Theta);
717  hPartParamGhost[iParticle][ 9]->Fill(Phi);
718  hPartParamGhost[iParticle][10]->Fill(Z);
719  hPartParamGhost[iParticle][11]->Fill(l[0]/dl[0]);
720 
721  hPartParam2DGhost[iParticle][0]->Fill(Rapidity,Pt,1);
722  }
723  else
724  {
725  // for phisical background
726 
727  hPartParamBG[iParticle][ 0]->Fill(M);
728  hPartParamBG[iParticle][ 1]->Fill(P);
729  hPartParamBG[iParticle][ 2]->Fill(Pt);
730  hPartParamBG[iParticle][ 3]->Fill(Rapidity);
731  hPartParamBG[iParticle][ 4]->Fill(dL);
732  hPartParamBG[iParticle][ 5]->Fill(cT);
733  hPartParamBG[iParticle][ 6]->Fill(chi2/ndf);
734  hPartParamBG[iParticle][ 7]->Fill(prob);
735  hPartParamBG[iParticle][ 8]->Fill(Theta);
736  hPartParamBG[iParticle][ 9]->Fill(Phi);
737  hPartParamBG[iParticle][10]->Fill(Z);
738  hPartParamBG[iParticle][11]->Fill(l[0]/dl[0]);
739 
740  hPartParam2DBG[iParticle][0]->Fill(Rapidity,Pt,1);
741  }
742  continue;
743  }
744  //for signal particles
745  hPartParamSignal[iParticle][ 0]->Fill(M);
746  hPartParamSignal[iParticle][ 1]->Fill(P);
747  hPartParamSignal[iParticle][ 2]->Fill(Pt);
748  hPartParamSignal[iParticle][ 3]->Fill(Rapidity);
749  hPartParamSignal[iParticle][ 4]->Fill(dL);
750  hPartParamSignal[iParticle][ 5]->Fill(cT);
751  hPartParamSignal[iParticle][ 6]->Fill(chi2/ndf);
752  hPartParamSignal[iParticle][ 7]->Fill(prob);
753  hPartParamSignal[iParticle][ 8]->Fill(Theta);
754  hPartParamSignal[iParticle][ 9]->Fill(Phi);
755  hPartParamSignal[iParticle][10]->Fill(Z);
756  hPartParamSignal[iParticle][11]->Fill(l[0]/dl[0]);
757 
758  hPartParam2DSignal[iParticle][0]->Fill(Rapidity,Pt,1);
759 
760  int iMCPart = RtoMCParticleId[iP].GetBestMatchWithPdg();
761  KFMCParticle &mcPart = vMCParticles[iMCPart];
762  // Fit quality of the mother particle
763  {
764  int iMCTrack = mcPart.GetMCTrackID();
765  PndFTSCAMCTrack &mcTrack = (*fMCTracks)[iMCTrack];
766  int mcDaughterId = mcPart.GetDaughterIds()[0];
767  PndFTSCAMCTrack &mcDaughter = (*fMCTracks)[mcDaughterId];
768 
769  TParticlePDG* particlePDG = TDatabasePDG::Instance()->GetParticle(mcTrack.PDG());
770 
771  const float mcX = mcDaughter.X();
772  const float mcY = mcDaughter.Y();
773  const float mcZ = mcDaughter.Z();
774  const float mcPx = mcTrack.Par(3)*mcTrack.P();
775  const float mcPy = mcTrack.Par(4)*mcTrack.P();
776  const float mcPz = mcTrack.Par(5)*mcTrack.P();
777 
778  Double_t decayVtx[3] = { mcX, mcY, mcZ };
779  Double_t recParam[8] = { 0 };
780  Double_t errParam[8] = { 0 };
781 
782  for(int iPar=0; iPar<3; iPar++)
783  {
784  recParam[iPar] = TempPart.GetParameter(iPar);
785  Double_t error = TempPart.GetCovariance(iPar,iPar);
786  if(error < 0.) { error = 1.e20;}
787  errParam[iPar] = TMath::Sqrt(error);
788  }
789  TempPart.TransportToPoint(decayVtx);
790  for(int iPar=3; iPar<7; iPar++)
791  {
792  recParam[iPar] = TempPart.GetParameter(iPar);
793  Double_t error = TempPart.GetCovariance(iPar,iPar);
794  if(error < 0.) { error = 1.e20;}
795  errParam[iPar] = TMath::Sqrt(error);
796  }
797 
798  Double_t massMC = (particlePDG) ? particlePDG->Mass() :0.13957;
799 
800  Double_t Emc = sqrt(mcTrack.P()*mcTrack.P() + massMC*massMC);
801  Double_t res[8] = {0},
802  pull[8] = {0},
803  mcParam[8] = { decayVtx[0], decayVtx[1], decayVtx[2],
804  mcPx, mcPy, mcPz, Emc, massMC };
805  for(int iPar=0; iPar < 7; iPar++ )
806  {
807  res[iPar] = recParam[iPar] - mcParam[iPar];
808  if(fabs(errParam[iPar]) > 1.e-20) pull[iPar] = res[iPar]/errParam[iPar];
809  }
810 
811  res[7] = M - mcParam[7];
812  if(fabs(ErrM) > 1.e-20) pull[7] = res[7]/ErrM;
813 
814  for(int iPar=0; iPar < 8; iPar++ )
815  {
816  hFitQA[iParticle][iPar]->Fill(res[iPar]);
817  hFitQA[iParticle][iPar+8]->Fill(pull[iPar]);
818  }
819 
820 // #ifdef DRAW
821 // if(mcTrack.PDG()==3122)
822 // {
823 // PndFTSCADisplay::Instance().ClearView();
824 // PndFTSCADisplay::Instance().SetTPCView();
825 // PndFTSCADisplay::Instance().DrawTPC();
826 //
827 // KFParticle rPart = fTopoReconstructor->GetParticles()[iP];
828 // const unsigned int NRDaughters = rPart.NDaughters();
829 //
830 // float param[8] = {mcX, mcY, mcZ, mcPx, mcPy, mcPz, 0, 0};
831 //
832 // for (unsigned int iD=0 ; iD < NRDaughters; iD++ ) {
833 //
834 // KFParticle dPart = fTopoReconstructor->GetParticles()[rPart.DaughterIds()[iD]];
835 //
836 // int iDMC = RtoMCParticleId[dPart.DaughterIds()[0]].GetBestMatch();
837 // PndFTSCADisplay::Instance().SpecDrawMCTrackPointsGlobal( (*PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fMCTracks)[iDMC], PndFTSCAPerformance::Instance().GetSubPerformance("Global Performance")->fLocalMCPoints, kRed, 0.3 );
838 //
839 // float vtx[3] = {rPart.X(), rPart.Y(), rPart.Z()};
840 // double vertex[3] = {rPart.X(), rPart.Y(), rPart.Z()};
841 // for(int iP=0; iP<8; iP++)
842 // param[iP] = dPart.Parameters()[iP];
843 // double b[3];
844 // dPart.GetFieldValue(vertex, b);
845 // PndFTSCADisplay::Instance().DrawParticleGlobal( param, dPart.Q(), 0, dPart.GetDStoPoint(vertex), b[2], kBlue, 2 );
846 // }
847 //
848 // param[0] = mcX;
849 // param[1] = mcY;
850 // param[2] = mcZ;
851 // param[3] = mcPx;
852 // param[4] = mcPy;
853 // param[5] = mcPz;
854 //
855 // PndFTSCADisplay::Instance().DrawGBPoint( param, kBlack );
856 // PndFTSCADisplay::Instance().DrawGBPoint( rPart.X(), rPart.Y(), rPart.Z(), kGreen );
857 //
858 // PndFTSCADisplay::Instance().Ask();
859 // }
860 // #endif
861 // Double_t mcT = mcDaughter.GetStartT() - mcTrack.GetStartT();
862 
863  }
864  // Fit quality of daughters
865  for(int iD=0; iD<mcPart.NDaughters(); ++iD)
866  {
867  int mcDaughterId = mcPart.GetDaughterIds()[iD];
868 // if(!MCtoRParticleId[mcDaughterId].IsMatchedWithPdg()) continue;
869  if(!MCtoRParticleId[mcDaughterId].IsMatched()) continue;
870  PndFTSCAMCTrack &mcTrack = (*fMCTracks)[mcDaughterId];
871 // int recDaughterId = MCtoRParticleId[mcDaughterId].GetBestMatchWithPdg();
872  int recDaughterId = MCtoRParticleId[mcDaughterId].GetBestMatch();
873 // CbmKFParticle Daughter = fPF->GetParticles()[recDaughterId];
874  KFParticle Daughter = fTopoReconstructor->GetParticles()[recDaughterId];
875  Daughter.GetMass(M,ErrM);
876 
877  TParticlePDG* particlePDG = TDatabasePDG::Instance()->GetParticle(mcTrack.PDG());
878 
879  const float mcX = mcTrack.X();
880  const float mcY = mcTrack.Y();
881  const float mcZ = mcTrack.Z();
882  const float mcPx = mcTrack.Px();
883  const float mcPy = mcTrack.Py();
884  const float mcPz = mcTrack.Pz();
885 
886  Double_t decayVtx[3] = {mcX, mcY, mcZ};
887  Daughter.TransportToPoint(decayVtx);
888 
889  Double_t massMC = (particlePDG) ? particlePDG->Mass() :0.13957;
890 
891  Double_t Emc = sqrt(mcTrack.P()*mcTrack.P() + massMC*massMC);
892  Double_t res[8] = {0},
893  pull[8] = {0},
894  mcParam[8] = { mcX, mcY, mcZ,
895  mcPx, mcPy, mcPz, Emc, massMC };
896  for(int iPar=0; iPar < 7; iPar++ )
897  {
898  Double_t error = Daughter.GetCovariance(iPar,iPar);
899  if(error < 0.) { error = 1.e20;}
900  error = TMath::Sqrt(error);
901  res[iPar] = Daughter.GetParameter(iPar) - mcParam[iPar];
902  if(fabs(error) > 1.e-20) pull[iPar] = res[iPar]/error;
903  }
904  res[7] = M - mcParam[7];
905  if(fabs(ErrM) > 1.e-20) pull[7] = res[7]/ErrM;
906 
907  for(int iPar=0; iPar < 8; iPar++ )
908  {
909  hFitDaughtersQA[iParticle][iPar]->Fill(res[iPar]);
910  hFitDaughtersQA[iParticle][iPar+8]->Fill(pull[iPar]);
911  }
912  }
913  }
914 
915  //fill histograms with ChiPrim for every particle
916  for(unsigned int iP=0; iP<fTopoReconstructor->GetParticles().size(); iP++)
917  {
918  const KFParticle &rPart = fTopoReconstructor->GetParticles()[iP];
919  const unsigned int NRDaughters = rPart.NDaughters();
920  if (NRDaughters > 1) break;
921  if( RtoMCParticleId[iP].GetBestMatch()<0 ) continue;
922 
923  KFMCParticle &mPart = vMCParticles[ RtoMCParticleId[iP].GetBestMatch() ];
924 
925  if(mPart.GetMotherId() < 0)
926  {
927  hTrackParameters[KFPartEfficiencies::nParticles]->Fill(fTopoReconstructor->GetChiPrim()[iP] );
928  continue;
929  }
930 
931  KFMCParticle &mMotherPart = vMCParticles[mPart.GetMotherId()];
932  int iParticle = fParteff.GetParticleIndex(mMotherPart.GetPDG());
933  float chiPrim = fTopoReconstructor->GetChiPrim()[iP];
934  if(iParticle > -1 && iParticle<KFPartEfficiencies::nParticles)
935  hTrackParameters[iParticle]->Fill(chiPrim );
936  }
937 
938  //fill histograms of the primary vertex quality
939  {
940  //Find MC parameters of the primary vertex
941  float mcPVx[3]={0.f};
942  for(int iMC=0; iMC<nMCTracks; ++iMC)
943  {
944  PndFTSCAMCTrack &mcTrack = (*fMCTracks)[iMC];
945  if(mcTrack.MotherId() < 0)
946  {
947  mcPVx[0]=mcTrack.X();
948  mcPVx[1]=mcTrack.Y();
949  mcPVx[2]=mcTrack.Z();
950  break;
951  }
952  }
953 
954  KFParticle & vtx = fTopoReconstructor->GetPrimVertex();
955  double dRPVr[3] = {vtx.X()-mcPVx[0],
956  vtx.Y()-mcPVx[1],
957  vtx.Z()-mcPVx[2]};
958  double dRPVp[3] = {dRPVr[0]/sqrt(vtx.CovarianceMatrix()[0]),
959  dRPVr[1]/sqrt(vtx.CovarianceMatrix()[2]),
960  dRPVr[2]/sqrt(vtx.CovarianceMatrix()[5])};
961  for(unsigned int iHPV=0; iHPV<3; ++iHPV)
962  hPVFitQa[iHPV]->Fill(dRPVr[iHPV]);
963  for(unsigned int iHPV=3; iHPV<6; ++iHPV)
964  hPVFitQa[iHPV]->Fill(dRPVp[iHPV-3]);
965  }
966 } // void PndFTSTopoPerformance::FillHistos()
967 
968 #endif //DO_TPCCATRACKER_EFF_PERFORMANCE
Double_t GetPz() const
Definition: KFParticle.h:472
static const float MinTrackPurity
int NDaughters() const
Definition: KFMCParticle.h:29
Double_t GetMomentum() const
Definition: KFParticle.h:546
Double_t GetRapidity() const
Definition: KFParticle.h:192
Int_t GetNDF() const
Definition: KFParticle.h:497
Int_t res
Definition: anadigi.C:166
int GetPDG() const
Definition: KFMCParticle.h:39
float Pz() const
int NMCPoints() const
void Inc(bool isReco, int nClones, TString name)
Double_t GetX() const
Definition: KFParticle.h:447
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
int NDaughters() const
double mcY
Definition: anaLmdCluster.C:53
void SetZ(float v)
float P() const
int PDG() const
PndEmc * Emc
Definition: sim_emc_apd.C:55
Double_t * CovarianceMatrix()
Definition: KFParticle.h:824
void GetDistanceToVertexLine(const KFParticleBaseSIMD &Vertex, fvec &l, fvec &dl, fvec *isParticleFromVertex=0) const
Double_t GetDStoPoint(const Double_t xyz[]) const
Definition: KFParticle.h:895
void IncReco(bool isGhost, bool isBg, TString name)
Double_t GetTheta() const
Definition: KFParticle.h:193
void SetPDG(int pdg)
Definition: KFMCParticle.h:33
double mcX
Definition: anaLmdCluster.C:53
static void error(int no)
Definition: ranlxd.cxx:419
void TransportToPoint(const Double_t xyz[])
Definition: KFParticle.h:873
Double_t p
Definition: anasim.C:58
const vector< int > & GetDaughterIds() const
Definition: KFMCParticle.h:30
Double_t GetErrZ() const
Definition: KFParticle.h:598
Double_t GetCovariance(int i) const
Definition: KFParticle.h:507
Double_t GetPt() const
Definition: KFParticle.h:525
float X() const
void AddDaughter(int i)
int MotherId() const
float Par(int i) const
void SetY(float v)
Double_t
void TransportToDS(Double_t dS)
Definition: KFParticle.h:890
TFile * f
Definition: bump_analys.C:12
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
float Py() const
void SetMCTrackID(int id)
Definition: KFMCParticle.h:34
HISThit_ene Fill(sum_hit_ene)
Double_t GetErrPz() const
Definition: KFParticle.h:613
bool IsReconstructable() const
Definition: KFMCParticle.h:40
const Double_t & X() const
Definition: KFParticle.h:129
int GetMotherId() const
Definition: KFMCParticle.h:38
double mcZ
Definition: anaLmdCluster.C:53
GeV c P
int reco()
Double_t GetChi2() const
Definition: KFParticle.h:492
Double_t GetErrX() const
Definition: KFParticle.h:588
void SetAsReconstructable()
Definition: KFMCParticle.h:41
const std::vector< int > & DaughterIds() const
float Px() const
double Z
Definition: anaLmdDigi.C:68
void SetMotherId(int id)
Definition: KFMCParticle.h:35
Double_t GetZ() const
Definition: KFParticle.h:457
const Double_t & Z() const
Definition: KFParticle.h:131
int GetPDG() const
Double_t GetErrPx() const
Definition: KFParticle.h:603
Information about reconstruction of MCTrack.
int GetMCTrackID() const
Definition: KFMCParticle.h:37
Double_t GetPhi() const
Definition: KFParticle.h:539
Double_t GetY() const
Definition: KFParticle.h:452
float Y() const
Double_t GetPx() const
Definition: KFParticle.h:462
Double_t GetLifeTime() const
Definition: KFParticle.h:574
Double_t GetErrPy() const
Definition: KFParticle.h:608
Double_t GetMass() const
Definition: KFParticle.h:553
void SetX(float v)
static const int nParticles
Double_t GetParameter(int i) const
Definition: KFParticle.h:502
float Z() const
const Double_t & Y() const
Definition: KFParticle.h:130
Double_t GetErrY() const
Definition: KFParticle.h:593
Double_t GetDecayLength() const
Definition: KFParticle.h:560
Double_t GetPy() const
Definition: KFParticle.h:467
int FirstMCPointID() const