FairRoot/PandaRoot
PndPidCorrelator.cxx
Go to the documentation of this file.
1 #include "PndDetectorList.h"
2 #include "PndPidCorrelator.h"
3 #include "PndPidCandidate.h"
4 #include "PndMCTrack.h"
5 #include "PndTrack.h"
6 #include "PndTrackID.h"
7 
8 #include "PndSciTPoint.h"
9 #include "PndSciTHit.h"
10 #include "PndEmcBump.h"
11 #include "PndEmcDigi.h"
12 #include "PndEmcStructure.h"
13 #include "PndEmcXtal.h"
14 #include "PndEmcErrorMatrix.h"
17 #include "PndMdtPoint.h"
18 #include "PndMdtHit.h"
19 #include "PndMdtTrk.h"
20 #include "PndDrcBarPoint.h"
21 #include "PndDrcHit.h"
22 #include "PndDskParticle.h"
23 #include "PndRichBarPoint.h"
24 #include "PndRichHit.h"
25 #include "FairTrackParH.h"
26 #include "FairMCApplication.h"
27 #include "FairRunAna.h"
28 #include "FairRootManager.h"
29 #include "FairRuntimeDb.h"
30 
31 #include "TObjArray.h"
32 #include "TVector3.h"
33 #include "TGeoMatrix.h"
34 #include "TGeoManager.h"
35 #include "TSystem.h"
36 
37 #include <cmath>
38 
39 // ----------------------------------------------------------
40 // --- Interface with PidMaker and output ---
41 
42 //___________________________________________________________
44 {
45  //
46  FairRootManager *fManager =FairRootManager::Instance();
47  fManager->Write();
48  delete fEmcErrorMatrix;
49 }
50 
51 //___________________________________________________________
53  FairTask(), fMcTrack(0), fTrack(0), fTrack2(0), fPidChargedCand(0), fPidNeutralCand(0), fMdtTrack(0), fMvdHitsStrip(0), fMvdHitsPixel(0), fTofHit(0), fTofPoint(0), fFtofHit(0), fFtofPoint(0), fEmcCluster(0), fEmcBump(0), fEmcDigi(0), fMdtPoint(0), fMdtHit(0), fMdtTrk(0), fDrcPoint(0), fDrcHit(0), fDskParticle(0), fSttHit(0), fFtsHit(0), fRichPoint(0), fRichHit(0),
54  fCorrPar(new PndPidCorrPar()), fEmcGeoPar(new PndEmcGeoPar()), fEmcErrorMatrixPar(new PndEmcErrorMatrixPar()), fEmcErrorMatrix(new PndEmcErrorMatrix()), fSttParameters(new PndGeoSttPar()), fEmcCalibrator(NULL),
55  fDebugMode(kFALSE),
56  fMvdMode(-1),
57  fSttMode(-1),
58  fFtsMode(-1),
59  fTofMode(-1),
60  fFtofMode(-1),
61  fEmcMode(-1),
62  fMdtMode(-1),
63  fDrcMode(-1),
64  fDskMode(-1),
65  fRichMode(-1),
66  fEmcClstCount(0),
67  fFscClstCount(0),
68  mapMdtBarrel(),
69  mapMdtEndcap(),
70  mapMdtForward(),
71  fClusterList(),
72  fClusterQ(),
73  fTrackBranch(""),
74  fTrackBranch2(""),
75  fTrackOutBranch(""),
76  fSimulation(kFALSE),
77  fGeanePro(kTRUE),
78  fMdtRefit(kFALSE),
79  fIdeal(kFALSE),
80  fCorrErrorProp(kTRUE),
81  fMixMode(kFALSE),
82  fPidHyp(0),
83  fIdealHyp(kFALSE),
84  fFast(kFALSE),
85  fFlagCut(kTRUE),
86  fBackPropagate(kTRUE),
87  fGeoH(NULL),
88  fGeanePropagator(NULL),
89  tofCorr(0),
90  emcCorr(0),
91  fscCorr(0),
92  drcCorr(0),
93  dskCorr(0),
94  richCorr(0),
95  sDir(""),
96  sFile("")
97 {
98  //---
99  fPidChargedCand = new TClonesArray("PndPidCandidate");
100  fPidNeutralCand = new TClonesArray("PndPidCandidate");
101  sDir = "./";
102  sFile = "./pidcorrelator.root";
104 
105  // Resetting MDT geometry parameters
106  for (Int_t mm=0; mm<3; mm++)
107  for (Int_t ll=0; ll<20;ll++)
108  {
109  mdtLayerPos[mm][ll] = -1;
110  mdtIronThickness[mm][ll] = -1;
111  }
112 
113  Reset();
114 }
115 
116 //___________________________________________________________
117 PndPidCorrelator::PndPidCorrelator(const char *name, const char *title) :
118  FairTask(name),
119  fMcTrack(0), fTrack(0), fTrack2(0), fPidChargedCand(0), fPidNeutralCand(0), fMdtTrack(0), fMvdHitsStrip(0), fMvdHitsPixel(0), fTofHit(0), fTofPoint(0), fFtofHit(0), fFtofPoint(0), fEmcCluster(0), fEmcBump(0), fEmcDigi(0), fMdtPoint(0), fMdtHit(0), fMdtTrk(0), fDrcPoint(0), fDrcHit(0), fDskParticle(0), fSttHit(0), fFtsHit(0), fRichPoint(0), fRichHit(0),
120  fCorrPar(new PndPidCorrPar()), fEmcGeoPar(new PndEmcGeoPar()), fEmcErrorMatrixPar(new PndEmcErrorMatrixPar()), fEmcErrorMatrix(new PndEmcErrorMatrix()), fSttParameters(new PndGeoSttPar()), fDebugMode(kFALSE),
121  fMvdMode(-1),
122  fSttMode(-1),
123  fFtsMode(-1),
124  fTofMode(-1),
125  fFtofMode(-1),
126  fEmcMode(-1),
127  fMdtMode(-1),
128  fDrcMode(-1),
129  fDskMode(-1),
130  fRichMode(-1),
131  fEmcClstCount(0),
132  fFscClstCount(0),
133  mapMdtBarrel(),
134  mapMdtEndcap(),
135  mapMdtForward(),
136  fClusterList(),
137  fClusterQ(),
138  fTrackBranch(""),
139  fTrackBranch2(""),
140  fTrackOutBranch(""),
141  fSimulation(kFALSE),
142  fGeanePro(kTRUE),
143  fMdtRefit(kFALSE),
144  fIdeal(kFALSE),
145  fCorrErrorProp(kTRUE),
146  fMixMode(kFALSE),
147  fPidHyp(0),
148  fIdealHyp(kFALSE),
149  fFast(kFALSE),
150  fFlagCut(kTRUE),
151  fBackPropagate(kTRUE),
152  fGeoH(NULL),
153  fGeanePropagator(NULL),
154  tofCorr(0),
155  emcCorr(0),
156  fscCorr(0),
157  drcCorr(0),
158  dskCorr(0),
159  richCorr(0),
160  sDir(""),
161  sFile("")
162 {
163  //---
164  fPidChargedCand = new TClonesArray("PndPidCandidate");
165  fPidNeutralCand = new TClonesArray("PndPidCandidate");
166  sDir = "./";
167  sFile = "./pidcorrelator.root";
169 
170  // Resetting MDT geometry parameters
171  for (Int_t mm=0; mm<3; mm++)
172  for (Int_t ll=0; ll<20;ll++)
173  {
174  mdtLayerPos[mm][ll] = -1;
175  mdtIronThickness[mm][ll] = -1;
176  }
177  SetTitle(title);
178  Reset();
179 }
180 
181 //___________________________________________________________
183 
184  // cout << "InitStatus PndPidCorrelator::Init()" << endl;
185 
186  FairRootManager *fManager =FairRootManager::Instance();
187 
188  fTrack = dynamic_cast<TClonesArray *> (fManager->GetObject(fTrackBranch));
189  if ( ! fTrack ) {
190  cout << "-I- PndPidCorrelator::Init: No PndTrack array!" << endl;
191  return kERROR;
192  }
193 
194  // if (fTrackIDBranch!="")
195  // {
196  // fTrackID = dynamic_cast<TClonesArray *> (fManager->GetObject(fTrackIDBranch));
197  // if ( ! fTrackID ) {
198  // cout << "-I- PndPidCorrelator::Init: No PndTrackID array! Switching MC propagation OFF" << endl;
199  // fTrackIDBranch = "";
200  // }
201  // }
202 
203  if (fTrackBranch2!="")
204  {
205  fTrack2 = dynamic_cast<TClonesArray *> (fManager->GetObject(fTrackBranch2));
206  if ( ! fTrack2 ) {
207  cout << "-I- PndPidCorrelator::Init: No 2nd PndTrack array!" << endl;
208  return kERROR;
209  }
210  }
211 
212  // if (fTrackIDBranch2!="")
213  // {
214  // fTrackID2 = dynamic_cast<TClonesArray *> (fManager->GetObject(fTrackIDBranch2));
215  // if ( ! fTrackID2 ) {
216  // cout << "-I- PndPidCorrelator::Init: No 2nd PndTrackID array! Switching MC propagation OFF" << endl;
217  // fTrackIDBranch2 = "";
218  // }
219  // }
220 
221  // *** STT ***
222  if (fSttMode)
223  {
224  if (fMixMode==kFALSE)
225  {
226  fSttHit = dynamic_cast<TClonesArray *> ( fManager->GetObject("STTHit"));
227  if ( fSttHit )
228  {
229  cout << "-I- PndPidCorrelator::Init: Using STTHit" << endl;
230  fSttMode = 2;
231  }
232  else
233  {
234  cout << "-W- PndPidCorrelator::Init: No STT hits array! Switching STT OFF" << endl;
235  fSttMode = 0;
236  }
237  }
238  else
239  {
240  fSttHit = dynamic_cast<TClonesArray *> (fManager->GetObject("STTHitMix"));
241  if ( fSttHit )
242  {
243  cout << "-I- PndPidCorrelator::Init: Using STTHitMix" << endl;
244  fSttMode = 2;
245  }
246  else
247  {
248  cout << "-W- PndPidCorrelator::Init: No STT hits mix array! Switching STT OFF" << endl;
249  fSttMode = 0;
250  }
251  }
252  }
253 
254  // *** FTS ***
255  if (fFtsMode)
256  {
257  if (fMixMode==kFALSE)
258  {
259  fFtsHit =dynamic_cast<TClonesArray *>( fManager->GetObject("FTSHit"));
260  if ( fFtsHit )
261  {
262  cout << "-I- PndPidCorrelator::Init: Using FTSHit" << endl;
263  fFtsMode = 2;
264  }
265  else
266  {
267  cout << "-W- PndPidCorrelator::Init: No FTS hits array! Switching FTS OFF" << endl;
268  fFtsMode = 0;
269  }
270  }
271  else
272  {
273  fFtsHit =dynamic_cast<TClonesArray *> (fManager->GetObject("FTSHitMix"));
274  if ( fFtsHit )
275  {
276  cout << "-I- PndPidCorrelator::Init: Using FTSHitMix" << endl;
277  fFtsMode = 2;
278  }
279  else
280  {
281  cout << "-W- PndPidCorrelator::Init: No FTS hits mix array! Switching FTS OFF" << endl;
282  fFtsMode = 0;
283  }
284  }
285  }
286 
287  // *** MVD ***
288  if (fMvdMode)
289  {
290  if (fMixMode==kFALSE)
291  {
292  fMvdHitsStrip = dynamic_cast<TClonesArray *> ( fManager->GetObject("MVDHitsStrip"));
293  if ( ! fMvdHitsStrip )
294  {
295  cout << "-W- PndPidCorrelator::Init: No MVDHitsStrip array!" << endl;
296  }
297  else fMvdMode = 2;
298 
299  fMvdHitsPixel = dynamic_cast<TClonesArray *> ( fManager->GetObject("MVDHitsPixel"));
300  if ( ! fMvdHitsPixel )
301  {
302  cout << "-W- PndPidCorrelator::Init: No MVDHitsPixel array!" << endl;
303  }
304  else fMvdMode = 2;
305  }
306  else
307  {
308  fMvdHitsStrip = dynamic_cast<TClonesArray *> ( fManager->GetObject("MVDHitsStripMix"));
309  if ( ! fMvdHitsStrip )
310  {
311  cout << "-W- PndPidCorrelator::Init: No MVDHitsStripMix array!" << endl;
312  }
313  else fMvdMode = 2;
314 
315  fMvdHitsPixel = dynamic_cast<TClonesArray *> (fManager->GetObject("MVDHitsPixelMix"));
316  if ( ! fMvdHitsPixel )
317  {
318  cout << "-W- PndPidCorrelator::Init: No MVDHitsPixelMix array!" << endl;
319  }
320  else fMvdMode = 2;
321  }
322 
323  if (( ! fMvdHitsStrip ) && ( ! fMvdHitsPixel ))
324  {
325  cout << "-W- PndPidCorrelator::Init: No MVD hits array! Switching MVD OFF" << endl;
326  fMvdMode = 0;
327  }
328  else
329  {
330  cout << "-I- PndPidCorrelator::Init: Using MVDHit" << endl;
331  }
332  }
333 
334  // *** TOF ***
335  if (fTofMode)
336  {
337  fTofHit = dynamic_cast<TClonesArray *> (fManager->GetObject("SciTHit"));
338  if ( ! fTofHit )
339  {
340  cout << "-W- PndPidCorrelator::Init: No SciTHit array!" << endl;
341  fTofMode = 0;
342  }
343  else
344  {
345  cout << "-I- PndPidCorrelator::Init: Using SciTHit" << endl;
346  fTofMode = 2;
347  }
348  if (fIdeal)
349  {
350  fTofPoint = dynamic_cast<TClonesArray *> (fManager->GetObject("SciTPoint"));
351  if ( ! fTofPoint )
352  {
353  cout << "-W- PndPidCorrelator::Init: No SciTPoint array!" << endl;
354  fTofMode = 0;
355  }
356  }
357  }
358 
359  // *** FTOF ***
360  if (fFtofMode)
361  {
362  fFtofHit = dynamic_cast<TClonesArray *> ( fManager->GetObject("FtofHit"));
363  if ( ! fFtofHit )
364  {
365  cout << "-W- PndPidCorrelator::Init: No FtofHit array!" << endl;
366  fFtofMode = 0;
367  }
368  else
369  {
370  cout << "-I- PndPidCorrelator::Init: Using FtofHit" << endl;
371  fFtofMode = 2;
372  }
373  if (fIdeal)
374  {
375  fFtofPoint = dynamic_cast<TClonesArray *> (fManager->GetObject("FtofPoint"));
376  if ( ! fFtofPoint )
377  {
378  cout << "-W- PndPidCorrelator::Init: No FtofPoint array!" << endl;
379  fFtofMode = 0;
380  }
381  }
382  }
383 
384  // *** EMC ***
385  if (fEmcMode)
386  {
387  fEmcCluster = dynamic_cast<TClonesArray *> ( fManager->GetObject("EmcCluster"));
388  if ( ! fEmcCluster )
389  {
390  cout << "-W- PndPidCorrelator::Init: No EmcCluster array!" << endl;
391  fEmcMode = 0;
392  }
393  else
394  {
395  cout << "-I- PndPidCorrelator::Init: Using EmcCluster" << endl;
396  fEmcMode = 2;
397  }
398 
399  fEmcBump = dynamic_cast<TClonesArray *> (fManager->GetObject("EmcBump"));
400  if ( ! fEmcBump )
401  {
402  cout << "-W- PndPidCorrelator::Init: No EmcBump array!" << endl;
403  }
404  else
405  {
406  cout << "-I- PndPidCorrelator::Init: Using EmcBump" << endl;
407  fEmcMode = 3;
408  }
409 
410  fEmcDigi = dynamic_cast<TClonesArray *> ( fManager->GetObject("EmcDigi"));
411  if ( ! fEmcDigi)
412  {
413  cout << "-W- PndPidCorrelator::Init: No EmcDigi array! No EMC E1/E9/E25 information is propagated!" << endl;
414  }
415  }
416 
417  // *** DRC ***
418  if (fDrcMode)
419  {
420  fDrcHit = dynamic_cast<TClonesArray *> (fManager->GetObject("DrcHit"));
421  if ( ! fDrcHit )
422  {
423  cout << "-W- PndPidCorrelator::Init: No DrcHit array!" << endl;
424  fDrcMode = 0;
425  }
426  else
427  {
428  cout << "-I- PndPidCorrelator::Init: Using DrcHit" << endl;
429  fDrcMode = 2;
430  }
431  }
432 
433  // *** DSK ***
434  if (fDskMode)
435  {
436  fDskParticle = dynamic_cast<TClonesArray *> ( fManager->GetObject("DskParticle"));
437  if ( ! fDskParticle )
438  {
439  cout << "-W- PndPidCorrelator::Init: No DskParticle array!" << endl;
440  fDskMode = 0;
441  }
442  else
443  {
444  cout << "-I- PndPidCorrelator::Init: Using DskParticle" << endl;
445  fDskMode = 2;
446  }
447  }
448 
449  // *** MDT ***
450  if (fMdtMode)
451  {
452  fMdtHit = dynamic_cast<TClonesArray *> (fManager->GetObject("MdtHit"));
453  if ( ! fMdtHit )
454  {
455  cout << "-W- PndPidCorrelator::Init: No MdtHit array!" << endl;
456  fMdtMode = 0;
457  }
458  else
459  {
460  cout << "-I- PndPidCorrelator::Init: Using MdtHit" << endl;
461  fMdtMode = 2;
462  }
463  fMdtTrk = dynamic_cast<TClonesArray *> (fManager->GetObject("MdtTrk"));
464  if ( ! fMdtTrk )
465  {
466  cout << "-W- PndPidCorrelator::Init: No MdtTrk array!" << endl;
467  }
468  else
469  {
470  cout << "-I- PndPidCorrelator::Init: Using MdtTrk" << endl;
471  fMdtMode = 3;
472  }
473  }
474 
475  // *** RICH ***
476  if (fRichMode)
477  {
478  fRichHit = dynamic_cast<TClonesArray *> (fManager->GetObject("RichHit"));
479  if ( ! fRichHit )
480  {
481  cout << "-W- PndPidCorrelator::Init: No RichHit array!" << endl;
482  fRichMode = 0;
483  }
484  else
485  {
486  cout << "-I- PndPidCorrelator::Init: Using RichHit" << endl;
487  fRichMode = 2;
488  }
489  }
490 
491  if (fIdeal)
492  {
493  cout << "-I- PndPidCorrelator::Init: Using MonteCarlo correlation" << endl;
494  fTofPoint =dynamic_cast<TClonesArray *> ( fManager->GetObject("TofPoint"));
495  if ( ! fTofPoint )
496  {
497  cout << "-W- PndPidCorrelator::Init: No TofPoint array!" << endl;
498  fTofMode = 0;
499  }
500  else
501  {
502  cout << "-I- PndPidCorrelator::Init: Using TofPoint" << endl;
503  }
504  fDrcPoint = dynamic_cast<TClonesArray *> (fManager->GetObject("DrcBarPoint"));
505  if ( ! fDrcPoint )
506  {
507  cout << "-W- PndPidCorrelator::Init: No DrcBarPoint array!" << endl;
508  fDrcMode = 0;
509  }
510  else
511  {
512  cout << "-I- PndPidCorrelator::Init: Using DrcPoint" << endl;
513  }
514  fMdtPoint = dynamic_cast<TClonesArray *> ( fManager->GetObject("MdtPoint"));
515  if ( ! fMdtPoint )
516  {
517  cout << "-W- PndPidCorrelator::Init: No MdtPoint array!" << endl;
518  fMdtMode = 0;
519  }
520  else
521  {
522  cout << "-I- PndPidCorrelator::Init: Using MdtPoint" << endl;
523  }
524  fRichPoint = dynamic_cast<TClonesArray *> (fManager->GetObject("RichBarPoint"));
525  if ( ! fRichPoint )
526  {
527  cout << "-W- PndPidCorrelator::Init: No RichBarPoint array!" << endl;
528  fRichMode = 0;
529  }
530  else
531  {
532  cout << "-I- PndPidCorrelator::Init: Using RichBarPoint" << endl;
533  }
534  }
535 
536  Register();
537 
538  fCorrPar->printParams();
539 
540  if (fGeanePro)
541  {
542  cout << "-I- PndPidCorrelator::Init: Using Geane for Track propagation" << endl;
543  fGeanePropagator = new FairGeanePro();
544 
545  if (!fCorrErrorProp)
546  {
547  cout << "-I- PndPidCorrelator::Init: Switching OFF Geane error propagation" << endl;
548  fGeanePropagator->PropagateOnlyParameters();
549  }
550  if (fIdealHyp)
551  {
552  fMcTrack = dynamic_cast<TClonesArray *> (fManager->GetObject("MCTrack"));
553  if ( ! fMcTrack ) {
554  cout << "-I- PndPidCorrelator::Init: No PndMcTrack array! No ideal pid hypothesis is possible!" << endl;
555  return kERROR;
556  }
557  // if (fTrackIDBranch=="") {
558  // cout << "-I- PndPidCorrelator::Init: No TrackID Branch name! No ideal pid hypothesis is possible!" << endl;
559  // return kERROR;
560  // }
561  }
562  else
563  {
564  switch (abs(fPidHyp))
565  {
566  case 0:
567  cout << "-I- PndPidCorrelator::Init: No PID set -> Using default PION hypothesis" << endl;
568  fPidHyp = 211;
569  break;
570 
571  case 11:
572  cout << "-I- PndPidCorrelator::Init: Using ELECTRON hypothesis" << endl;
573  fPidHyp = -11;
574  break;
575 
576  case 13:
577  cout << "-I- PndPidCorrelator::Init: Using MUON hypothesis" << endl;
578  fPidHyp = -13;
579  break;
580 
581  case 211:
582  cout << "-I- PndPidCorrelator::Init: Using PION hypothesis" << endl;
583  fPidHyp = 211;
584  break;
585 
586  case 321:
587  cout << "-I- PndPidCorrelator::Init: Using KAON hypothesis" << endl;
588  fPidHyp = 321;
589  break;
590 
591  case 2212:
592  cout << "-I- PndPidCorrelator::Init: Using PROTON hypothesis" << endl;
593  fPidHyp = 2212;
594  break;
595 
596  default:
597  cout << "-I- PndPidCorrelator::Init: Not recognised PID set -> Using default PION hypothesis" << endl;
598  fPidHyp = 211;
599  break;
600  }
601  }
602  }
603  else
604  {
605  return kFATAL;
606  }
607 
608  if (fMdtMode>0)
609  {
610  if (!MdtGeometry())
611  {
612  cout << "-W- PndPidCorrelator::Init: No MDT geometry ???" << endl;
613  fMdtMode = 0;
614  }
615  }
616 
617  if (fMdtRefit)
618  {
619  fFitter = new PndRecoKalmanFit();
622  if (!fFitter->Init()) return kFATAL;
623  }
624 
625  if (fDebugMode)
626  {
627  r = TFile::Open(sDir+sFile,"RECREATE");
628 
629  tofCorr = new TNtuple("tofCorr","TRACK-TOF Correlation",
630  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:tof_x:tof_y:tof_z:tof_phi:chi2:dphi:len:glen");
631  ftofCorr = new TNtuple("ftofCorr","TRACK-FTOF Correlation",
632  "track_x:track_y:track_z:ver_x:ver_y:ver_z:ver_px:ver_py:ver_pz:track_p:track_charge:track_theta:track_z0:tof_x:tof_y:tof_z:chi2:len:glen:tlen");
633  emcCorr = new TNtuple("emcCorr","TRACK-EMC Correlation",
634  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:emc_x:emc_y:emc_z:emc_phi:chi2:dphi:emc_ene:glen:emc_mod");
635  fscCorr = new TNtuple("fscCorr","TRACK-FSC Correlation",
636  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:emc_x:emc_y:emc_z:emc_phi:chi2:dphi:emc_ene:glen:emc_mod");
637  mdtCorr = new TNtuple("mdtCorr","TRACK-MDT Correlation",
638  "track_x:track_y:track_z:track_dx:track_dy:track_dz:track_phi:track_p:track_charge:track_theta:track_z0:mdt_x:mdt_y:mdt_z:mdt_phi:mdt_p:chi2:mdt_mod:dphi:glen:mdt_count:nhits");
639  drcCorr = new TNtuple("drcCorr","TRACK-DRC Correlation",
640  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:drc_x:drc_y:drc_phi:chi2:drc_thetac:drc_nphot:dphi:glen:flag");
641  dskCorr = new TNtuple("dskCorr","TRACK-DSK Correlation",
642  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:dsk_x:dsk_y:dsk_z:dsk_phi:chi2:dsk_thetac:dsk_nphot:dphi:glen:track_lx:track_ly:track_lz:track_xp:flag");
643  richCorr = new TNtuple("richCorr","TRACK-RICH Correlation",
644  "track_x:track_y:track_z:track_phi:track_p:track_charge:track_theta:track_z0:rich_x:rich_y:rich_phi:chi2:rich_thetac:rich_nphot:dphi:glen:flag");
645  cout << "-I- PndPidCorrelator::Init: Filling Debug histograms" << endl;
646 
647  }
648 
649  // Set Parameters for Emc error matrix
650  if (fEmcMode>0)
651  {
653  {
655  //std::cout<<"PndPidCorrelator: Emc error matrix is read from RTDB"<<std::endl;
656  } else
657  {
658  Int_t emcGeomVersion=fEmcGeoPar->GetGeometryVersion();
659  fEmcErrorMatrix->InitFromFile(emcGeomVersion);
661  //std::cout<<"PndPidCorrelator: Emc error matrix is read from file"<<std::endl;
662  }
664  }
665 
666  if (fFast) cout << "-W- PndPidCorrelator::Init: Using fast correlator!!" << endl;
667 
668  cout << "-I- PndPidCorrelator::Init: Success!" << endl;
669  fEventCounter = 1;
670  return kSUCCESS;
671 }
672 
673 //______________________________________________________
675 
676  // Get run and runtime database
677  FairRun* run = FairRun::Instance();
678  if ( ! run ) Fatal("PndPidCorrelator:: SetParContainers", "No analysis run");
679 
680  FairRuntimeDb* db = run->GetRuntimeDb();
681  if ( ! db ) Fatal("PndPidCorrelator:: SetParContainers", "No runtime database");
682 
683  // Get PID Correlation parameter container
684  fCorrPar = (PndPidCorrPar*) db->getContainer("PndPidCorrPar");
685 
686  // Get Emc geometry parameter container
687  fEmcGeoPar = (PndEmcGeoPar*) db->getContainer("PndEmcGeoPar");
688 
689  // Get Emc error matrix parameter container
690  fEmcErrorMatrixPar = (PndEmcErrorMatrixPar*) db->getContainer("PndEmcErrorMatrixPar");
691 
692  // Get Stt parameter
693  fSttParameters = (PndGeoSttPar*) db->getContainer("PndGeoSttPar");
694  fFtsParameters = (PndGeoFtsPar*) db->getContainer("PndGeoFtsPar");
695 }
696 //______________________________________________________
697 void PndPidCorrelator::Exec(Option_t *) {
698  //-
699  Reset();
700  cout << " ===== PndPidCorrelator - Event: " << fEventCounter;
701  Int_t nTracksTot=0;
702  if (fTrack)
703  {
704  nTracksTot += fTrack->GetEntriesFast();
705  }
706  if (fTrack2)
707  {
708  nTracksTot += fTrack2->GetEntriesFast();
709  }
710 
711  cout << " - Number of tracks for pid " << nTracksTot;
712  if (fEmcMode>0)
713  {
714  PndEmcCluster *tmp_cluster;
715  for(Int_t i=0; i < fEmcCluster->GetEntriesFast();i++)
716  {
717  tmp_cluster = (PndEmcCluster*)fEmcCluster->At(i);
718  if(tmp_cluster->GetModule() < 5 && tmp_cluster->GetModule() >0)
719  {
720  fEmcClstCount++;
721  }
722  if(tmp_cluster->GetModule() == 5)
723  {
724  fFscClstCount++;
725  }
726  }
727  ResetEmcQ();
728  cout << " - Number of Clusters for pid: ";
729  cout << " EMC: " << fEmcClstCount;
730  cout << " FSC: " << fFscClstCount;
731  }
732  cout<<endl;
733 
735  if ((fEmcMode>0) && (!fFast)) ConstructNeutralCandidate();
736  fEventCounter++;
737 }
738 
739 //______________________________________________________
741  //-
742  //FIXME: Use Clear() to save time.
743  //Call Delete() only for too busy events to save Memory
744  fPidChargedCand->Delete();
745  if (fMdtRefit) fMdtTrack->Delete();
746  if (fMdtMode>0) MdtMapping();
747 
748  Int_t nTracks = fTrack->GetEntriesFast();
749  for (Int_t i = 0; i < nTracks; i++) {
750  PndTrack* track = (PndTrack*) fTrack->At(i);
751  PndPidCandidate* dummyCand = new PndPidCandidate();
752  dummyCand->SetFitStatus(-99);
753  Int_t ierr = 0;
754  FairTrackParP par = track->GetParamLast();
755  if ((par.GetMomentum().Mag()<0.05) || (par.GetMomentum().Mag()>15.) ) {
756  AddChargedCandidate(dummyCand);
757  continue; // cut low and high momenta
758  }
759  if ((fFlagCut) && (track->GetFlag()<=0)) {
760  AddChargedCandidate(dummyCand);
761  continue; // cut flag<=0
762  }
763  FairTrackParH *helix = new FairTrackParH(&par, ierr);
764 
765  PndPidCandidate* pidCand = new PndPidCandidate();
766 
767  pidCand->SetPidHypo(fPidHyp); //Walter added
768  // if (fTrackIDBranch!="")
769  // {
770  // PndTrackID* trackID = (PndTrackID*) fTrackID->At(i);
771  std::vector<FairLink> mcTrackLinks = track->GetSortedMCTracks();
772  if (mcTrackLinks.size() > 0) {
773  pidCand->SetMcIndex(mcTrackLinks[0].GetIndex());//todo: replace with GetCloneOfLinke for time-based operation
774  if (fIdealHyp) {
775  PndMCTrack *mcTrack = (PndMCTrack*) fMcTrack->At(
776  mcTrackLinks[0].GetIndex());
777  if (!mcTrack) {
778  fPidHyp = 211;
779  cout
780  << "-I- PndPidCorrelator::ConstructChargedCandidate: PndMCTrack does not exist!! (why?) -> let's try with pion hyp "
781  << endl;
782  } else {
783  fPidHyp = abs(mcTrack->GetPdgCode());
784  }
785  if (fPidHyp >= 100000000) {
786  fPidHyp = 211;
787  std::cout
788  << "-I- PndPidCorrelator::ConstructChargedCandidate: Track is an ion (PDGCode>100000000) -> let's try with pion hyp"
789  << std::endl;
790  }
791 
792  if (abs(fPidHyp) == 13)
793  fPidHyp = -13;
794  if (abs(fPidHyp) == 11)
795  fPidHyp = -11;
796  }
797  }
798  // } else { // added for PndAnalysis, TODO: remove after Fairlinks work with Associators
799  // PndTrackCand trackCand = track->GetTrackCand();
800  // pidCand->SetMcIndex(trackCand.getMcTrackId());
801  // }
802  pidCand->SetTrackIndex(i);
803  pidCand->SetTrackBranch(FairRootManager::Instance()->GetBranchId(fTrackBranch));
804  pidCand->AddLink(FairLink(fTrackBranch, i));
805  if (!GetTrackInfo(track, pidCand)) {
806  AddChargedCandidate(dummyCand);
807  continue;
808  }
809  if ( (fMvdMode==2) && ((fMvdHitsStrip->GetEntriesFast()+fMvdHitsPixel->GetEntriesFast())>0) ) GetMvdInfo(track, pidCand);
810  if ( (fSttMode == 2) && (fSttHit ->GetEntriesFast()>0) ) GetSttInfo(track, pidCand);
811  GetGemInfo(track, pidCand);
812  if (!fFast)
813  {
814  if ( (fTofMode==2) && (fTofHit ->GetEntriesFast()>0) ) GetTofInfo(helix, pidCand);
815  if ( (fEmcMode>0) && (fEmcClstCount>0) ) GetEmcInfo(helix, pidCand);
816  if ( (fMdtMode>0) && (fMdtHit ->GetEntriesFast()>0) ) GetMdtInfo(track, pidCand);
817  if ( (fDrcMode>0) && (fDrcHit ->GetEntriesFast()>0) ) GetDrcInfo(helix, pidCand);
818  if ( (fDskMode>0) && (fDskParticle->GetEntriesFast()>0)) GetDskInfo(helix, pidCand);
819  }
820  AddChargedCandidate(pidCand);
821  }
822 
823  if (fTrackBranch2!="")
824  {
825  Int_t nTracks2 = fTrack2->GetEntriesFast();
826  for (Int_t i = 0; i < nTracks2; i++) {
827  PndTrack* track = (PndTrack*) fTrack2->At(i);
828  PndPidCandidate* dummyCand = new PndPidCandidate();
829  dummyCand->SetFitStatus(-99);
830  Int_t ierr = 0;
831  FairTrackParP par = track->GetParamLast();
832  if ((par.GetMomentum().Mag()<0.1) || (par.GetMomentum().Mag()>20.) ) {
833  AddChargedCandidate(dummyCand);
834  continue; // cut low and high momenta
835  }
836  if ((fFlagCut) && (track->GetFlag()<=0)) {
837  AddChargedCandidate(dummyCand);
838  continue; // cut flag<=0
839  }
840  FairTrackParH *helix = new FairTrackParH(&par, ierr);
841 
842  PndPidCandidate* pidCand = new PndPidCandidate();
843  pidCand->SetPidHypo(fPidHyp); //Walter added
844 
845  // if (fTrackIDBranch2!="")
846  // {
847  std::vector<FairLink> mcTrackLinks = track->GetSortedMCTracks();
848  if (mcTrackLinks.size() > 0) {
849  pidCand->SetMcIndex(mcTrackLinks[0].GetIndex());
850  if (fIdealHyp) {
851  PndMCTrack *mcTrack = (PndMCTrack*) fMcTrack->At(
852  mcTrackLinks[0].GetIndex());
853  if (!mcTrack) {
854  fPidHyp = 211;
855  cout
856  << "-I- PndPidCorrelator::ConstructChargedCandidate: PndMCTrack does not exist!! (why?) -> let's try with pion hyp "
857  << endl;
858  } else {
859  fPidHyp = abs(mcTrack->GetPdgCode());
860  }
861  if (fPidHyp >= 100000000) {
862  fPidHyp = 211;
863  std::cout
864  << "-I- PndPidCorrelator::ConstructChargedCandidate: Track is an ion (PDGCode>100000000) -> let's try with pion hyp"
865  << std::endl;
866  }
867 
868  if (abs(fPidHyp) == 13)
869  fPidHyp = -13;
870  if (abs(fPidHyp) == 11)
871  fPidHyp = -11;
872  }
873  }
874  // } else { // added for PndAnalysis, TODO: remove after Fairlinks work with Associators
875  // PndTrackCand trackCand = track->GetTrackCand();
876  // pidCand->SetMcIndex(trackCand.getMcTrackId());
877  // }
878  pidCand->SetTrackIndex(i);
879  pidCand->SetTrackBranch(FairRootManager::Instance()->GetBranchId(fTrackBranch2));
880  pidCand->AddLink(FairLink(fTrackBranch2, i));
881  if (!GetTrackInfo(track, pidCand)) {
882  AddChargedCandidate(dummyCand);
883  continue;
884  }
885  if ( (fMvdMode==2) && ((fMvdHitsStrip->GetEntriesFast()+fMvdHitsPixel->GetEntriesFast())>0) ) GetMvdInfo(track, pidCand);
886  if ( (fFtsMode == 2) && (fFtsHit ->GetEntriesFast()>0) ) GetFtsInfo(track, pidCand);
887  GetGemInfo(track, pidCand);
888  if (!fFast)
889  {
890  if ( (fFtofMode==2) && (fFtofHit->GetEntriesFast()>0) ) GetFtofInfo(helix, pidCand);
891  if ( (fEmcMode>0) && (fFscClstCount>0) ) GetFscInfo(helix, pidCand);
892  //if ( (fMdtMode>0) && (fMdtHit ->GetEntriesFast()>0) ) GetMdtInfo(track, pidCand);
893  if (mapMdtForward.size()>0) GetFMdtInfo(&par, pidCand);
894  if ( (fRichMode>0) ) GetRichInfo(helix, pidCand);
895  } // end of fast mode
896  AddChargedCandidate(pidCand);
897  }
898  }
899 
900 }
901 
902 //______________________________________________________
904  //-
905  fPidNeutralCand->Delete();
906  TString emcType;
907 
908  Int_t nBumps = 0;
909  if (fEmcMode == 2)
910  {
911  nBumps = fEmcCluster->GetEntriesFast();
912  emcType = "EmcCluster";
913  }
914  else if(fEmcMode == 3)
915  {
916  nBumps = fEmcBump->GetEntriesFast();
917  emcType = "EmcBump";
918  }
919 
920  for (Int_t i = 0; i < nBumps; i++)
921  {
922  PndPidCandidate* dummyCand = new PndPidCandidate();
923  dummyCand->SetFitStatus(-99);
924  PndEmcBump* bump;
925  PndEmcCluster *clu;
926  //Float_t quality = -1.;
927  if (fEmcMode==2)
928  {
929  //if (fClusterList[i]) continue;
930  bump = (PndEmcBump*) fEmcCluster->At(i);
931  clu = (PndEmcBump*) fEmcCluster->At(i);
932  //quality = fClusterQ[i];
933  }
934  else if(fEmcMode == 3)
935  {
936  bump = (PndEmcBump*) fEmcBump->At(i);
937  //if (fClusterList[bump->GetClusterIndex()]) continue; // skip correlated clusters
938  clu = (PndEmcCluster*)fEmcCluster->At(bump->GetClusterIndex());
939  //quality = fClusterQ[bump->GetClusterIndex()];
940  }
941 
942  TVector3 vtx(0,0,0);
943  TVector3 v1=bump->where();
944  TVector3 p3;
945  p3.SetMagThetaPhi(fEmcCalibrator->Energy(bump), v1.Theta(), v1.Phi());
946  TLorentzVector lv(p3,p3.Mag());
948  TMatrixD covP7=fEmcErrorMatrix->GetErrorP7(*clu);
949 
950  Float_t emcQuality = 1000000;
951  TVector3 vertex(0., 0., 0.);
952 
953  Int_t nTracks = 0;
954  if (bump->GetModule()>5) {
955  AddNeutralCandidate(dummyCand);
956  continue; // kick non valid emc modules
957  }
958  if (bump->GetModule()<5) // barrel
959  {
960  nTracks = fTrack->GetEntriesFast();
961  }
962  else // forward
963  {
964  if (fTrackBranch2!="") nTracks = fTrack2->GetEntriesFast();
965  }
966 
967  for (Int_t tt = 0; tt < nTracks; tt++)
968  {
969  PndTrack* track;
970  if (bump->GetModule()<5) // barrel
971  {
972  track = (PndTrack*) fTrack->At(tt);
973  }
974  else // forward
975  {
976  track = (PndTrack*) fTrack2->At(tt);
977  }
978 
979  Int_t ierr = 0;
980  FairTrackParP par = track->GetParamLast();
981  FairTrackParH *helix = new FairTrackParH(&par, ierr);
982 
983  if (bump->GetModule()<5) // barrel
984  {
985  if ((bump->GetModule()<3) && (helix->GetZ()>150.) ) continue; // not consider tracks after emc barrel for BARREL
986  if ((bump->GetModule()==3) && (helix->GetZ()<165.) ) continue; // consider tracks only from last gem plane for FWD
987  if ((bump->GetModule()==4) && (helix->GetZ()>-30.) ) continue; // consider tracks only ending at the back of STT for BKW
988  }
989  else // forward
990  {
991  if (helix->GetZ() < fCorrPar->GetZLastPlane()) continue; // consider tracks only from last fts plane for FSC
992  }
993 
994  if (fGeanePro)
995  { // Overwrites vertex if Geane is used
996  fGeanePropagator->SetPoint(v1);
997  fGeanePropagator->PropagateToPCA(1, 1);
998  vertex.SetXYZ(-10000, -10000, -10000); // reset vertex
999  FairTrackParH *fRes= new FairTrackParH();
1000  Bool_t rc = fGeanePropagator->Propagate(helix, fRes, fPidHyp*par.GetQ()); // First propagation at module
1001  if (!rc) continue;
1002  vertex.SetXYZ(fRes->GetX(), fRes->GetY(), fRes->GetZ());
1003  }
1004 
1005  Float_t dist = (v1-vertex).Mag2();
1006  if ( emcQuality > dist )
1007  {
1008  emcQuality = dist;
1009  }
1010  } // end of track correlation
1011 
1012  if ( emcQuality > fCorrPar->GetEmcNeutralQCut() )
1013  {
1014  PndPidCandidate* pidCand = new PndPidCandidate(0, vtx, lv);
1015  pidCand->SetP4Cov(covP4);
1016  pidCand->SetCov7(covP7);
1017  pidCand->SetEmcRawEnergy(bump->energy());
1018  pidCand->SetEmcCalEnergy(fEmcCalibrator->Energy(bump));
1019  pidCand->SetEmcIndex(i);
1020  pidCand->SetEmcModule(bump->GetModule());
1021  pidCand->SetEmcNumberOfCrystals(bump->NumberOfDigis());
1022  pidCand->SetEmcNumberOfBumps(clu->NBumps());
1023  pidCand->SetEmcQuality(emcQuality);
1024  pidCand->SetLastHit(v1);
1025 
1026  pidCand->SetEmcClusterZ20(bump->Z20());
1027  pidCand->SetEmcClusterZ53(bump->Z53());
1028  pidCand->SetEmcClusterLat(bump->LatMom());
1029  pidCand->SetEmcTimeStamp(bump->GetTimeStamp());
1030  if (fEmcDigi)
1031  {
1032  PndEmcClusterEnergySums esum(*clu, fEmcDigi);
1033  pidCand->SetEmcClusterE1(esum.E1());
1034  pidCand->SetEmcClusterE9(esum.E9());
1035  pidCand->SetEmcClusterE25(esum.E25());
1036  }
1037  pidCand->SetLink(FairLink(emcType, i));
1038 
1039  std::vector<Int_t> mclist = clu->GetMcList();
1040  if (mclist.size()>0)
1041  {
1042  pidCand->SetMcIndex(mclist[0]);
1043  }
1044  AddNeutralCandidate(pidCand);
1045  } else {
1046  AddNeutralCandidate(dummyCand);
1047  }
1048  }
1049 }
1050 
1051 
1052 
1054 {
1055  // Fuction to reset all the quality values for emc-track correlation to -1
1056  fClusterQ.clear();
1057  fClusterList.clear();
1058  for (Int_t ii=0; ii<fEmcCluster->GetEntriesFast(); ii++)
1059  {
1060  fClusterQ[ii] = -1;
1061  fClusterList[ii] = kFALSE;
1062  }
1063 }
1064 
1065 //_________________________________________________________________
1067  //---
1068  TString chargName = "PidChargedCand" + fTrackOutBranch;
1069  //TString chargName = fTrackOutBranch;
1070  FairRootManager::Instance()->Register(chargName,"Pid", fPidChargedCand, kTRUE);
1071  FairRootManager::Instance()->
1072  //Register("PidNeutralCand","Pid", fPidNeutralCand, kTRUE);
1073  Register("PidNeutralCand"+fTrackOutBranch,"Pid", fPidNeutralCand, kTRUE);//Stupid thing to do?? Added for now
1074  if (fMdtRefit)
1075  {
1076  FairRootManager::Instance()->
1077  Register("MdtTrack","Pid", fMdtTrack, kTRUE);
1078  }
1079 }
1080 
1081 //_________________________________________________________________
1083  //---
1084  if (fDebugMode)
1085  {
1086  //TFile *r = TFile::Open(sDir+sFile,"RECREATE");
1087  r->cd();
1088  tofCorr->Write();
1089  ftofCorr->Write();
1090  emcCorr->Write();
1091  fscCorr->Write();
1092  mdtCorr->Write();
1093  drcCorr->Write();
1094  dskCorr->Write();
1095 
1096  r->Save();
1097 
1098  tofCorr->Delete();
1099  ftofCorr->Delete();
1100  emcCorr->Delete();
1101  fscCorr->Delete();
1102  mdtCorr->Delete();
1103  drcCorr->Delete();
1104  dskCorr->Delete();
1105 
1106  tofCorr = 0;
1107  ftofCorr = 0;
1108  emcCorr = 0;
1109  fscCorr = 0;
1110  mdtCorr = 0;
1111  drcCorr = 0;
1112  dskCorr = 0;
1113 
1114  r->Close();
1115  r->Delete();
1116  }
1117 
1118 }
1119 //_________________________________________________________________
1121  //---
1122  fMvdPath = 0.;
1123  fMvdELoss = 0.;
1124  fMvdHitCount = 0;
1125  fEmcClstCount = 0;
1126  fFscClstCount = 0;
1127  fClusterList.clear();
1128  fClusterQ.clear();
1129  mapMdtBarrel.clear();
1130  mapMdtEndcap.clear();
1131  mapMdtForward.clear();
1132 }
1133 
1134 //_________________________________________________________________
1136  // Creates a new hit in the TClonesArray.
1137 
1138  TClonesArray& pidRef = *fPidChargedCand;
1139  Int_t size = pidRef.GetEntriesFast();
1140  return new(pidRef[size]) PndPidCandidate(*cand);
1141 }
1142 
1143 //_________________________________________________________________
1145  // Creates a new hit in the TClonesArray.
1146 
1147  TClonesArray& pidRef = *fPidNeutralCand;
1148  Int_t size = pidRef.GetEntriesFast();
1149  return new(pidRef[size]) PndPidCandidate(*cand);
1150 }
1151 
1152 //_________________________________________________________________
1154  // Creates a new hit in the TClonesArray.
1155 
1156  TClonesArray& pidRef = *fMdtTrack;
1157  Int_t size = pidRef.GetEntriesFast();
1158  return new(pidRef[size]) PndTrack(*track);
1159 }
1160 
void SetTrackIndex(int idx)
void SetEmcNumberOfCrystals(Int_t val)
void SetP4Cov(const TMatrixD &covP4)
void Init(PndEmcErrorMatrixParObject *par)
CandList mclist
virtual void Finish()
Int_t run
Definition: autocutx.C:47
TVector3 where() const
PndRecoKalmanFit * fFitter
Object to retrieve MVD geometry.
map< Int_t, vector< Int_t > > mapMdtBarrel
void SetEmcNumberOfBumps(Int_t val)
Int_t i
Definition: run_full.C:25
PndGeoHandling * fGeoH
Definition: anasim.C:34
virtual void Exec(Option_t *option)
Short_t GetModule() const
void SetEmcModule(Int_t val)
TClonesArray * fMdtHit
PndMdtPoint TCA.
PndRiemannTrack track
Definition: RiemannTest.C:33
Bool_t GetFMdtInfo(FairTrackParP *helix, PndPidCandidate *pid)
TClonesArray * fPidNeutralCand
PndPidCandidate TCA for charged particles.
Bool_t GetMvdInfo(PndTrack *track, PndPidCandidate *pid)
Int_t GetPdgCode() const
Definition: PndMCTrack.h:73
PndPidCandidate * AddNeutralCandidate(PndPidCandidate *cand)
Float_t mdtLayerPos[3][20]
void SetEmcClusterE1(Double_t val)
PndEmcErrorMatrix * fEmcErrorMatrix
EMC error matrix parameters.
Int_t GetFlag() const
Definition: PndTrack.h:33
void SetEmcCalEnergy(Double_t val)
void SetCov7(const TMatrixD &cov7)
TClonesArray * fDskParticle
PndDrcHit TCA.
Double_t par[3]
TFile * r
Geane propagator.
PndEmcErrorMatrixPar * fEmcErrorMatrixPar
EMC geometry parameters.
PndPidCorrPar * fCorrPar
PndRichHit TCA.
void SetMcIndex(int idx)
void SetEmcQuality(Double_t val)
virtual Double_t Energy(PndEmcCluster *clust, Int_t pid=22)=0
Bool_t GetMdtInfo(PndTrack *track, PndPidCandidate *pid)
map< Int_t, Bool_t > fClusterList
cout<< "POINTs for new FwEndCap == "<< tsim-> GetEntriesFast()
TClonesArray * fMdtTrack
PndPidCandidate TCA for neutral particles.
void SetErrorMatrixObject(PndEmcErrorMatrixParObject *ParObject)
Bool_t GetSttInfo(PndTrack *track, PndPidCandidate *pid)
TClonesArray * fFtsHit
PndSttHit TCA.
PndTrack * AddMdtTrack(PndTrack *track)
Float_t GetEmcNeutralQCut()
Definition: PndPidCorrPar.h:16
Bool_t GetTofInfo(FairTrackParH *helix, PndPidCandidate *pid)
const std::vector< Int_t > & GetMcList() const
TClonesArray * fRichHit
PndRichBarPoint TCA.
PndGeoFtsPar * fFtsParameters
STT geometry parameters.
TMatrixD GetErrorP7(const PndEmcCluster &cluster) const
void SetTrackBranch(int idx)
Bool_t GetFscInfo(FairTrackParH *helix, PndPidCandidate *pid)
TClonesArray * fMdtTrk
PndMdtHit TCA.
Bool_t GetRichInfo(FairTrackParH *helix, PndPidCandidate *pid)
PndEmcAbsClusterCalibrator * fEmcCalibrator
FTS geometry parameters.
virtual Double_t E1() const
void InitFromFile(Int_t geomVersion)
h_MC_angle SetTitle("MC truth: opening angle of #pi^{0}")
Bool_t GetFtofInfo(FairTrackParH *helix, PndPidCandidate *pid)
TClonesArray * fSttHit
PndDskParticle TCA //need to change to PndDskHit in future.
Double_t Z53() const
Definition: PndEmcCluster.h:69
Double_t Z20() const
Definition: PndEmcCluster.h:67
TClonesArray * fMvdHitsPixel
PndSdsHit TCA for strip.
virtual void SetParContainers()
void SetEmcClusterE9(Double_t val)
void SetEmcIndex(Int_t val)
Bool_t GetDrcInfo(FairTrackParH *helix, PndPidCandidate *pid)
PndPidCandidate * AddChargedCandidate(PndPidCandidate *cand)
FairTrackParP GetParamLast()
Definition: PndTrack.h:50
Double_t LatMom() const
Definition: PndEmcCluster.h:71
virtual ~PndPidCorrelator()
static PndEmcAbsClusterCalibrator * MakeEmcClusterCalibrator(Int_t method, Int_t version=1)
PndEmcErrorMatrixParObject * GetParObject()
TMatrixD Get4MomentumErrorMatrix(const PndEmcCluster &cluster) const
TClonesArray * fDrcHit
PndDrcBarPoint TCA.
map< Int_t, vector< Int_t > > mapMdtForward
Bool_t GetGemInfo(PndTrack *track, PndPidCandidate *pid)
a cluster (group of neighboring crystals) of hit emc crystals
Definition: PndEmcCluster.h:29
TClonesArray * fTrack2
PndTrackID TCA.
void SetGeane(Bool_t opt=kTRUE)
map< Int_t, Double_t > fClusterQ
TClonesArray * fEmcDigi
PndEmcBump TCA.
static PndGeoHandling * Instance()
FairGeanePro * fGeanePropagator
Refitter for MDT tracks.
TString name
PndGeoSttPar * fSttParameters
EMC error matrix.
TClonesArray * fMdtPoint
PndEmcDigi TCA.
TClonesArray * fMvdHitsStrip
PndTrack TCA for MDT refit.
void SetEmcClusterE25(Double_t val)
TClonesArray * fFtofPoint
PndFtofHit TCA.
TClonesArray * fTofPoint
PndTofHit TCA.
TClonesArray * fPidChargedCand
2nd PndTrackID TCA
Float_t mdtIronThickness[3][20]
Int_t NumberOfDigis() const
void SetFitStatus(Int_t val)
void SetEmcClusterLat(Double_t val)
Int_t NBumps() const
Int_t GetGeometryVersion()
Definition: PndEmcGeoPar.h:25
Int_t GetClusterIndex()
Definition: PndEmcBump.h:54
virtual Double_t E25() const
Double_t const mm
TVector3 v1
Definition: bump_analys.C:40
TClonesArray * fEmcBump
PndEmcCluster TCA.
TClonesArray * fDrcPoint
PndMdtTrk TCA.
virtual Double_t energy() const
void SetEmcTimeStamp(Double_t val)
ClassImp(PndAnaContFact)
PndEmcErrorMatrixParObject * GetParObject()
void SetLastHit(TVector3 &pos)
TClonesArray * fMcTrack
void SetNumIterations(Int_t num)
Bool_t GetDskInfo(FairTrackParH *helix, PndPidCandidate *pid)
virtual Double_t E9() const
Bool_t GetTrackInfo(PndTrack *track, PndPidCandidate *pid)
virtual InitStatus Init()
void SetEmcClusterZ20(Double_t val)
Calculate Error Matrix for the given EmcCluster with parametrization defined by the given parameter P...
void SetPidHypo(int hyp)
PndGeoHandling * fGeoH
PndEmcGeoPar * fEmcGeoPar
Correlation parameters.
void SetEmcClusterZ53(Double_t val)
Bool_t GetFtsInfo(PndTrack *track, PndPidCandidate *pid)
TClonesArray * fTrack
PndMCTrack TCA.
represents a reconstructed (splitted) emc cluster
Definition: PndEmcBump.h:34
void SetEmcRawEnergy(Double_t val)
TClonesArray * fRichPoint
PndFtsHit TCA.
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
TClonesArray * fFtofHit
PndTofPoint TCA.
map< Int_t, vector< Int_t > > mapMdtEndcap
TClonesArray * fTofHit
PndSdsHit TCA for pixel.
Bool_t GetEmcInfo(FairTrackParH *helix, PndPidCandidate *pid)
TClonesArray * fEmcCluster
PndFtofPoint TCA.
Float_t GetZLastPlane()
Definition: PndPidCorrPar.h:22