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