]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetSpectra.h
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / UserTasks / AliAnalysisTaskHJetSpectra.h
CommitLineData
2cc66a40 1#ifndef ALIANALYSISTASKHJETSPECTRA_H
2#define ALIANALYSISTASKHJETSPECTRA_H
3
4
5class TH1I;
6class TH1F;
7class TH2F;
8class TH2D;
9class TH1D;
10class THnSparse;
11class TProfile;
12class TList;
13class TClonesArray;
14class TString;
15class AliEmcalJet;
16class AliRhoParameter;
17class AliVParticle;
18class AliLog;
19class AliAnalysisUtils;
20class TRandom3;
21
22// ANALYSIS OF HIGH PT HADRON TRIGGER ASSOCIATED SPECTRUM OF RECOIL JETS IN P+PB
23// Author Filip Krizek (17.May. 2014)
24
25class AliAnalysisTaskHJetSpectra : public AliAnalysisTaskSE {
26 public:
27 // ######### CONTRUCTORS/DESTRUCTORS AND STD FUNCTIONS
28 AliAnalysisTaskHJetSpectra();
29 AliAnalysisTaskHJetSpectra(const char *name, const char* trackArrayName, const char* jetArrayName, const char* backgroundJetArrayName);
30 virtual ~AliAnalysisTaskHJetSpectra();
31 virtual void UserCreateOutputObjects();
32 virtual void UserExec(Option_t *option);
33 virtual Bool_t UserNotify();
34 virtual void Terminate(Option_t *);
35
36 // ######### SETTERS/GETTERS
9d6abaad 37 void SetAnalyzePythia(Bool_t val) { if(val) fAnalyzePythia = kTRUE;}
38 void SetAnalyzeMC(Int_t val);
2cc66a40 39 void SetUseDefaultVertexCut (Bool_t val) {fUseDefaultVertexCut = val;}
40 void SetUsePileUpCut (Bool_t val) {fUsePileUpCut = val;}
41 void SetNumberOfCentralityBins(Int_t val) {fNumberOfCentralityBins = val;}
42 void SetSignalJetMinArea(Double_t minArea) {fMinJetArea = minArea;}
43 void SetRandConeRadius(Double_t radius) {fRandConeRadius = radius;}
44 void SetSignalJetRadius(Double_t radius) {fSignalJetRadius = radius;}
45 void SetBackgroundJetRadius(Double_t radius) {fBackgroundJetRadius = radius;}
46 void SetMinPtOfJetsToBeRemovedInBg(Double_t minPt) {fBackgroundJetPtMin = minPt;}
47 void SetCentralityType(const char* type) {fCentralityType = type;}
48 void SetExternalRhoTaskName(const char* name) {fRhoTaskName = name;}
49 void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius, Double_t bgrdJetRadius){
50 fTrackEtaWindow = trackEta;
51 fSignalJetRadius = signalJetRadius;
52 fBackgroundJetRadius = bgrdJetRadius;
53 fSignalJetEtaWindow = fTrackEtaWindow-fSignalJetRadius;
54 fBackgroundJetEtaWindow = fTrackEtaWindow-fBackgroundJetRadius;}
55
56 void SetTT(Double_t ttlow, Double_t tthigh){ fTTlow = ttlow; fTThigh = tthigh; }
57 void SetTTType(Int_t tttype){ fTTtype = tttype;}
58 void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
59 void SetDoubleBinPrecision(Bool_t db){ fUseDoubleBinPrecision = db;}
60 //void SetMC(Bool_t mc){ fIsMC = mc; };
61 void SetNofRandomCones(Int_t nrc){ fNofRandomCones = nrc;}
62
63 private:
64
65 // ######### MAIN CALCULATION FUNCTIONS
66 void GetDeltaPt(Double_t rho1, Double_t &dpt1,
67 Double_t rho2, Double_t &dpt2,
9d6abaad 68 Double_t rho3, Double_t &dpt3,
69 Double_t &rcPhi, Double_t &rcEta,
70 Double_t leadingJetExclusionProbability = 0);
71
2cc66a40 72
73
74 Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius);
b4e22a71 75 Double_t GetPtHard();
9d6abaad 76 Double_t GetImpactParameter();
77 Double_t GetSimPrimaryVertex();
2cc66a40 78//FK// Double_t GetPythiaTrials();
79
80 void GetPerpendicularCone(Double_t vecPhi, Double_t vecTheta, Double_t& conePt);
81
82 // ######### CHECK FUNCTIONS
83 Bool_t IsTrackInAcceptance(AliVParticle* track);
84 Bool_t IsEventInAcceptance(AliVEvent* event);
85 Bool_t IsBackgroundJetInAcceptance(AliEmcalJet* jet);
86 Bool_t IsSignalJetInAcceptance(AliEmcalJet* jet);
87
88
89 Double_t RelativePhi(Double_t mphi,Double_t vphi);
90 Double_t EstimateBgRhoMedian();
91 Double_t EstimateBgCone();
92 Double_t GetExternalRho();
93
9d6abaad 94 Bool_t DistantCones(Double_t phi1, Double_t eta1, Double_t r1, Double_t phi2, Double_t eta2, Double_t r2);
95
2cc66a40 96 // ######### STANDARD FUNCTIONS
97 void Calculate(AliVEvent* event);
98 void ExecOnce();
99
100 TList* fOutputList; //! Output list
101 // ########## USAGE TRIGGERS
102 Bool_t fAnalyzePythia; // trigger if pythia properties should be processed
9d6abaad 103 Bool_t fAnalyzeHijing; // trigger if pythia properties should be processed
2cc66a40 104 Bool_t fIsKinematics; // trigger if data is kinematics only (for naming reasons)
105 Bool_t fUseDefaultVertexCut; // trigger if automatic vertex cut from helper class should be done
106 Bool_t fUsePileUpCut; // trigger if pileup cut should be done
107
108
109 // ########## SOURCE INFORMATION
110 TClonesArray* fJetArray; //! object containing the jets
111 TClonesArray* fTrackArray; //! object containing the tracks
112 TClonesArray* fBackgroundJetArray; //! object containing background jets
113 TString* fJetArrayName; // name of object containing the jets
114 TString* fTrackArrayName; // name of object containing the tracks
115 TString* fBackgroundJetArrayName;// name of object containing event wise bckgrds
116 TString fRhoTaskName; // name of rho CMS bg task for this analysis
117 // ########## JET/DIJET/RC PROPERTIES
118 Double_t fRandConeRadius; // Radius for the random cones
119 Double_t fRandConeRadiusSquared; // Radius for the random cones squared
120 Double_t fSignalJetRadius; // Radius for the signal jets
121 Double_t fBackgroundJetRadius; // Radius for the jets to be removed from bg
122 Double_t fBackgroundJetPtMin; // Minimum pt of jets which are ignored during bg calculation
123 // ########## CUTS
124 Double_t fSignalJetEtaWindow; // +- window in eta for signal jets
125 Double_t fBackgroundJetEtaWindow;// +- window in eta for background jets
126 Double_t fTrackEtaWindow; // +- window in eta for tracks
127 Double_t fMinTrackPt; // Min track pt to be accepted
128 Double_t fMinJetArea; // Min jet area to be accepted
129 Int_t fNumberOfCentralityBins;// Number of centrality bins used for histograms
130 TString fCentralityType; // Used centrality estimate (V0A, V0C, V0M, ...)
131
132 // ########## EVENT PROPERTIES
133 Double_t fCrossSection; //! value is filled, if pythia header is accessible
134 Double_t fTrials; //! value is filled, if pythia header is accessible
9d6abaad 135 Double_t fImpParam; //! impact parameter from hijing
2cc66a40 136
137 // ########## GENERAL ////VARS
138 TRandom3* fRandom; //! A random number
139 AliAnalysisUtils* fHelperClass; //! Vertex selection helper
140 Bool_t fInitialized; //! trigger if tracks/jets are loaded initiates calling ExecOnce
141
142
143 Double_t fTTlow; //trigger particles TT bin lower boundary
144 Double_t fTThigh; //trigger particles TT bin upper boundary
145 Int_t fTTtype; //trigger particle type 0=single inclusive, 2 = inclusive
146 Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
147 Bool_t fUseDoubleBinPrecision; //use double bin precision
148
149 TH1I *fHistEvtSelection; //! event statistics
150 TH2F *fh2Ntriggers; //! trigger counter
9d6abaad 151 THnSparse *fHJetSpec;//! TT associated spectrum of jets
152 THnSparse *fHJetSpecSubUeMedian;//! TT associated spectrum of jets, jetPT corredted for UE cell median
153 THnSparse *fHJetSpecSubUeCone;//! TT associated spectrum of jets, jetPT corredted for UE perp cone
154 THnSparse *fHJetSpecSubUeCMS; //! TT associated spectrum of jets, jetPT corredted for UE CMS
2cc66a40 155
156 TH2F *fhRhoCellMedian; //! X=rho from cell median Y=centrality
157 TH2F *fhRhoCone; //! X=rho from perp cone, Y=centrality
158 TH2F *fhRhoCMS; //! X=rho from CMS, Y=centrality
159 TH2F *fhRhoCellMedianIncl; //! X=rho from cell median Y=centrality
160 TH2F *fhRhoConeIncl; //! X=rho from perp cone, Y=centrality
161 TH2F *fhRhoCMSIncl; //! X=rho from CMS, Y=centrality
162
163 TH1F *fARhoCellMedian;//! jet area times rho from cell median
164 TH1F *fARhoCone; //! jet area times rho from perp cone
165 TH1F *fARhoCMS;//! jet area times rho from CMS
166
167 TH2D *fhDeltaPtMedian; //! delta pT from RndCone using rho from cell median high pT particle in event
168 TH2D *fhDeltaPtCone; //! delta pT from RndCone using rho from perp cone high pT particle in event
169 TH2D *fhDeltaPtCMS; //! delta pT from RndCone using rho CMS high pT particle in event
170 TH2D *fhDeltaPtMedianIncl; //! delta pT from RndCone using rho from cell median inclusive event
171 TH2D *fhDeltaPtConeIncl; //! delta pT from RndCone using rho from perp cone inclusive event
172 TH2D *fhDeltaPtCMSIncl; //! delta pT from RndCone using rho CMS inclusive event
173
9d6abaad 174 TH2D *fhDeltaPtMedianNearSide; //! delta pt fluctuations from near side w.r.t. trigger
175 TH2D *fhDeltaPtMedianAwaySide;//! delta pt from away side
176 TH2D *fhDeltaPtCMSNearSide;//! delta pt fluctuations from near side w.r.t. trigger
177 TH2D *fhDeltaPtCMSAwaySide;//! delta pt from away side
178
179 TH2D *fhDeltaPtMedianExclTrigCone;//! delta pt exclude a cone around trigger
180 TH2D *fhDeltaPtCMSExclTrigCone;//! delta pt exclude a cone around trigger
181
182 TH2D *fhDeltaPtMedianExclAwayJet;//! delta pt exclude a cone around leading jet on away side
183 TH2D *fhDeltaPtCMSExclAwayJet;//! delta pt exclude a cone around leading jet on away side
184
185
2cc66a40 186
187 TH2F *fhJetPhi; //! jet phi vs jet pT
188 TH2F *fhTrackPhi; //! track phi vs track pT
189 TH2F *fhJetEta; //! jet eta vs jet pT
190 TH2F *fhTrackEta; //! track eta vs track pT
191 TH2F *fhTrackCentVsPt; //! X=centrality; Y= track pT
192 TH1F *fhVertexZ; //! vertexZ inclusive
193 TH1F *fhVertexZAccept; //! vertexZ accepted after vtx cut
9d6abaad 194 TH2F *fhDphiTriggerJetMinBias; //! Delta phi versus jet pT
195 TH2F *fhDphiTriggerJetCent20; //! Delta phi versus jet pT
2cc66a40 196 TH1F *fhDphiTriggerJetAccept; //!Dphi of accepted jets after dphi cut
197
198 TH1F *fhCentrality; //! centrality
199 TH1F *fhCentralityV0M; //! centrality V0 multiplicity A+C
200 TH1F *fhCentralityV0A; //! centrality from V0A
201 TH1F *fhCentralityV0C; //! centrality from V0C
202 TH1F *fhCentralityZNA; //! centrality from ZNA
203
204 Int_t fNofRndTrials; //! number of random trials for cell area estimate
205 Double_t fJetFreeAreaFrac; //! minimal fraction of cell area to be accepted to cell median
206 Int_t fnEta; //! the number of cells in eta direction
207 Int_t fnPhi; //! the number of cell in phi direction
208 Double_t fEtaSize; //! size of cell in eta
209 Double_t fPhiSize; //! size of cell in phi
210 Double_t fCellArea; //! cell area
211
212 TProfile* fh1Xsec; //! pythia cross section and trials
213 TH1F* fh1Trials; //! trials are added
214 TH1F* fh1PtHard; //! Pt har of the event...
9d6abaad 215 TH1D* fhImpactParameter; //! impact parameter distribution hijing
216 TH1D* fhImpactParameterTT; //! impact parameter distribution hijing versus TT
2cc66a40 217
218 Int_t fNofRandomCones; // the number of random cones per event
9d6abaad 219
220 Double_t fRConesR; // small random cone of radius R=0.1
221 Double_t fRConesRSquared; // small random cone of radius R=0.1
222 Int_t fnRCones; // the number of small random cones R=0.1
223 Double_t fRConePhi[50]; //! phi of small R=0.1 random cone
224 Double_t fRConeEta[50]; //! eta of small R=0.1 random cone
225
2cc66a40 226
227 //Bool_t fIsMC;
228
229 AliAnalysisTaskHJetSpectra(const AliAnalysisTaskHJetSpectra&);
230 AliAnalysisTaskHJetSpectra& operator=(const AliAnalysisTaskHJetSpectra&);
231
9d6abaad 232 ClassDef(AliAnalysisTaskHJetSpectra, 3); // Charged jet analysis for pA
2cc66a40 233
234};
235#endif