1 #ifndef AliPHOSCorrelations_cxx
2 #define AliPHOSCorrelations_cxx
4 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
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)
14 class AliESDtrackCuts;
15 class AliPHOSGeometry;
16 class AliTriggerAnalysis;
19 class AliPHOSCalibData ;
20 class AliESDCaloCluster ;
25 class AliAnalysisUtils;
30 #include "AliAnalysisTaskSE.h"
32 class AliPHOSCorrelations : public AliAnalysisTaskSE
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 };
38 enum PID { kPidAll, kPidCPV, kPidDisp, kPidBoth};
39 enum TriggerSelection { kNoSelection, kCentralInclusive, kCentralExclusive, kSemiCentralInclusive, kSemiCentralExclusive, kMBInclusive, kMBExclusive };
43 AliPHOSCorrelations();
44 AliPHOSCorrelations(const char *name, Period period );
45 virtual ~AliPHOSCorrelations();
47 virtual void UserCreateOutputObjects();
48 virtual void UserExec(Option_t *option);
49 // virtual void Terminate(Option_t *);
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;}
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; }
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; }
60 void SetCentralityBorders (double down = 0., double up = 90.) ;
61 void SetPtAssocBins(TArrayD * arr){fAssocBins.Set(arr->GetSize(), arr->GetArray()) ;}
63 void SetCentralityEstimator(const char * centr) {fCentralityEstimator = centr;}
64 void SetEventMixingRPBinning(UInt_t nBins) { fNEMRPBins = nBins; }
65 void SetMaxAbsVertexZ(Float_t z) { fMaxAbsVertexZ = z; }
69 AliPHOSCorrelations(const AliPHOSCorrelations&); // not implemented
70 AliPHOSCorrelations& operator=(const AliPHOSCorrelations&); // not implemented
72 // Histograms and trees.
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.
76 void SetHistEtaPhi(); // Set hists, with track's and cluster's angle distributions.
77 void SetHistPHOSClusterMap(); // XZE distribution in PHOS.
78 void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
79 void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
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.
84 void SetESDTrackCuts(); // AliESDtrack cuts ( for esd data )
86 Bool_t TestMass(Double_t m, Double_t pt) ;
87 Double_t MassMeanFunktion(Double_t &pt) const ;
88 Double_t MassSigmaFunktion(Double_t &pt) const ;
90 Double_t GetAssocBin(Double_t pt) const ;
92 Double_t GetEfficiency(Double_t pt) const ; // Return Pi0 efficiency for current pT.
94 Int_t GetModCase(Int_t &mod1, Int_t &mod2) const; // Produce part of module neme for pTetaPhi histogram in mixed events.
96 Int_t ConvertToInternalRunNumber(Int_t run);
99 Bool_t RejectTriggerMaskSelection();
102 Bool_t RejectEventVertex();
104 void SetCentrality(); // Find centrality of event.
105 Bool_t RejectEventCentrality();
108 Int_t GetCentralityBin(Float_t centralityV0M);
109 UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; }
111 void EvalReactionPlane(); // Find RP of event.
112 void EvalV0ReactionPlane(); // Find RP of event.
113 Int_t GetRPBin(); // Return RP (rad).
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.
119 void ZeroingVariables();
121 virtual void SelectPhotonClusters();
122 void SelectAccosiatedTracks();
125 void ConsiderPi0sME();
126 void ConsiderPi0sMix(); // MIX for catch Mass
127 void ConsiderTracksMix(); // MIX for catch Yeild
128 void ConsiderTracksMixME();
130 void TestPi0ME(Int_t ipid, TLorentzVector p12, Int_t modCase);
131 Int_t CheckTriggerEta(Double_t eta);
133 TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
134 TList* GetTracksTPCList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
136 void UpdatePhotonLists();
137 void UpdateTrackLists();
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
144 // Logical and debug.
145 void LogProgress(int step);
146 void LogSelection(int step, int internalRunNumber);
148 // Set / Get parametrs
149 void SetManualV0EPCalc(Bool_t manCalc = true) {fManualV0EPCalc = manCalc;}
151 AliAnalysisUtils* GetAnalysisUtils();
155 AliPHOSGeometry* fPHOSGeo;
156 // Make output histograms / conteiners.
157 TList * fOutputContainer; //final histogram / tree container
159 // cluster cut variables:
160 Double_t fMinClusterEnergy;
161 Double_t fMinBCDistance; //distance to nearest bad channel
164 Bool_t fTOFCutEnabled;
167 // Binning, [vtx, centrality, reaction-plane]
169 TArrayD fCentEdges; // Centrality Bin Lower edges.
170 TArrayI fCentNMixed; // Number of mixed events for each centrality bin.
171 UInt_t fNEMRPBins; // Binning of Reaction plane.
172 TArrayD fAssocBins; // Assoc Pt Bin Lower edges.
175 Int_t fCheckHibridGlobal; // For checking/dischecking/passingcheck: t->IsHybridGlobalConstrainedGlobal();
176 Bool_t fPHOSEvent; // PHOS event trigger.
180 TriggerSelection fInternalTriggerSelection;
181 Float_t fMaxAbsVertexZ; // in cm.
182 Bool_t fManualV0EPCalc;
184 Double_t fCentCutoffDown; // Ignore Centrality less %. (def = 0%)
185 Double_t fCentCutoffUp; // Ignore Centrality over %. (def = 90%)
187 Double_t fMassInvMean ; //
188 Double_t fMassInvSigma ; //
189 Double_t fSigmaWidth; // 0 = wide
191 // Funktion of window mass parametrs: [mass, pt]
192 Double_t fMassMeanP0;
193 Double_t fMassMeanP1;
194 Double_t fMassSigmaP0;
195 Double_t fMassSigmaP1;
197 AliVEvent* fEvent; //! Current event
198 AliESDEvent* fEventESD; //! Current event, if ESD.
199 AliAODEvent* fEventAOD; //! Current event, if AOD.
200 AliESDtrackCuts *fESDtrackCuts; // Track cut
202 Int_t fRunNumber; //! run number
203 Int_t fInternalRunNumber ; //!Current internal run number
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;
211 Double_t fVertex[3]; //!
212 TVector3 fVertexVector; //!
215 TString fCentralityEstimator; //! Centrality estimator ("V0M", "ZNA")
216 Float_t fCentrality ; //! Centrality of the current event
217 Int_t fCentBin ; //! Current centrality bin
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
223 Double_t fMEPhi[4], fMEEta[4], fMEPt[4];
227 TClonesArray * fCaloPhotonsPHOS ; //! PHOS photons in current event
228 TClonesArray * fTracksTPC ; //! TPC Tracks in current event
230 TObjArray * fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons
231 TObjArray * fTracksTPCLists; //! array of TList, Containers for events with PHOS photons
233 ClassDef(AliPHOSCorrelations, 2); // PHOS analysis task