]>
Commit | Line | Data |
---|---|---|
67ef08bd | 1 | #ifndef AliPHOSCorrelations_cxx |
2 | #define AliPHOSCorrelations_cxx | |
3 | ||
4 | /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7deabbe7 | 7 | // Analysis task for identified PHOS cluster from pi0 and extracting pi0-hadron correlation. |
8 | // Authors: Daniil Ponomarenko <Daniil.Ponomarenko@cern.ch> | |
9 | // Dmitry Blau <Dmitry.Blau@cern.ch> | |
10 | // 09-Jul-2014 | |
67ef08bd | 11 | |
12 | class TClonesArray; | |
13 | class AliStack ; | |
14 | class AliESDtrackCuts; | |
15 | class AliPHOSGeometry; | |
16 | class AliTriggerAnalysis; | |
17 | class AliESDEvent ; | |
18 | class AliPIDResponse; | |
19 | class AliPHOSCalibData ; | |
20 | class AliESDCaloCluster ; | |
21 | class AliESDEvent ; | |
22 | class AliESDtrack ; | |
23 | class AliAODTrack ; | |
24 | class AliVCluster ; | |
25 | class AliAnalysisUtils; | |
26 | class AliEPFlattener; | |
7deabbe7 | 27 | class AliAODInputHandler; |
28 | class AliESDInputHandler; | |
67ef08bd | 29 | |
30 | ||
31 | #include "TArrayD.h" | |
32 | #include "AliAnalysisTaskSE.h" | |
33 | ||
34 | class AliPHOSCorrelations : public AliAnalysisTaskSE | |
35 | { | |
36 | public: | |
37 | enum Period { kUndefinedPeriod, kLHC10h, kLHC11h, kLHC13 }; | |
7deabbe7 | 38 | enum EventSelection { kTotal, kEvent, kEventHandler, kTriggerMaskSelection, kHasVertex, kHasCentrality, kHasPHOSClusters, kHasTPCTracks, kPHOSEvent, kMBEvent, kTotalSelected, kHasAbsVertex }; |
67ef08bd | 39 | enum HibridCheckVeriable { kOnlyHibridTracks, kWithOutHibridTracks, kAllTracks }; |
9aed5fcd | 40 | enum PID { kPidAll, kPidCPV, kPidDisp, kPidBoth}; |
67ef08bd | 41 | |
42 | ||
43 | public: | |
44 | AliPHOSCorrelations(); | |
7deabbe7 | 45 | AliPHOSCorrelations(const char *name); |
67ef08bd | 46 | AliPHOSCorrelations(const char *name, Period period ); |
47 | virtual ~AliPHOSCorrelations(); | |
48 | ||
49 | virtual void UserCreateOutputObjects(); | |
50 | virtual void UserExec(Option_t *option); | |
51 | // virtual void Terminate(Option_t *); | |
52 | ||
67ef08bd | 53 | void SetHibridGlobalCheking(Int_t hibridCheck = kAllTracks) {fCheckHibridGlobal = hibridCheck; } |
7deabbe7 | 54 | void SetAnalysisAlgoritmForReal(TString algoritm = "ME") {algoritm.Contains("ME")?fUseMEAlgoritmForReal = true:fUseMEAlgoritmForReal = false;} |
55 | void SetAnalysisAlgoritmForMix(TString algoritm = "ME") {algoritm.Contains("ME")?fUseMEAlgoritmForMix = true:fUseMEAlgoritmForMix = false;} | |
67ef08bd | 56 | void SetCentralityBinning(const TArrayD& edges, const TArrayI& nMixed); |
67ef08bd | 57 | void EnableTOFCut(Bool_t enable = kTRUE, Double_t TOFCut = 100.e-9){fTOFCutEnabled=enable; fTOFCut=TOFCut;} |
d2c19ce3 | 58 | void SetMassWindow(Double_t massMean = 0.135, Double_t massSigma = 0.01) { fMassInvMean = massMean; fMassInvSigma = massSigma; } |
59 | void SetSigmaWidth(Double_t sigmaWidth= 0) { fSigmaWidth = sigmaWidth; } | |
9aed5fcd | 60 | void SetMassMeanParametrs(Double_t p0 = -20.9476, Double_t p1 = 0.1300) {fMassMeanP0 = p0; fMassMeanP1 = p1;} // from mass fit |
61 | void SetMassSigmaParametrs(Double_t p0 = 0.005, Double_t p1 = -0.0001) {fMassSigmaP0 = p0; fMassSigmaP1 = p1;} // from mass fit | |
62 | void SetPeriod(Period period) { fPeriod = period; } | |
67ef08bd | 63 | void SetCentralityBorders (double down = 0., double up = 90.) ; |
64 | void SetPtAssocBins(TArrayD * arr){fAssocBins.Set(arr->GetSize(), arr->GetArray()) ;} | |
65 | ||
66 | void SetCentralityEstimator(const char * centr) {fCentralityEstimator = centr;} | |
67 | void SetEventMixingRPBinning(UInt_t nBins) { fNEMRPBins = nBins; } | |
68 | void SetMaxAbsVertexZ(Float_t z) { fMaxAbsVertexZ = z; } | |
69 | ||
70 | protected: | |
71 | ||
72 | AliPHOSCorrelations(const AliPHOSCorrelations&); // not implemented | |
73 | AliPHOSCorrelations& operator=(const AliPHOSCorrelations&); // not implemented | |
74 | ||
75 | // Histograms and trees. | |
7deabbe7 | 76 | void SetHistPtNumTrigger(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set massive of histograms (1-5). |
77 | void SetHistPtAssoc(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set massive of histograms (1-5). | |
9aed5fcd | 78 | void SetHistMass(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set other histograms. |
67ef08bd | 79 | void SetHistEtaPhi(); // Set hists, with track's and cluster's angle distributions. |
7deabbe7 | 80 | void SetHistPHOSClusterMap(); // XZE distribution in PHOS. |
81 | void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key | |
82 | void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key | |
83 | void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key | |
9aed5fcd | 84 | void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z, Double_t w) const ; //Fill 3D histogram witn name key |
67ef08bd | 85 | |
86 | void SetESDTrackCuts(); // AliESDtrack cuts ( for esd data ) | |
87 | ||
88 | Bool_t TestMass(Double_t m, Double_t pt) ; | |
9aed5fcd | 89 | Double_t MassMeanFunktion(Double_t &pt) const ; |
90 | Double_t MassSigmaFunktion(Double_t &pt) const ; | |
91 | ||
7deabbe7 | 92 | Double_t GetAssocBin(Double_t pt) const ; //Calculates bin of associated particle pt. |
93 | Double_t GetEfficiency(Double_t pt) const ; // Return Pi0 efficiency for current pT. | |
9aed5fcd | 94 | |
95 | Int_t GetModCase(Int_t &mod1, Int_t &mod2) const; // Produce part of module neme for pTetaPhi histogram in mixed events. | |
67ef08bd | 96 | |
97 | Int_t ConvertToInternalRunNumber(Int_t run); | |
98 | ||
7deabbe7 | 99 | Bool_t RejectTriggerMaskSelection(); // Select event trigger and reject. |
67ef08bd | 100 | |
101 | void SetVertex(); | |
102 | Bool_t RejectEventVertex(); | |
103 | ||
104 | void SetCentrality(); // Find centrality of event. | |
105 | Bool_t RejectEventCentrality(); | |
106 | ||
67ef08bd | 107 | Int_t GetCentralityBin(Float_t centralityV0M); |
108 | UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; } | |
109 | ||
7deabbe7 | 110 | void EvalReactionPlane(); // Find RP of event. |
111 | void EvalV0ReactionPlane(); // Find RP of event. | |
112 | Int_t GetRPBin(); // Return RP (rad). | |
67ef08bd | 113 | |
7deabbe7 | 114 | Double_t ApplyFlattening(Double_t phi, Double_t c) ; // Apply centrality-dependent flattening. |
115 | Double_t ApplyFlatteningV0A(Double_t phi, Double_t c) ; // Apply centrality-dependent flattening. | |
116 | Double_t ApplyFlatteningV0C(Double_t phi, Double_t c) ; // Apply centrality-dependent flattening. | |
67ef08bd | 117 | |
9aed5fcd | 118 | void ZeroingVariables(); |
67ef08bd | 119 | |
120 | virtual void SelectPhotonClusters(); | |
121 | void SelectAccosiatedTracks(); | |
122 | ||
7deabbe7 | 123 | void FillTrackEtaPhi(); // Distribution by track's angles. |
124 | ||
125 | void SelectTriggerPi0ME(); //Select most energetic Pi0 in event. | |
126 | ||
127 | void ConsiderPi0s(); // Consider all Pi0 with all tracks in same event. | |
128 | void ConsiderTracksMix(); // Consider all Pi0 in this event with tracks from MIXing pull. | |
129 | ||
130 | void ConsiderPi0sME(); // Consider the most energetic Pi0 in this event with all tracks of this event. | |
131 | void ConsiderTracksMixME(); // Consider the most energetic Pi0 in this event with all tracks from MIXing pull. | |
132 | ||
67ef08bd | 133 | void ConsiderPi0sMix(); // MIX for catch Mass |
9aed5fcd | 134 | |
7deabbe7 | 135 | void TestPi0ME(Int_t ipid, TLorentzVector p12, Int_t modCase); // Compare Pi0 particles and save most energetic. |
136 | Int_t CheckTriggerEta(Double_t eta); // Return 1 if eta>=0, else 2. | |
67ef08bd | 137 | |
138 | TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin); | |
139 | TList* GetTracksTPCList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin); | |
140 | ||
7deabbe7 | 141 | void UpdatePhotonLists(); // Fill photons in MIXing pull. |
142 | void UpdateTrackLists(); // Fill Tracks in MIXing pull. | |
67ef08bd | 143 | |
0acaf361 | 144 | void SetGeometry(); |
67ef08bd | 145 | |
146 | Bool_t SelectESDTrack(AliESDtrack * t) const; //estimate if this track can be used for the RP calculation | |
147 | Bool_t SelectAODTrack(AliAODTrack * t) const; //estimate if this track can be used for the RP calculation | |
148 | ||
149 | // Logical and debug. | |
150 | void LogProgress(int step); | |
151 | void LogSelection(int step, int internalRunNumber); | |
152 | ||
153 | // Set / Get parametrs | |
154 | void SetManualV0EPCalc(Bool_t manCalc = true) {fManualV0EPCalc = manCalc;} | |
155 | ||
7deabbe7 | 156 | void SetMEExists(const Int_t pid) {fMEExists[pid] = true;} |
157 | Bool_t GetMEExists(const Int_t pid) const {return fMEExists[pid];} | |
158 | ||
159 | void SetMEPhi(const Int_t pid, const Double_t phi) {fMEPhi[pid] = phi;} | |
160 | Double_t GetMEPhi(const Int_t pid) const {return fMEPhi[pid];} | |
161 | ||
162 | void SetMEEta(const Int_t pid, const Double_t eta) {fMEEta[pid] = eta;} | |
163 | Double_t GetMEEta(const Int_t pid) const {return fMEEta[pid];} | |
164 | ||
165 | void SetMEPt(const Int_t pid, const Double_t pT) {fMEPt[pid] = pT;} | |
166 | Double_t GetMEPt(const Int_t pid) const {return fMEPt[pid];} | |
167 | ||
168 | void SetMEModCase(const Int_t pid, const Int_t modcase) {fMEModCase[pid] = modcase;} | |
169 | Int_t GetMEModCase(const Int_t pid) const {return fMEModCase[pid];} | |
170 | ||
171 | ||
67ef08bd | 172 | AliAnalysisUtils* GetAnalysisUtils(); |
173 | ||
174 | private: | |
d2c19ce3 | 175 | // Geometry |
176 | AliPHOSGeometry* fPHOSGeo; | |
7deabbe7 | 177 | // Make output histograms/conteiners. |
67ef08bd | 178 | TList * fOutputContainer; //final histogram / tree container |
179 | ||
180 | // cluster cut variables: | |
7deabbe7 | 181 | Double_t fMinClusterEnergy; // Min energy PHOS's cluster. |
182 | Double_t fMinBCDistance; // Min distance to nearest bad channel | |
183 | Int_t fMinNCells; // Min count of Cells in cluster. | |
184 | Double_t fMinM02; // Min size of M02 in claster. | |
185 | Bool_t fTOFCutEnabled; // Use time of flight or not? | |
186 | Double_t fTOFCut; // Max time of flight. | |
67ef08bd | 187 | |
188 | // Binning, [vtx, centrality, reaction-plane] | |
189 | Int_t fNVtxZBins; | |
190 | TArrayD fCentEdges; // Centrality Bin Lower edges. | |
191 | TArrayI fCentNMixed; // Number of mixed events for each centrality bin. | |
7deabbe7 | 192 | UInt_t fNEMRPBins; // Binning of Reaction plane. |
d2c19ce3 | 193 | TArrayD fAssocBins; // Assoc Pt Bin Lower edges. |
67ef08bd | 194 | |
195 | // Control variables | |
7deabbe7 | 196 | Bool_t fUseMEAlgoritmForReal; // Use common or ME algoritm for analysis real events. |
197 | Bool_t fUseMEAlgoritmForMix; // Use common or ME algoritm for analysis mixed events. | |
67ef08bd | 198 | Int_t fCheckHibridGlobal; // For checking/dischecking/passingcheck: t->IsHybridGlobalConstrainedGlobal(); |
7deabbe7 | 199 | |
200 | // Event selection | |
9aed5fcd | 201 | Bool_t fPHOSEvent; // PHOS event trigger. |
7deabbe7 | 202 | Bool_t fMBEvent; // MB event trigger. |
67ef08bd | 203 | |
204 | // Behavior / cuts | |
205 | Period fPeriod; | |
7deabbe7 | 206 | Float_t fMaxAbsVertexZ; // Maximum distence Z component of vertix in cm. |
207 | Bool_t fManualV0EPCalc; // | |
67ef08bd | 208 | |
209 | Double_t fCentCutoffDown; // Ignore Centrality less %. (def = 0%) | |
210 | Double_t fCentCutoffUp; // Ignore Centrality over %. (def = 90%) | |
211 | ||
7deabbe7 | 212 | Double_t fMassInvMean ; // Mass Pi0. |
213 | Double_t fMassInvSigma ; // Mass width Pi0. | |
214 | Double_t fSigmaWidth; // *N sigma. if 0 will use fMassInvMean+/-fMassInvSigma. Else will calculate using function. | |
67ef08bd | 215 | |
9aed5fcd | 216 | // Funktion of window mass parametrs: [mass, pt] |
217 | Double_t fMassMeanP0; | |
218 | Double_t fMassMeanP1; | |
219 | Double_t fMassSigmaP0; | |
220 | Double_t fMassSigmaP1; | |
221 | ||
67ef08bd | 222 | AliVEvent* fEvent; //! Current event |
223 | AliESDEvent* fEventESD; //! Current event, if ESD. | |
224 | AliAODEvent* fEventAOD; //! Current event, if AOD. | |
7deabbe7 | 225 | AliInputEventHandler *fEventHandler; //! Event trigger bit. |
67ef08bd | 226 | AliESDtrackCuts *fESDtrackCuts; // Track cut |
227 | ||
228 | Int_t fRunNumber; //! run number | |
7deabbe7 | 229 | Int_t fInternalRunNumber ; //! Current internal run number |
67ef08bd | 230 | |
7deabbe7 | 231 | TProfile* fMultV0; // Object containing VZERO calibration information |
232 | Float_t fV0Cpol,fV0Apol; // oaded by OADB | |
d2c19ce3 | 233 | Float_t fMeanQ[9][2][2]; // and recentering |
234 | Float_t fWidthQ[9][2][2]; // | |
7deabbe7 | 235 | TString fEPcalibFileName; // |
67ef08bd | 236 | |
7deabbe7 | 237 | Double_t fVertex[3]; //! Event vertex. |
238 | TVector3 fVertexVector; //! The same. | |
239 | Int_t fVtxBin; //! Vertex bin. | |
67ef08bd | 240 | |
d2c19ce3 | 241 | TString fCentralityEstimator; //! Centrality estimator ("V0M", "ZNA") |
242 | Float_t fCentrality ; //! Centrality of the current event | |
243 | Int_t fCentBin ; //! Current centrality bin | |
67ef08bd | 244 | |
d2c19ce3 | 245 | Bool_t fHaveTPCRP ; //! Is TPC RP defined? |
246 | Float_t fRP ; //! Reaction plane calculated with full TPC | |
247 | Int_t fEMRPBin; //! Event Mixing Reaction Plane Bin | |
67ef08bd | 248 | |
7deabbe7 | 249 | // ME Pi0 selection veriables. 1...4 = all...both pid. |
250 | Bool_t fMEExists[4]; // Does trigger Pi0 exists? | |
251 | Double_t fMEPhi[4]; // Phi ME pi0. | |
252 | Double_t fMEEta[4]; // Eta ME Pi0. | |
253 | Double_t fMEPt[4]; // pT ME Pi0. | |
254 | Int_t fMEModCase[4]; // Pair of modules where photons are observed. | |
9aed5fcd | 255 | |
d2c19ce3 | 256 | TClonesArray * fCaloPhotonsPHOS ; //! PHOS photons in current event |
257 | TClonesArray * fTracksTPC ; //! TPC Tracks in current event | |
67ef08bd | 258 | |
d2c19ce3 | 259 | TObjArray * fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons |
260 | TObjArray * fTracksTPCLists; //! array of TList, Containers for events with PHOS photons | |
67ef08bd | 261 | |
d2c19ce3 | 262 | ClassDef(AliPHOSCorrelations, 2); // PHOS analysis task |
67ef08bd | 263 | }; |
264 | ||
d2c19ce3 | 265 | #endif |