]>
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 | ||
7 | // Analysis task for identified PHOS cluster from pi0 and take korrelation betwen hadron-pi0 angel's. | |
8 | /// Authors: Daniil Ponomarenko (Daniil.Ponomarenko@cern.ch) | |
9 | // Dmitry Blau | |
10 | // 07-Feb-2014 | |
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; | |
27 | ||
28 | ||
29 | #include "TArrayD.h" | |
30 | #include "AliAnalysisTaskSE.h" | |
31 | ||
32 | class AliPHOSCorrelations : public AliAnalysisTaskSE | |
33 | { | |
34 | public: | |
35 | enum Period { kUndefinedPeriod, kLHC10h, kLHC11h, kLHC13 }; | |
36 | enum EventSelection { kTotal, kInternalTriggerMaskSelection, kHasVertex, kHasAbsVertex, kHasCentrality, kCentUnderUpperBinUpperEdge, kHasPHOSClusters, kHasTPCTracks, kTotalSelected }; | |
37 | enum HibridCheckVeriable { kOnlyHibridTracks, kWithOutHibridTracks, kAllTracks }; | |
9aed5fcd | 38 | enum PID { kPidAll, kPidCPV, kPidDisp, kPidBoth}; |
67ef08bd | 39 | enum TriggerSelection { kNoSelection, kCentralInclusive, kCentralExclusive, kSemiCentralInclusive, kSemiCentralExclusive, kMBInclusive, kMBExclusive }; |
40 | ||
41 | ||
42 | public: | |
43 | AliPHOSCorrelations(); | |
44 | AliPHOSCorrelations(const char *name, Period period ); | |
45 | virtual ~AliPHOSCorrelations(); | |
46 | ||
47 | virtual void UserCreateOutputObjects(); | |
48 | virtual void UserExec(Option_t *option); | |
49 | // virtual void Terminate(Option_t *); | |
50 | ||
67ef08bd | 51 | void SetHibridGlobalCheking(Int_t hibridCheck = kAllTracks) {fCheckHibridGlobal = hibridCheck; } |
52 | void SetCentralityBinning(const TArrayD& edges, const TArrayI& nMixed); | |
53 | void SetInternalTriggerSelection(TriggerSelection selection) { fInternalTriggerSelection = selection; } | |
54 | void EnableTOFCut(Bool_t enable = kTRUE, Double_t TOFCut = 100.e-9){fTOFCutEnabled=enable; fTOFCut=TOFCut;} | |
d2c19ce3 | 55 | void SetMassWindow(Double_t massMean = 0.135, Double_t massSigma = 0.01) { fMassInvMean = massMean; fMassInvSigma = massSigma; } |
56 | void SetSigmaWidth(Double_t sigmaWidth= 0) { fSigmaWidth = sigmaWidth; } | |
9aed5fcd | 57 | void SetMassMeanParametrs(Double_t p0 = -20.9476, Double_t p1 = 0.1300) {fMassMeanP0 = p0; fMassMeanP1 = p1;} // from mass fit |
58 | void SetMassSigmaParametrs(Double_t p0 = 0.005, Double_t p1 = -0.0001) {fMassSigmaP0 = p0; fMassSigmaP1 = p1;} // from mass fit | |
59 | void SetPeriod(Period period) { fPeriod = period; } | |
67ef08bd | 60 | void SetCentralityBorders (double down = 0., double up = 90.) ; |
61 | void SetPtAssocBins(TArrayD * arr){fAssocBins.Set(arr->GetSize(), arr->GetArray()) ;} | |
62 | ||
63 | void SetCentralityEstimator(const char * centr) {fCentralityEstimator = centr;} | |
64 | void SetEventMixingRPBinning(UInt_t nBins) { fNEMRPBins = nBins; } | |
65 | void SetMaxAbsVertexZ(Float_t z) { fMaxAbsVertexZ = z; } | |
66 | ||
67 | protected: | |
68 | ||
69 | AliPHOSCorrelations(const AliPHOSCorrelations&); // not implemented | |
70 | AliPHOSCorrelations& operator=(const AliPHOSCorrelations&); // not implemented | |
71 | ||
72 | // Histograms and trees. | |
9aed5fcd | 73 | void SetHistPtNumTrigger(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set massive of histograms (1-5). |
74 | void SetHistPtAssoc(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set massive of histograms (1-5). | |
75 | void SetHistMass(Int_t ptMult, Double_t ptMin, Double_t ptMax); // Set other histograms. | |
67ef08bd | 76 | void SetHistEtaPhi(); // Set hists, with track's and cluster's angle distributions. |
d2c19ce3 | 77 | void SetHistPHOSClusterMap(); // XZE distribution in PHOS. |
9aed5fcd | 78 | void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key |
67ef08bd | 79 | void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key |
9aed5fcd | 80 | void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key |
81 | void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z, Double_t w) const ; //Fill 3D histogram witn name key | |
82 | void FillTrackEtaPhi(); // Distribution by track's angles. | |
67ef08bd | 83 | |
84 | void SetESDTrackCuts(); // AliESDtrack cuts ( for esd data ) | |
85 | ||
86 | Bool_t TestMass(Double_t m, Double_t pt) ; | |
9aed5fcd | 87 | Double_t MassMeanFunktion(Double_t &pt) const ; |
88 | Double_t MassSigmaFunktion(Double_t &pt) const ; | |
89 | ||
90 | Double_t GetAssocBin(Double_t pt) const ; | |
91 | ||
92 | Double_t GetEfficiency(Double_t pt) const ; // Return Pi0 efficiency for current pT. | |
93 | ||
94 | Int_t GetModCase(Int_t &mod1, Int_t &mod2) const; // Produce part of module neme for pTetaPhi histogram in mixed events. | |
67ef08bd | 95 | |
96 | Int_t ConvertToInternalRunNumber(Int_t run); | |
97 | ||
9aed5fcd | 98 | void TestTrigger(); |
67ef08bd | 99 | Bool_t RejectTriggerMaskSelection(); |
100 | ||
101 | void SetVertex(); | |
102 | Bool_t RejectEventVertex(); | |
103 | ||
104 | void SetCentrality(); // Find centrality of event. | |
105 | Bool_t RejectEventCentrality(); | |
106 | ||
107 | ||
108 | Int_t GetCentralityBin(Float_t centralityV0M); | |
109 | UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; } | |
110 | ||
111 | void EvalReactionPlane(); // Find RP of event. | |
112 | void EvalV0ReactionPlane(); // Find RP of event. | |
113 | Int_t GetRPBin(); // Return RP (rad). | |
114 | ||
115 | Double_t ApplyFlattening(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening. | |
116 | Double_t ApplyFlatteningV0A(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening. | |
117 | Double_t ApplyFlatteningV0C(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening. | |
118 | ||
9aed5fcd | 119 | void ZeroingVariables(); |
67ef08bd | 120 | |
121 | virtual void SelectPhotonClusters(); | |
122 | void SelectAccosiatedTracks(); | |
123 | ||
124 | void ConsiderPi0s(); | |
9aed5fcd | 125 | void ConsiderPi0sME(); |
67ef08bd | 126 | void ConsiderPi0sMix(); // MIX for catch Mass |
127 | void ConsiderTracksMix(); // MIX for catch Yeild | |
9aed5fcd | 128 | void ConsiderTracksMixME(); |
129 | ||
130 | void TestPi0ME(Int_t ipid, TLorentzVector p12, Int_t modCase); | |
131 | Int_t CheckTriggerEta(Double_t eta); | |
67ef08bd | 132 | |
133 | TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin); | |
134 | TList* GetTracksTPCList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin); | |
135 | ||
136 | void UpdatePhotonLists(); | |
137 | void UpdateTrackLists(); | |
138 | ||
0acaf361 | 139 | void SetGeometry(); |
67ef08bd | 140 | |
141 | Bool_t SelectESDTrack(AliESDtrack * t) const; //estimate if this track can be used for the RP calculation | |
142 | Bool_t SelectAODTrack(AliAODTrack * t) const; //estimate if this track can be used for the RP calculation | |
143 | ||
144 | // Logical and debug. | |
145 | void LogProgress(int step); | |
146 | void LogSelection(int step, int internalRunNumber); | |
147 | ||
148 | // Set / Get parametrs | |
149 | void SetManualV0EPCalc(Bool_t manCalc = true) {fManualV0EPCalc = manCalc;} | |
150 | ||
151 | AliAnalysisUtils* GetAnalysisUtils(); | |
152 | ||
153 | private: | |
d2c19ce3 | 154 | // Geometry |
155 | AliPHOSGeometry* fPHOSGeo; | |
67ef08bd | 156 | // Make output histograms / conteiners. |
157 | TList * fOutputContainer; //final histogram / tree container | |
158 | ||
159 | // cluster cut variables: | |
160 | Double_t fMinClusterEnergy; | |
161 | Double_t fMinBCDistance; //distance to nearest bad channel | |
162 | Int_t fMinNCells; | |
163 | Double_t fMinM02; | |
164 | Bool_t fTOFCutEnabled; | |
165 | Double_t fTOFCut; | |
166 | ||
167 | // Binning, [vtx, centrality, reaction-plane] | |
168 | Int_t fNVtxZBins; | |
169 | TArrayD fCentEdges; // Centrality Bin Lower edges. | |
170 | TArrayI fCentNMixed; // Number of mixed events for each centrality bin. | |
d2c19ce3 | 171 | UInt_t fNEMRPBins; // Binning of Reaction plane. |
172 | TArrayD fAssocBins; // Assoc Pt Bin Lower edges. | |
67ef08bd | 173 | |
174 | // Control variables | |
67ef08bd | 175 | Int_t fCheckHibridGlobal; // For checking/dischecking/passingcheck: t->IsHybridGlobalConstrainedGlobal(); |
9aed5fcd | 176 | Bool_t fPHOSEvent; // PHOS event trigger. |
67ef08bd | 177 | |
178 | // Behavior / cuts | |
179 | Period fPeriod; | |
180 | TriggerSelection fInternalTriggerSelection; | |
181 | Float_t fMaxAbsVertexZ; // in cm. | |
182 | Bool_t fManualV0EPCalc; | |
183 | ||
184 | Double_t fCentCutoffDown; // Ignore Centrality less %. (def = 0%) | |
185 | Double_t fCentCutoffUp; // Ignore Centrality over %. (def = 90%) | |
186 | ||
d2c19ce3 | 187 | Double_t fMassInvMean ; // |
188 | Double_t fMassInvSigma ; // | |
189 | Double_t fSigmaWidth; // 0 = wide | |
67ef08bd | 190 | |
9aed5fcd | 191 | // Funktion of window mass parametrs: [mass, pt] |
192 | Double_t fMassMeanP0; | |
193 | Double_t fMassMeanP1; | |
194 | Double_t fMassSigmaP0; | |
195 | Double_t fMassSigmaP1; | |
196 | ||
67ef08bd | 197 | AliVEvent* fEvent; //! Current event |
198 | AliESDEvent* fEventESD; //! Current event, if ESD. | |
199 | AliAODEvent* fEventAOD; //! Current event, if AOD. | |
200 | AliESDtrackCuts *fESDtrackCuts; // Track cut | |
201 | ||
202 | Int_t fRunNumber; //! run number | |
203 | Int_t fInternalRunNumber ; //!Current internal run number | |
204 | ||
d2c19ce3 | 205 | TProfile* fMultV0; // object containing VZERO calibration information |
206 | Float_t fV0Cpol,fV0Apol; // loaded by OADB | |
207 | Float_t fMeanQ[9][2][2]; // and recentering | |
208 | Float_t fWidthQ[9][2][2]; // | |
209 | TString fEPcalibFileName; | |
67ef08bd | 210 | |
d2c19ce3 | 211 | Double_t fVertex[3]; //! |
212 | TVector3 fVertexVector; //! | |
213 | Int_t fVtxBin; //! | |
67ef08bd | 214 | |
d2c19ce3 | 215 | TString fCentralityEstimator; //! Centrality estimator ("V0M", "ZNA") |
216 | Float_t fCentrality ; //! Centrality of the current event | |
217 | Int_t fCentBin ; //! Current centrality bin | |
67ef08bd | 218 | |
d2c19ce3 | 219 | Bool_t fHaveTPCRP ; //! Is TPC RP defined? |
220 | Float_t fRP ; //! Reaction plane calculated with full TPC | |
221 | Int_t fEMRPBin; //! Event Mixing Reaction Plane Bin | |
67ef08bd | 222 | |
9aed5fcd | 223 | Double_t fMEPhi[4], fMEEta[4], fMEPt[4]; |
224 | Bool_t fMEExists[4]; | |
225 | Int_t fMEModCase[4]; | |
226 | ||
d2c19ce3 | 227 | TClonesArray * fCaloPhotonsPHOS ; //! PHOS photons in current event |
228 | TClonesArray * fTracksTPC ; //! TPC Tracks in current event | |
67ef08bd | 229 | |
d2c19ce3 | 230 | TObjArray * fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons |
231 | TObjArray * fTracksTPCLists; //! array of TList, Containers for events with PHOS photons | |
67ef08bd | 232 | |
d2c19ce3 | 233 | ClassDef(AliPHOSCorrelations, 2); // PHOS analysis task |
67ef08bd | 234 | }; |
235 | ||
d2c19ce3 | 236 | #endif |