]>
Commit | Line | Data |
---|---|---|
d1cf83f5 | 1 | #ifndef AliToyMCReconstruction_H |
2 | #define AliToyMCReconstruction_H | |
3 | ||
a06336b6 | 4 | #include <TString.h> |
d1cf83f5 | 5 | #include <TObject.h> |
38d9d609 | 6 | #include <TClonesArray.h> |
7 | #include <TExMap.h> | |
d1cf83f5 | 8 | |
9 | class TTree; | |
10 | ||
11 | class TTreeSRedirector; | |
12 | class AliExternalTrackParam; | |
510cfcff | 13 | class AliTPCtrackerSector; |
4a777885 | 14 | class AliToyMCEvent; |
223d9e38 | 15 | class AliTPCCorrection; |
79f54519 | 16 | class AliTPCseed; |
502eb90b | 17 | class AliTPCtrackerRow; |
c484014f | 18 | class AliToyMCTrack; |
19 | class AliTPCclusterMI; | |
38d9d609 | 20 | class AliRieman; |
c484014f | 21 | class AliTrackPoint; |
22 | class AliTPCParam; | |
d1cf83f5 | 23 | |
24 | class AliToyMCReconstruction : public TObject { | |
25 | public: | |
26 | AliToyMCReconstruction(); | |
27 | virtual ~AliToyMCReconstruction(); | |
28 | ||
29 | enum ECorrType { | |
30 | kNoCorrection = 0, | |
31 | kTPCCenter, | |
32 | kAverageEta, | |
7f72a764 | 33 | kIdeal, |
88386c5c | 34 | kPreliminaryEta // NOT TO USE (needs fixing!!! Not yet in full code!!!) |
d1cf83f5 | 35 | }; |
36 | ||
e83fd282 | 37 | enum EDet { |
38 | kITS=0, | |
39 | kTPC, | |
40 | kTRD | |
41 | }; | |
42 | ||
4a777885 | 43 | void RunReco(const char* file, Int_t nmaxEv=-1); |
510cfcff | 44 | void RunRecoAllClusters(const char* file, Int_t nmaxEv=-1); |
5993ed4f | 45 | void RunRecoAllClustersStandardTracking(const char* file, Int_t nmaxEv=-1); |
a06336b6 | 46 | |
47 | void RunFullTracking(const char* file, Int_t nmaxEv=-1); | |
4a777885 | 48 | |
d1cf83f5 | 49 | // reconstruction settings |
a06336b6 | 50 | void SetRecoSettings(Bool_t idealTracking, Int_t clusterType, ECorrType correctionType, Int_t seedingRow=130, Int_t seedingDist=10) |
05da1b4e | 51 | { fIdealTracking=idealTracking; fClusterType=clusterType; fSeedingRow=seedingRow, fSeedingDist=seedingDist, fCorrectionType=correctionType; } |
d1cf83f5 | 52 | |
53 | void SetClusterType(Int_t type) { fClusterType = type; } | |
54 | Int_t GetClusterType() const { return fClusterType; } | |
55 | ||
56 | void SetSeedingRow(Int_t row) { fSeedingRow = row; } | |
57 | Int_t GetSeedingRow() const { return fSeedingRow; } | |
58 | ||
59 | void SetSeedingDist(Int_t dist) { fSeedingDist = dist; } | |
60 | Int_t GetSeedingDist() const { return fSeedingDist; } | |
61 | ||
62 | void SetCorrType(ECorrType type) { fCorrectionType = type; } | |
63 | ECorrType GetCorrectionType() const { return fCorrectionType; } | |
64 | ||
600eaa0d | 65 | void SetUseMaterialBudget(Bool_t mat) { fUseMaterial = mat; } |
66 | Bool_t GetUseMaterialBudget() const { return fUseMaterial; } | |
67 | ||
68 | void SetIdealTracking(Bool_t tr) { fIdealTracking = tr; } | |
69 | Bool_t GetIdealTracking() const { return fIdealTracking; } | |
70 | ||
d1cf83f5 | 71 | void SetTree(TTree *tree) { fTree=tree; } |
72 | TTree* GetTree() const { return fTree; } | |
73 | ||
9d548f3c | 74 | AliExternalTrackParam* GetSeedFromTrack(const AliToyMCTrack * const tr, Bool_t forceSeed=kFALSE); |
e83fd282 | 75 | AliExternalTrackParam* GetSeedFromTrackIdeal(const AliToyMCTrack * const tr, EDet det ); |
d1cf83f5 | 76 | AliExternalTrackParam* GetFittedTrackFromSeed(const AliToyMCTrack *tr, const AliExternalTrackParam *seed); |
c0ebc0e0 | 77 | AliExternalTrackParam* GetFittedTrackFromSeedAllClusters(const AliToyMCTrack *tr, const AliExternalTrackParam *seed, Int_t &nClus); |
e83fd282 | 78 | AliExternalTrackParam* GetTrackRefit(const AliToyMCTrack * const tr, EDet det); |
0403120d | 79 | |
80 | AliToyMCTrack *ConvertTPCSeedToToyMCTrack(const AliTPCseed &seed); | |
81 | AliExternalTrackParam* GetRefittedTrack(const AliTPCseed &seed); | |
82 | ||
38d9d609 | 83 | AliTPCclusterMI* FindMiddleCluster(const AliTPCclusterMI *clInner, const AliTPCclusterMI *clOuter, |
84 | Double_t roady, Double_t roadz, | |
85 | AliRieman &seedFit); | |
86 | ||
87 | void AddMiddleClusters(AliTPCseed *seed, | |
88 | const AliTPCclusterMI *clInner, const AliTPCclusterMI *clOuter, | |
89 | Double_t roady, Double_t roadz, | |
90 | Int_t &nTotalClusters, AliRieman &seedFit); | |
9d548f3c | 91 | Int_t MakeSeeds2(TObjArray * arr, Int_t sec, Int_t i1, Int_t i2); |
502eb90b | 92 | void MakeSeeds(TObjArray * arr, Int_t sec, Int_t i1, Int_t i2); |
38d9d609 | 93 | |
9d548f3c | 94 | void SetRieman(const AliTPCseed &seed, AliRieman &rieman); |
95 | void CopyRieman(const AliRieman &from, AliRieman &to); | |
96 | ||
79f54519 | 97 | AliExternalTrackParam* ClusterToTrackAssociation(const AliTPCseed *seed, Int_t trackID, Int_t &nClus); |
9d548f3c | 98 | void ClusterToTrackAssociation(AliTPCseed &seed); |
99 | void AssociateClusters(AliTPCseed &seed, Int_t firstRow, Int_t lastRow, Bool_t direction); | |
100 | ||
d1cf83f5 | 101 | void InitSpaceCharge(); |
102 | ||
c484014f | 103 | void SetLongT0seed(Bool_t l) { fLongT0seed=l; } |
104 | Bool_t GetLongT0seed() const { return fLongT0seed; } | |
105 | ||
9e98dea8 | 106 | static TTree* ConnectTrees(const char* files); |
107 | ||
d1cf83f5 | 108 | Double_t GetVDrift() const; |
109 | Double_t GetZLength(Int_t roc) const; | |
5993ed4f | 110 | |
a06336b6 | 111 | void InitStreamer(TString addName, Int_t level=1); |
c0ebc0e0 | 112 | |
a06336b6 | 113 | void ConnectInputFile(const char* file, Int_t nmaxEv=-1); |
38d9d609 | 114 | void Cleanup(); |
a06336b6 | 115 | |
116 | void DumpTracksToTree(const char* file); | |
38d9d609 | 117 | |
118 | // private: | |
d1cf83f5 | 119 | AliToyMCReconstruction(const AliToyMCReconstruction &rec); |
120 | AliToyMCReconstruction& operator= (AliToyMCReconstruction& rec); | |
121 | ||
122 | void SetTrackPointFromCluster(const AliTPCclusterMI *cl, AliTrackPoint &p); | |
123 | void ClusterToSpacePoint(const AliTPCclusterMI *cl, Float_t xyz[3]); | |
c0ebc0e0 | 124 | |
125 | Int_t LoadInnerSectors(); | |
126 | Int_t LoadOuterSectors(); | |
127 | ||
128 | Int_t GetSector(AliExternalTrackParam *track); | |
129 | void FillSectorStructure(Int_t maxev); | |
a06336b6 | 130 | void FillSectorStructureAC(); |
38d9d609 | 131 | |
132 | void SetupTrackMaps(); | |
a06336b6 | 133 | |
134 | void CookLabel(AliTPCseed *seed, Double_t fraction, Int_t info[5]=0); | |
135 | ||
9d548f3c | 136 | void DumpSeedInfo(TObjArray *arr); |
137 | void DumpTrackInfo(TObjArray *arr); | |
138 | void DumpSeedInfo(const AliToyMCTrack *toyTrack, AliTPCseed *seed); | |
139 | ||
a06336b6 | 140 | |
141 | void MarkClustersUsed(AliTPCseed *seed); | |
9d548f3c | 142 | void ResetClustersZtoTime(AliTPCseed *seed); |
d1cf83f5 | 143 | |
144 | // reco settings | |
145 | Int_t fSeedingRow; // first row used for seeding | |
146 | Int_t fSeedingDist; // distance of seeds | |
147 | Int_t fClusterType; // cluster type to use | |
148 | ECorrType fCorrectionType; // type of space point correction | |
149 | Bool_t fDoTrackFit; // do track fitting | |
150 | Bool_t fUseMaterial; // use material budget in tracking | |
600eaa0d | 151 | Bool_t fIdealTracking; // use ideal coordinates for tracking |
d1cf83f5 | 152 | |
a06336b6 | 153 | Int_t fNmaxEvents; // maximum number of events |
154 | ||
d1cf83f5 | 155 | // current reconstruction info |
156 | Double_t fTime0; // current time0 used for reconstruction | |
600eaa0d | 157 | Bool_t fCreateT0seed; // if current seed is the T0 seed |
c484014f | 158 | Bool_t fLongT0seed; // if we should use a t0 seed including all clusters in the seed range |
d1cf83f5 | 159 | |
160 | TTreeSRedirector *fStreamer; // debug streamer | |
38d9d609 | 161 | TFile *fInputFile; // input file |
d1cf83f5 | 162 | TTree *fTree; // input tree with ToyMC info |
4a777885 | 163 | AliToyMCEvent *fEvent; // input event |
d1cf83f5 | 164 | |
165 | AliTPCParam *fTPCParam; // tpc reco parameters | |
223d9e38 | 166 | AliTPCCorrection *fTPCCorrection; // space charge |
5993ed4f | 167 | |
a06336b6 | 168 | const Int_t fkNSectorInner; //number of inner sectors |
169 | AliTPCtrackerSector *fInnerSectorArray; //array of inner sectors | |
170 | const Int_t fkNSectorOuter; //number of outer sectors | |
171 | AliTPCtrackerSector *fOuterSectorArray; //array of outer sectors | |
38d9d609 | 172 | |
a06336b6 | 173 | TClonesArray fAllClusters; //Array keeping all clusters for free seeding |
38d9d609 | 174 | |
a06336b6 | 175 | TExMap fMapTrackEvent; // map global track number -> event number |
176 | TExMap fMapTrackTrackInEvent; // map global track number -> track in event | |
38d9d609 | 177 | |
a06336b6 | 178 | Bool_t fIsAC; // if we are tracking with sector arrays running from 0-36 rather than 0-18 |
38d9d609 | 179 | |
d1cf83f5 | 180 | ClassDef(AliToyMCReconstruction,0) |
181 | }; | |
182 | ||
183 | ||
184 | #endif |