]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIITSMULTRECONSTRUCTOR_H | |
2 | #define ALIITSMULTRECONSTRUCTOR_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //_________________________________________________________________________ | |
7 | // | |
8 | // Implementation of the ITS-SPD trackleter class | |
9 | // | |
10 | // It retrieves clusters in the pixels (theta and phi) and finds tracklets. | |
11 | // These can be used to extract charged particle multiplicity from the ITS. | |
12 | // | |
13 | // A tracklet consists of two ITS clusters, one in the first pixel layer and | |
14 | // one in the second. The clusters are associated if the differences in | |
15 | // Phi (azimuth) and Theta (polar angle) are within fiducial windows. | |
16 | // In case of multiple candidates the candidate with minimum | |
17 | // distance is selected. | |
18 | //_________________________________________________________________________ | |
19 | #include "AliTrackleter.h" | |
20 | ||
21 | class TBits; | |
22 | class TTree; | |
23 | class TH1F; | |
24 | class TH2F; | |
25 | class AliITSDetTypeRec; | |
26 | class AliITSgeom; | |
27 | class AliESDEvent; | |
28 | class AliESDtrack; | |
29 | class AliVertex; | |
30 | class AliESDVertex; | |
31 | class AliMultiplicity; | |
32 | ||
33 | class AliITSMultReconstructor : public AliTrackleter | |
34 | { | |
35 | public: | |
36 | // | |
37 | enum {kClTh,kClPh,kClZ,kClMC0,kClMC1,kClMC2,kClNPar}; | |
38 | enum {kTrTheta,kTrPhi,kTrDPhi,kTrDTheta,kTrLab1,kTrLab2,kClID1,kClID2,kTrNPar}; | |
39 | enum {kSCTh,kSCPh,kSCID,kSCNPar}; | |
40 | enum {kITSTPC,kITSSAP,kITSTPCBit=BIT(kITSTPC),kITSSAPBit=BIT(kITSSAP)}; // RS | |
41 | AliITSMultReconstructor(); | |
42 | virtual ~AliITSMultReconstructor(); | |
43 | ||
44 | void Reconstruct(AliESDEvent* esd, TTree* treeRP); | |
45 | void Reconstruct(TTree* tree, Float_t* vtx, Float_t* vtxRes); // old reconstructor invocation | |
46 | void FindTracklets(const Float_t* vtx); | |
47 | void LoadClusterFiredChips(TTree* tree); | |
48 | void FlagClustersInOverlapRegions(Int_t ic1,Int_t ic2); | |
49 | void FlagTrackClusters(const AliESDtrack* track); | |
50 | void FlagIfSecondary(AliESDtrack* track, const AliVertex* vtx); | |
51 | void FlagV0s(const AliESDVertex *vtx); | |
52 | void ProcessESDTracks(); | |
53 | Bool_t CanBeElectron(const AliESDtrack* trc) const; | |
54 | ||
55 | void CreateMultiplicityObject(); | |
56 | // | |
57 | // Following members are set via AliITSRecoParam | |
58 | void SetPhiWindow(Float_t w=0.08) {fPhiWindow=w;} | |
59 | void SetThetaWindow(Float_t w=0.025) {fThetaWindow=w;} | |
60 | void SetPhiShift(Float_t w=0.0045) {fPhiShift=w;} | |
61 | void SetRemoveClustersFromOverlaps(Bool_t b = kFALSE) {fRemoveClustersFromOverlaps = b;} | |
62 | void SetPhiOverlapCut(Float_t w=0.005) {fPhiOverlapCut=w;} | |
63 | void SetZetaOverlapCut(Float_t w=0.05) {fZetaOverlapCut=w;} | |
64 | ||
65 | Int_t GetNClustersLayer1() const {return fNClustersLay1;} | |
66 | Int_t GetNClustersLayer2() const {return fNClustersLay2;} | |
67 | Int_t GetNTracklets() const {return fNTracklets;} | |
68 | Int_t GetNSingleClusters() const {return fNSingleCluster;} | |
69 | Short_t GetNFiredChips(Int_t layer) const {return fNFiredChips[layer];} | |
70 | ||
71 | Float_t* GetClusterLayer1(Int_t n) {return &fClustersLay1[n*kClNPar];} | |
72 | Float_t* GetClusterLayer2(Int_t n) {return &fClustersLay2[n*kClNPar];} | |
73 | ||
74 | Float_t* GetTracklet(Int_t n) {return fTracklets[n];} | |
75 | Float_t* GetCluster(Int_t n) {return fSClusters[n];} | |
76 | ||
77 | void SetHistOn(Bool_t b=kFALSE) {fHistOn=b;} | |
78 | void SaveHists(); | |
79 | ||
80 | AliITSDetTypeRec *GetDetTypeRec() const {return fDetTypeRec;} | |
81 | void SetDetTypeRec(AliITSDetTypeRec *ptr){fDetTypeRec = ptr;} | |
82 | // | |
83 | void SetCutPxDrSPDin(Float_t v=0.1) { fCutPxDrSPDin = v;} | |
84 | void SetCutPxDrSPDout(Float_t v=0.15) { fCutPxDrSPDout = v;} | |
85 | void SetCutPxDz(Float_t v=0.2) { fCutPxDz = v;} | |
86 | void SetCutDCArz(Float_t v=0.5) { fCutDCArz = v;} | |
87 | void SetCutMinElectronProbTPC(Float_t v=0.5) { fCutMinElectronProbTPC = v;} | |
88 | void SetCutMinElectronProbESD(Float_t v=0.1) { fCutMinElectronProbESD = v;} | |
89 | void SetCutMinP(Float_t v=0.05) { fCutMinP = v;} | |
90 | void SetCutMinRGamma(Float_t v=2.) { fCutMinRGamma = v;} | |
91 | void SetCutMinRK0(Float_t v=1.) { fCutMinRK0 = v;} | |
92 | void SetCutMinPointAngle(Float_t v=0.98) { fCutMinPointAngle = v;} | |
93 | void SetCutMaxDCADauther(Float_t v=0.5) { fCutMaxDCADauther = v;} | |
94 | void SetCutMassGamma(Float_t v=0.03) { fCutMassGamma = v;} | |
95 | void SetCutMassGammaNSigma(Float_t v=5.) { fCutMassGammaNSigma = v;} | |
96 | void SetCutMassK0(Float_t v=0.03) { fCutMassK0 = v;} | |
97 | void SetCutMassK0NSigma(Float_t v=5.) { fCutMassK0NSigma = v;} | |
98 | void SetCutChi2cGamma(Float_t v=2.) { fCutChi2cGamma = v;} | |
99 | void SetCutChi2cK0(Float_t v=2.) { fCutChi2cK0 = v;} | |
100 | void SetCutGammaSFromDecay(Float_t v=-10.) { fCutGammaSFromDecay = v;} | |
101 | void SetCutK0SFromDecay(Float_t v=-10.) { fCutK0SFromDecay = v;} | |
102 | void SetCutMaxDCA(Float_t v=1.) { fCutMaxDCA = v;} | |
103 | // | |
104 | Float_t GetCutPxDrSPDin() const {return fCutPxDrSPDin;} | |
105 | Float_t GetCutPxDrSPDout() const {return fCutPxDrSPDout;} | |
106 | Float_t GetCutPxDz() const {return fCutPxDz;} | |
107 | Float_t GetCutDCArz() const {return fCutDCArz;} | |
108 | Float_t GetCutMinElectronProbTPC() const {return fCutMinElectronProbTPC;} | |
109 | Float_t GetCutMinElectronProbESD() const {return fCutMinElectronProbESD;} | |
110 | Float_t GetCutMinP() const {return fCutMinP;} | |
111 | Float_t GetCutMinRGamma() const {return fCutMinRGamma;} | |
112 | Float_t GetCutMinRK0() const {return fCutMinRK0;} | |
113 | Float_t GetCutMinPointAngle() const {return fCutMinPointAngle;} | |
114 | Float_t GetCutMaxDCADauther() const {return fCutMaxDCADauther;} | |
115 | Float_t GetCutMassGamma() const {return fCutMassGamma;} | |
116 | Float_t GetCutMassGammaNSigma() const {return fCutMassGammaNSigma;} | |
117 | Float_t GetCutMassK0() const {return fCutMassK0;} | |
118 | Float_t GetCutMassK0NSigma() const {return fCutMassK0NSigma;} | |
119 | Float_t GetCutChi2cGamma() const {return fCutChi2cGamma;} | |
120 | Float_t GetCutChi2cK0() const {return fCutChi2cK0;} | |
121 | Float_t GetCutGammaSFromDecay() const {return fCutGammaSFromDecay;} | |
122 | Float_t GetCutK0SFromDecay() const {return fCutK0SFromDecay;} | |
123 | Float_t GetCutMaxDCA() const {return fCutMaxDCA;} | |
124 | // | |
125 | protected: | |
126 | AliITSMultReconstructor(const AliITSMultReconstructor& mr); | |
127 | AliITSMultReconstructor& operator=(const AliITSMultReconstructor& mr); | |
128 | AliITSDetTypeRec* fDetTypeRec; //! pointer to DetTypeRec | |
129 | AliESDEvent* fESDEvent; //! pointer to ESD event | |
130 | TTree* fTreeRP; //! ITS recpoints | |
131 | ||
132 | Char_t* fUsedClusLay1; // RS: flag of clusters usage in ESD tracks: 0=unused, bit0=TPC/ITS+ITSSA, bit1=ITSSA_Pure | |
133 | Char_t* fUsedClusLay2; // RS: flag of clusters usage in ESD tracks: 0=unused, bit0=TPC/ITS+ITSSA, bit1=ITSSA_Pure | |
134 | ||
135 | Float_t* fClustersLay1; // clusters in the 1st layer of ITS | |
136 | Float_t* fClustersLay2; // clusters in the 2nd layer of ITS | |
137 | Int_t* fDetectorIndexClustersLay1; // module index for clusters 1st ITS layer | |
138 | Int_t* fDetectorIndexClustersLay2; // module index for clusters 2nd ITS layer | |
139 | Bool_t* fOverlapFlagClustersLay1; // flag for clusters in the overlap regions 1st ITS layer | |
140 | Bool_t* fOverlapFlagClustersLay2; // flag for clusters in the overlap regions 2nd ITS layer | |
141 | ||
142 | Float_t** fTracklets; // tracklets | |
143 | Float_t** fSClusters; // single clusters (unassociated) | |
144 | ||
145 | Int_t fNClustersLay1; // Number of clusters (Layer1) | |
146 | Int_t fNClustersLay2; // Number of clusters (Layer2) | |
147 | Int_t fNTracklets; // Number of tracklets | |
148 | Int_t fNSingleCluster; // Number of unassociated clusters | |
149 | Short_t fNFiredChips[2]; // Number of fired chips in the two SPD layers | |
150 | // | |
151 | // Following members are set via AliITSRecoParam | |
152 | // | |
153 | Float_t fPhiWindow; // Search window in phi | |
154 | Float_t fThetaWindow; // Search window in theta | |
155 | Float_t fPhiShift; // Phi shift reference value (at 0.5 T) | |
156 | Bool_t fRemoveClustersFromOverlaps; // Option to skip clusters in the overlaps | |
157 | Float_t fPhiOverlapCut; // Fiducial window in phi for overlap cut | |
158 | Float_t fZetaOverlapCut; // Fiducial window in eta for overlap cut | |
159 | ||
160 | // cuts for secondaries identification | |
161 | Float_t fCutPxDrSPDin; // max P*DR for primaries involving at least 1 SPD | |
162 | Float_t fCutPxDrSPDout; // max P*DR for primaries not involving any SPD | |
163 | Float_t fCutPxDz; // max P*DZ for primaries | |
164 | Float_t fCutDCArz; // max DR or DZ for primares | |
165 | // | |
166 | // cuts for flagging tracks in V0s | |
167 | Float_t fCutMinElectronProbTPC; // min probability for e+/e- PID involving TPC | |
168 | Float_t fCutMinElectronProbESD; // min probability for e+/e- PID not involving TPC | |
169 | // | |
170 | Float_t fCutMinP; // min P of V0 | |
171 | Float_t fCutMinRGamma; // min transv. distance from ESDVertex to V0 for gammas | |
172 | Float_t fCutMinRK0; // min transv. distance from ESDVertex to V0 for K0s | |
173 | Float_t fCutMinPointAngle; // min pointing angle cosine | |
174 | Float_t fCutMaxDCADauther; // max DCA of daughters at V0 | |
175 | Float_t fCutMassGamma; // max gamma mass | |
176 | Float_t fCutMassGammaNSigma; // max standard deviations from 0 for gamma | |
177 | Float_t fCutMassK0; // max K0 mass difference from PGD value | |
178 | Float_t fCutMassK0NSigma; // max standard deviations for K0 mass from PDG value | |
179 | Float_t fCutChi2cGamma; // max constrained chi2 cut for gammas | |
180 | Float_t fCutChi2cK0; // max constrained chi2 cut for K0s | |
181 | Float_t fCutGammaSFromDecay; // min path*P for gammas | |
182 | Float_t fCutK0SFromDecay; // min path*P for K0s | |
183 | Float_t fCutMaxDCA; // max DCA for V0 at ESD vertex | |
184 | ||
185 | Bool_t fHistOn; // Option to define and fill the histograms | |
186 | ||
187 | TH1F* fhClustersDPhiAcc; // Phi2 - Phi1 for tracklets | |
188 | TH1F* fhClustersDThetaAcc; // Theta2 - Theta1 for tracklets | |
189 | TH1F* fhClustersDPhiAll; // Phi2 - Phi1 all the combinations | |
190 | TH1F* fhClustersDThetaAll; // Theta2 - Theta1 all the combinations | |
191 | ||
192 | TH2F* fhDPhiVsDThetaAll; // 2D plot for all the combinations | |
193 | TH2F* fhDPhiVsDThetaAcc; // same plot for tracklets | |
194 | ||
195 | TH1F* fhetaTracklets; // Pseudorapidity distr. for tracklets | |
196 | TH1F* fhphiTracklets; // Azimuthal (Phi) distr. for tracklets | |
197 | TH1F* fhetaClustersLay1; // Pseudorapidity distr. for Clusters L. 1 | |
198 | TH1F* fhphiClustersLay1; // Azimuthal (Phi) distr. for Clusters L. 1 | |
199 | ||
200 | ||
201 | void LoadClusterArrays(TTree* tree); | |
202 | ||
203 | ClassDef(AliITSMultReconstructor,7) | |
204 | }; | |
205 | ||
206 | #endif |