CbmRoot
CbmKFParticleFinder.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //-----------------------------------------------------------
3 
4 #ifndef CbmKFParticleFinder_HH
5 #define CbmKFParticleFinder_HH
6 
7 #include "CbmStsTrack.h"
8 #include "FairTask.h"
9 
10 #include "TString.h"
11 #include <vector>
12 
14 class KFParticleTopoReconstructor;
15 class TClonesArray;
16 class KFParticleFinder;
17 class KFPTrackVector;
18 class CbmMCEventList;
19 class CbmMCDataArray;
20 class CbmVertex;
21 
22 struct KFFieldVector {
23  float fField[10];
24 };
25 
26 class CbmKFParticleFinder : public FairTask {
27 public:
28  // Constructors/Destructors ---------
29  CbmKFParticleFinder(const char* name = "CbmKFParticleFinder",
30  Int_t iVerbose = 0);
32 
33  void UseMCPV() { fPVFindMode = 0; }
37 
38  void SetStsTrackBranchName(const TString& name) {
39  fStsTrackBranchName = name;
40  }
41 
42  virtual InitStatus Init();
43  virtual void Exec(Option_t* opt);
44  virtual void Finish();
45 
46  const KFParticleTopoReconstructor* GetTopoReconstructor() const {
47  return fTopoReconstructor;
48  }
49 
51 
52  // set cuts
53  void SetPrimaryProbCut(float prob);
54 
55  // Set SE analysis
56  void SetSuperEventAnalysis();
57 
58  //KF Particle Finder cuts
59  void SetMaxDistanceBetweenParticlesCut(float cut);
60  void SetLCut(float cut);
61  void SetChiPrimaryCut2D(float cut);
62  void SetChi2Cut2D(float cut);
63  void SetLdLCut2D(float cut);
64  void SetLdLCutXiOmega(float cut);
65  void SetChi2TopoCutXiOmega(float cut);
66  void SetChi2CutXiOmega(float cut);
67  void SetChi2TopoCutResonances(float cut);
68  void SetChi2CutResonances(float cut);
69  void SetPtCutLMVM(float cut);
70  void SetPCutLMVM(float cut);
71  void SetPtCutJPsi(float cut);
72  void SetPtCutCharm(float cut);
73  void SetChiPrimaryCutCharm(float cut);
74  void SetLdLCutCharmManybodyDecays(float cut);
75  void SetChi2TopoCutCharmManybodyDecays(float cut);
76  void SetChi2CutCharmManybodyDecays(float cut);
77  void SetLdLCutCharm2D(float cut);
78  void SetChi2TopoCutCharm2D(float cut);
79  void SetChi2CutCharm2D(float cut);
80 
81  //Add decay to the reconstruction list. By default, if list is empty - all decays are reconstructed.
82  void AddDecayToReconstructionList(int pdg);
83 
84 private:
85  double InversedChi2Prob(double p, int ndf) const;
86  void FillKFPTrackVector(KFPTrackVector* tracks,
87  const std::vector<CbmStsTrack>& vRTracks,
88  const std::vector<KFFieldVector>& vField,
89  const std::vector<int>& pdg,
90  const std::vector<int>& trackId,
91  const std::vector<float>& vChiToPrimVtx,
92  bool atFirstPoint = 1) const;
93 
96 
97  //direct access to the KF Particle Finder object
98  KFParticleFinder* GetKFParticleFinder();
99 
100  //names of input branches
102 
103  //input branches
104  TClonesArray* fTrackArray;
105  TClonesArray* fEvents;
106  CbmMCDataArray* fMCTrackArray; //mc tracks in timeslices
107  TClonesArray* fMCTrackArrayEvent; //mc tracks in event-by-event mode
108  CbmMCEventList* fEventList; //mc event list in timeslice
109  CbmVertex* fCbmPrimVertex; //mc primary vertex
110 
111  //topology reconstructor
112  KFParticleTopoReconstructor* fTopoReconstructor;
113  // KFParticleTopoReconstructor* eventTopoReconstructor;
115 
116  //PID information
118 
119  //for super event analysis
121  std::vector<CbmStsTrack> fSETracks;
122  std::vector<KFFieldVector> fSEField;
123  std::vector<int> fSEpdg;
124  std::vector<int> fSETrackId;
125  std::vector<float> fSEChiPrim;
126 
128 
130 };
131 
132 #endif
CbmKFParticleFinder::fMCTrackArray
CbmMCDataArray * fMCTrackArray
Definition: CbmKFParticleFinder.h:106
CbmKFParticleFinder::SetPrimaryProbCut
void SetPrimaryProbCut(float prob)
Definition: CbmKFParticleFinder.cxx:591
CbmKFParticleFinder::fMCTrackArrayEvent
TClonesArray * fMCTrackArrayEvent
Definition: CbmKFParticleFinder.h:107
CbmKFParticleFinder::Exec
virtual void Exec(Option_t *opt)
Definition: CbmKFParticleFinder.cxx:125
CbmKFParticleFinderPID
Definition: CbmKFParticleFinderPID.h:22
CbmKFParticleFinder::SetChi2CutResonances
void SetChi2CutResonances(float cut)
Definition: CbmKFParticleFinder.cxx:631
CbmKFParticleFinder::fStsTrackBranchName
TString fStsTrackBranchName
Definition: CbmKFParticleFinder.h:101
CbmKFParticleFinder::SetLCut
void SetLCut(float cut)
Definition: CbmKFParticleFinder.cxx:607
CbmKFParticleFinder::ClassDef
ClassDef(CbmKFParticleFinder, 1)
CbmKFParticleFinder::InversedChi2Prob
double InversedChi2Prob(double p, int ndf) const
Definition: CbmKFParticleFinder.cxx:566
CbmKFParticleFinder::AddDecayToReconstructionList
void AddDecayToReconstructionList(int pdg)
Definition: CbmKFParticleFinder.cxx:667
CbmKFParticleFinder
Definition: CbmKFParticleFinder.h:26
CbmKFParticleFinder::SetChi2TopoCutCharm2D
void SetChi2TopoCutCharm2D(float cut)
Definition: CbmKFParticleFinder.cxx:661
CbmKFParticleFinder::SetChiPrimaryCutCharm
void SetChiPrimaryCutCharm(float cut)
Definition: CbmKFParticleFinder.cxx:646
CbmKFParticleFinder::SetChi2Cut2D
void SetChi2Cut2D(float cut)
Definition: CbmKFParticleFinder.cxx:613
CbmKFParticleFinder::ReconstructSinglePV
void ReconstructSinglePV()
Definition: CbmKFParticleFinder.h:34
CbmKFParticleFinder::SetMaxDistanceBetweenParticlesCut
void SetMaxDistanceBetweenParticlesCut(float cut)
Definition: CbmKFParticleFinder.cxx:604
CbmKFParticleFinder::UseMCPV
void UseMCPV()
Definition: CbmKFParticleFinder.h:33
CbmKFParticleFinder::SetSuperEventAnalysis
void SetSuperEventAnalysis()
Definition: CbmKFParticleFinder.cxx:595
CbmKFParticleFinder::RconstructMultiplePV
void RconstructMultiplePV()
Definition: CbmKFParticleFinder.h:35
CbmKFParticleFinder::fSEChiPrim
std::vector< float > fSEChiPrim
Definition: CbmKFParticleFinder.h:125
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmKFParticleFinder::SetLdLCutXiOmega
void SetLdLCutXiOmega(float cut)
Definition: CbmKFParticleFinder.cxx:619
CbmKFParticleFinder::Init
virtual InitStatus Init()
Definition: CbmKFParticleFinder.cxx:59
CbmKFParticleFinder::fCbmPrimVertex
CbmVertex * fCbmPrimVertex
Definition: CbmKFParticleFinder.h:109
CbmKFParticleFinder::SetPtCutCharm
void SetPtCutCharm(float cut)
Definition: CbmKFParticleFinder.cxx:643
CbmKFParticleFinder::SetChi2TopoCutXiOmega
void SetChi2TopoCutXiOmega(float cut)
Definition: CbmKFParticleFinder.cxx:622
CbmKFParticleFinder::SetChi2CutCharm2D
void SetChi2CutCharm2D(float cut)
Definition: CbmKFParticleFinder.cxx:664
CbmKFParticleFinder::SetPtCutJPsi
void SetPtCutJPsi(float cut)
Definition: CbmKFParticleFinder.cxx:640
CbmStsTrack.h
Data class for STS tracks.
CbmKFParticleFinder::fEventList
CbmMCEventList * fEventList
Definition: CbmKFParticleFinder.h:108
CbmKFParticleFinder::fSEpdg
std::vector< int > fSEpdg
Definition: CbmKFParticleFinder.h:123
CbmKFParticleFinder::SetPIDInformation
void SetPIDInformation(CbmKFParticleFinderPID *pid)
Definition: CbmKFParticleFinder.h:50
tracks
TClonesArray * tracks
Definition: Analyze_matching.h:17
KFFieldVector::fField
float fField[10]
Definition: CbmKFParticleFinder.h:23
CbmKFParticleFinder::fPVFindMode
int fPVFindMode
Definition: CbmKFParticleFinder.h:114
CbmKFParticleFinder::GetKFParticleFinder
KFParticleFinder * GetKFParticleFinder()
Definition: CbmKFParticleFinder.cxx:601
CbmKFParticleFinder::fSETracks
std::vector< CbmStsTrack > fSETracks
Definition: CbmKFParticleFinder.h:121
CbmKFParticleFinder::SetPCutLMVM
void SetPCutLMVM(float cut)
Definition: CbmKFParticleFinder.cxx:637
CbmKFParticleFinder::SetChi2TopoCutCharmManybodyDecays
void SetChi2TopoCutCharmManybodyDecays(float cut)
Definition: CbmKFParticleFinder.cxx:652
CbmVertex
Definition: CbmVertex.h:26
CbmKFParticleFinder::fPID
CbmKFParticleFinderPID * fPID
Definition: CbmKFParticleFinder.h:117
KFFieldVector
Definition: CbmKFParticleFinder.h:22
CbmKFParticleFinder::SetChi2TopoCutResonances
void SetChi2TopoCutResonances(float cut)
Definition: CbmKFParticleFinder.cxx:628
CbmKFParticleFinder::CbmKFParticleFinder
CbmKFParticleFinder(const CbmKFParticleFinder &)
CbmKFParticleFinder::CbmKFParticleFinder
CbmKFParticleFinder(const char *name="CbmKFParticleFinder", Int_t iVerbose=0)
Definition: CbmKFParticleFinder.cxx:34
CbmKFParticleFinder::SetChi2CutCharmManybodyDecays
void SetChi2CutCharmManybodyDecays(float cut)
Definition: CbmKFParticleFinder.cxx:655
CbmMCEventList
Container class for MC events with number, file and start time.
Definition: CbmMCEventList.h:38
CbmKFParticleFinder::fSuperEventAnalysis
bool fSuperEventAnalysis
Definition: CbmKFParticleFinder.h:120
CbmKFParticleFinder::fTopoReconstructor
KFParticleTopoReconstructor * fTopoReconstructor
Definition: CbmKFParticleFinder.h:112
CbmKFParticleFinder::FillKFPTrackVector
void FillKFPTrackVector(KFPTrackVector *tracks, const std::vector< CbmStsTrack > &vRTracks, const std::vector< KFFieldVector > &vField, const std::vector< int > &pdg, const std::vector< int > &trackId, const std::vector< float > &vChiToPrimVtx, bool atFirstPoint=1) const
Definition: CbmKFParticleFinder.cxx:462
CbmKFParticleFinder::Finish
virtual void Finish()
Definition: CbmKFParticleFinder.cxx:431
CbmKFParticleFinder::SetLdLCutCharm2D
void SetLdLCutCharm2D(float cut)
Definition: CbmKFParticleFinder.cxx:658
CbmKFParticleFinder::GetTopoReconstructor
const KFParticleTopoReconstructor * GetTopoReconstructor() const
Definition: CbmKFParticleFinder.h:46
CbmKFParticleFinder::fTrackArray
TClonesArray * fTrackArray
Name of the input TCA with reco tracks.
Definition: CbmKFParticleFinder.h:104
CbmKFParticleFinder::SetStsTrackBranchName
void SetStsTrackBranchName(const TString &name)
Definition: CbmKFParticleFinder.h:38
CbmKFParticleFinder::SetPtCutLMVM
void SetPtCutLMVM(float cut)
Definition: CbmKFParticleFinder.cxx:634
CbmKFParticleFinder::operator=
const CbmKFParticleFinder & operator=(const CbmKFParticleFinder &)
CbmKFParticleFinder::SetLdLCut2D
void SetLdLCut2D(float cut)
Definition: CbmKFParticleFinder.cxx:616
CbmKFParticleFinder::UseReconstructedPV
void UseReconstructedPV()
Definition: CbmKFParticleFinder.h:36
CbmKFParticleFinder::fSEField
std::vector< KFFieldVector > fSEField
Definition: CbmKFParticleFinder.h:122
CbmKFParticleFinder::SetLdLCutCharmManybodyDecays
void SetLdLCutCharmManybodyDecays(float cut)
Definition: CbmKFParticleFinder.cxx:649
CbmKFParticleFinder::fSETrackId
std::vector< int > fSETrackId
Definition: CbmKFParticleFinder.h:124
CbmKFParticleFinder::~CbmKFParticleFinder
~CbmKFParticleFinder()
Definition: CbmKFParticleFinder.cxx:55
CbmKFParticleFinder::fEvents
TClonesArray * fEvents
Definition: CbmKFParticleFinder.h:105
CbmKFParticleFinder::fTimeSliceMode
bool fTimeSliceMode
Definition: CbmKFParticleFinder.h:127
CbmKFParticleFinder::SetChiPrimaryCut2D
void SetChiPrimaryCut2D(float cut)
Definition: CbmKFParticleFinder.cxx:610
CbmKFParticleFinder::SetChi2CutXiOmega
void SetChi2CutXiOmega(float cut)
Definition: CbmKFParticleFinder.cxx:625