AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskHJetSpectra.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKHJETSPECTRA_H
2 #define ALIANALYSISTASKHJETSPECTRA_H
3 
4 
5 class TH1I;
6 class TH1F;
7 class TH2F;
8 class TH2D;
9 class TH1D;
10 class TArrayD;
11 class TArrayF;
12 class THnSparse;
13 class TProfile;
14 class TList;
15 class TClonesArray;
16 class TString;
17 class AliEmcalJet;
18 class AliRhoParameter;
19 class AliVParticle;
20 class AliLog;
21 class AliAnalysisUtils;
22 class TRandom3;
23 class AliJetContainer;
26 
28 
29 // ANALYSIS OF HIGH PT HADRON TRIGGER ASSOCIATED SPECTRUM OF RECOIL JETS IN P+PB
30 // Author Filip Krizek (5.Nov. 2015)
31 
33  public:
34 
35  enum MyContainer {
36  kContainerOne = 0, //analyze real data
37  kContainerTwo = 1, //analyze monte carlo
38  kContainerThree, //KT real
40  };
41 
42  enum MyDataType {
43  kReal = 0, // reconstructed real data
44  kPythia = 1, // pythia simulation
45  kHijing = 2 // hijing simulation
46  };
47 
48  enum MyAnalType {
49  kRec = 0, // reconstructed real data
50  kEff = 1, // MC true+recontructed
51  kEmb = 2, // embedding pythia jet
52  kEmbSingl = 3,// embedding single track
53  kKine = 4 // kine
54  };
55 
56  enum MyRho {
60  kZeroRho, //WITHOUT UE SUBTRACTION
62  };
63 
64  enum MySystem { //collision system
65  kpp = 0,
66  kpPb = 1,
67  kPbPb = 2
68  };
69 
70  enum MyCentBins { //collision
71  kC0100 = 0,
72  kC020 = 1,
77  };
78 
79  enum {kRef=0, kSig=1, kTT=2}; //trigger track bins
80 
81  // ######### CONTRUCTORS/DESTRUCTORS AND STD FUNCTIONS
83  AliAnalysisTaskHJetSpectra(const char *name);
86  void Terminate(Option_t *);
87 
88 
89  // ######### SETTERS/GETTERS
90  void SetAnalysisType(Int_t sys, Int_t typeOfData, Int_t typeOfAnal){
91  fTypeOfData = typeOfData;
92  fTypeOfAnal = typeOfAnal;
93  fCollisionSystem = sys;
94  }
95 
97  void SetUsePileUpCut (Bool_t val) {fUsePileUpCut = val;}
98  void SetSignalJetMinArea(Double_t minArea) {fMinJetArea = minArea;}
99 
100 
102  fSignalJetRadius = radius;
105  }
106 
107  void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius){
108  fTrackEtaWindow = trackEta;
109  fSignalJetRadius = signalJetRadius;
111  fSignalJetRadiusSquared = fSignalJetRadius*fSignalJetRadius;
112  }
113 
114  void SetCentralityType(const char* type){
115  fCentralityType = type;
116  }
117 
118  void SetVertexCut(Double_t vz){ fZVertexCut = vz; }
119  void SetMinTrackPt(Double_t mpt){ fMinTrackPt = mpt;}
120 
121  void SetExternalRhoTaskName(const char* name) {fRhoTaskName = name;}
122  void SetExternalRhoTaskNameMC(const char* name) {fRhoTaskNameMC = name;}
123 
124  void SetTT(Double_t tlr, Double_t thr,Double_t tls, Double_t ths);
125  void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
127 
128 
131 
133  Bool_t Run();
135 
136  private:
137 
138  // ######### MAIN CALCULATION FUNCTIONS
139  void GetDeltaPt(Int_t nrho, TArrayD &rho, Double_t *dpt,
140  Double_t ttPhi, Double_t ttEta, AliParticleContainer *trkArray, Bool_t isGen);
141  //Double_t leadingJetExclusionProbability = 0);
142 
143 
144 
145  Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen);
146  //Double_t GetPtHard();
149 
150 
151  // ######### CHECK FUNCTIONS
152  Bool_t IsTrackInAcceptance(AliVParticle* track, Bool_t isGen=0);
153  Bool_t IsEventInAcceptance(AliVEvent* event);
154  Bool_t IsMCEventInAcceptance(AliVEvent* event);
155  Bool_t IsSignalJetInAcceptance(AliEmcalJet* jet, Bool_t suppressGhost=1);
156 
157 
159  Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron, Bool_t isGen=kFALSE);
160  Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* trackTT); // median p/A of kt jets
161  Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron); //CMS background
162 
163 
164 
165  //Double_t GetNcoll(Double_t centr); //gen Ncoll for given centrality
166  Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2);
168 
169  // ######### STANDARD FUNCTIONS
170  void ExecOnceLocal();
171 
172  // ########## USAGE TRIGGERS
173  Int_t fCollisionSystem; // collision system MySystem
174  Int_t fTypeOfData; //kind of input data MyDataType
175  Int_t fTypeOfAnal; //kind of analysis MyAnalType
176 
177  Bool_t fUseDefaultVertexCut; // trigger if automatic vertex cut from helper class should be done
178  Bool_t fUsePileUpCut; // trigger if pileup cut should be done
179 
180 
181  // ########## SOURCE INFORMATION
182  TString fRhoTaskName; // name of rho CMS bg task for this analysis
183  TString fRhoTaskNameMC; // MC name of rho CMS bg task for this analysis
184  // ########## JET/DIJET/RC PROPERTIES
185  Double_t fSignalJetRadius; // Radius for the signal jets
186  Double_t fSignalJetRadiusSquared; // Radius for the signal jets
187  // ########## CUTS
188  Double_t fSignalJetEtaWindow; // +- window in eta for signal jets
189  Double_t fTrackEtaWindow; //gc +- window in eta for tracks
190  Double_t fMinTrackPt; //gc Min track pt to be accepted
191  Double_t fMinJetArea; // Min jet area to be accepted
192  TString fCentralityType; //gc Used centrality estimate (V0A, V0C, V0M, ...)
193  Double_t fMinFractionShared; //Minimal fraction shared by embedded and rec jet
194 
195  // ########## EVENT PROPERTIES
199 
200  // ########## GENERAL ////VARS
201  TRandom3* fRandom;
202  AliAnalysisUtils* fHelperClass;
204 
205 
206  Double_t fTTlow[kTT]; //gc trigger particles TT bin lower boundary
207  Double_t fTThigh[kTT]; //gc trigger particles TT bin upper boundary
208  Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
209  Bool_t fUseDoubleBinPrecision; //use double bin precision
210 
211 
219 
220  TH1F *fhRhoTT[kCAll][kTT][kRho-1];
221  TH1F *fhRhoIncl[kCAll][kRho-1];
222 
223  TH1F *fARhoTT[kCAll][kTT][kRho-1];
224  //TH1F *fARhoTTGen[kRho-1]; //! #### jet area times rho from perp cone
225 
233 
235 
237 
244  TH1F *fhTrackPt[kCAll];
246  TH1F *fhVertexZ;
248  TH1F *fhVertexZMC;
253 
260 
263 
266 
269 
270  THnSparse *fhZNAVzeroATrack[kCAll];
271  THnSparse *fhZNAVzeroATrackTT[kCAll][kTT];
272 
273 
274  //TProfile* fh1Xsec; //! gc pythia cross section and trials
275  //TH1F* fh1Trials; //! gc trials are added
276  //TH1F* fh1PtHard; //! Pt har of the event...
279 
283  TH2D* fhPtTrkTruePrimRec[kCAll]; // pt spectrum of true reconstructed primary tracks
284  TH2D* fhPtTrkTruePrimGen[kCAll]; // pt spectrum of true generated primary track
285  TH2D* fhPtTrkSecOrFakeRec[kCAll]; // pt spectrum of reconstructed fake or secondary tracks
286 
287 
288  TArrayD fRhoRec[kTT]; // labels of particles on reconstructed track level
289  TArrayD fRhoMC[kTT]; // labels of particles on reconstructed track level
290  TArrayD fCentralityBins; //bin boaders
291 
292 
293  Int_t fNofRandomCones; // the number of random cones per event
294 
295  Double_t fZVertexCut; // vertex cut in z
296  Double_t fCutPhi; // azimuthal cat around TT to exclude TTjet + recoil jet in perp rho estimate
297 
298  AliVParticle* fTrigTracksGen[kTT][999]; //list of trigger particle indices true MC
299  AliVParticle* fTrigTracks[kTT][999]; //list pf trigger particle indices
300 
301  Int_t ficb[2]; //centrality bin 0=MB 1=CENT bin
302  Double_t ftmpArray[2]; //tmp array
303  Double_t ftmpArrayX[3]; //tmp array
304  TArrayF fpyVtx; //primaru vertex
305  Double_t frhovec[999]; //auxiliary array to store pT/A of kT jets
306 
309 
310  ClassDef(AliAnalysisTaskHJetSpectra, 17); // Charged jet analysis for pA
311 
312 };
313 #endif
Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2)
void SetTT(Double_t tlr, Double_t thr, Double_t tls, Double_t ths)
TH2F * fhJetPhiGen[kCAll]
gc jet phi vs jet pT
TH1F * fhVertexZ
gc X=centrality; Y= track pT
Double_t fTTlow[kTT]
gc trigger if tracks/jets are loaded initiates calling ExecOnce
TH1F * fhVzeroATotMultTT[kCAll][kTT]
V0A multiplicity for given V0A centrality selection.
double Double_t
Definition: External.C:58
AliVParticle * fTrigTracksGen[kTT][999]
void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius)
Definition: External.C:236
TH1F * fhCentralityV0C
centrality from V0A
TH1F * fhVertexZAccept
gc vertexZ inclusive
TH2F * fhTrackPhi[kCAll]
gc jet phi vs jet pT
Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *triggerHadron)
TH2D * fhJetPtResolutionVsPtGen[kCAll][kRho]
Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *triggerHadron, Bool_t isGen=kFALSE)
TH2F * fhKTAreaPt
delta pT from RndCone using rho from perp cone inclusive event
Bool_t IsEventInAcceptance(AliVEvent *event)
void SetAnalysisType(Int_t sys, Int_t typeOfData, Int_t typeOfAnal)
TH1D * fhDeltaPtEmbPerp[kCAll][kTT][kRho-1]
embedded delta pT versus pT of the embedded jet
Bool_t IsSignalJetInAcceptance(AliEmcalJet *jet, Bool_t suppressGhost=1)
TH1D * fh1NtriggersGen[kCAll][kTT]
tirgger multiplicity in event
TH1D * fh1TriggerMultGen[kCAll][kTT]
trigger counter
TH2F * fhJetEta[kCAll]
gc track phi vs track pT
TH2F * fhJetPhi[kCAll]
KT jets area versus PT.
TH1F * fhTrackPt[kCAll]
track eta vs track pT
TRandom3 * fRandom
impact parameter from hijing
TH1D * fh1TriggerMult[kCAll][kTT]
trigger counter
TH1D * fhDeltaPtIncl[kCAll][kRho-1]
embedded delta pT versus pT of the embedded jet (emb track is backtoback in azimtuh w...
Container for particles within the EMCAL framework.
AliAnalysisTaskHJetSpectra & operator=(const AliAnalysisTaskHJetSpectra &)
void SetCentralityType(const char *type)
Double_t GetFractionSharedPt(AliEmcalJet *jRec, AliJetContainer *jconRec, AliEmcalJet *jGen, AliJetContainer *jconGen)
THnSparse * fhZNAVzeroATrackTT[kCAll][kTT]
ZNA energy versus Vzero A mult versus track mult.
TH1D * fhTrackMultiplicity[kCAll]
ZDC A neutral energy.
TH2F * fhDphiTriggerJet[kCAll][kTT][kRho]
gc vertexZ accepted after vtx cut in MC
TH1F * fhRhoTT[kCAll][kTT][kRho-1]
TT associated spectrum of jets.
TH1F * fhCentrality[kCAll]
Dphi of accepted jets after dphi cut.
Bool_t IsMCEventInAcceptance(AliVEvent *event)
TH2F * fhJetEtaGen[kCAll]
jet eta vs jet pT
TH1F * fhTrackPtGen[kCAll]
gc X=centrality; Y= track pT
THnSparse * fhZNAVzeroATrack[kCAll]
multiplicity of tracks in event with TT track
TH1D * fh1Ntriggers[kCAll][kTT]
gc event statistics
TH1D * fhJetPtGen[kCAll][kRho]
impact parameter distribution hijing versus TT
int Int_t
Definition: External.C:63
TH1F * fhCentralityV0A
centrality V0 multiplicity A+C
Definition: External.C:204
TH1D * fhDeltaPt[kCAll][kTT][kRho-1]
jet area times rho from perp cone
Bool_t IsTrackInAcceptance(AliVParticle *track, Bool_t isGen=0)
TH1F * fhZNAEnergy[kCAll]
V0A multiplicity.
TH2D * fHJetSpecGen[kCAll][kTT][kRho]
TT associated spectrum of jets.
Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *trackTT)
TH1F * fhVertexZAcceptMC
gc vertexZ inclusive in MC
TH2D * fhDeltaPtEmb2D[kCAll][kTT][kRho-1]
embedded delta pT
AliAnalysisUtils * fHelperClass
A random number.
TH1F * fhRhoIncl[kCAll][kRho-1]
gc X=rho from perp cone, Y=centrality
Double_t fTrials
gc value is filled, if pythia header is accessible
Definition: External.C:228
Definition: External.C:212
void SetSignalJetMinArea(Double_t minArea)
Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen)
TH1D * fhTrackMultiplicityTT[kCAll][kTT]
multiplicity of tracks
void SetExternalRhoTaskName(const char *name)
TH1D * fhDeltaPtEmb[kCAll][kTT][kRho-1]
delta pT
TH2F * fhDphiTriggerJetGen[kCAll][kTT][kRho]
gc Delta phi versus jet pT
TH1D * fhDeltaPtEmbBc2Bc[kCAll][kTT][kRho-1]
embedded delta pT versus pT of the embedded jet (emb track is perp to TT)
Double_t RelativePhi(Double_t mphi, Double_t vphi)
TH1F * fhZNAEnergyTT[kCAll][kTT]
ZDC A neutral energy for given V0A centrality selection.
TH1F * fhDphiTriggerJetAccept
gc Delta phi versus jet pT
TH1F * fARhoTT[kCAll][kTT][kRho-1]
gc X=rho from perp cone, Y=centrality
TH2D * fHJetSpec[kCAll][kTT][kRho]
trigger multiplicity in event
TH2D * fhDeltaPtEmbBc2Bc2D[kCAll][kTT][kRho-1]
embedded delta pT (emb track is back-to-back in azimuth to TT)
Double_t fImpParam
gc value is filled, if pythia header is accessible
TH2F * fhTrackEta[kCAll]
jet eta vs jet pT
void GetDeltaPt(Int_t nrho, TArrayD &rho, Double_t *dpt, Double_t ttPhi, Double_t ttEta, AliParticleContainer *trkArray, Bool_t isGen)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
const char Option_t
Definition: External.C:48
void SetSignalJetRadius(Double_t radius)
TH2D * fhDeltaPtEmbPerp2D[kCAll][kTT][kRho-1]
embedded delta pT (emb track is perp to TT)
TH1F * fhVzeroATotMult[kCAll]
centrality from ZNA
bool Bool_t
Definition: External.C:53
TH1F * fhVertexZMC
gc vertexZ accepted after vtx cut
AliVParticle * fTrigTracks[kTT][999]
void SetExternalRhoTaskNameMC(const char *name)
TH1D * fhImpactParameter[kCAll]
ZNA energy versus Vzero mult. versus track mult. in events with TT.
TH1F * fhCentralityZNA
centrality from V0C
Container structure for EMCAL clusters.
Bool_t fInitializedLocal
gc Vertex selection helper
ClassDef(AliAnalysisTaskHJetSpectra, 17)
Container for jet within the EMCAL jet framework.
TH1D * fhImpactParameterTT[kCAll][kTT]
impact parameter distribution hijing
TH1F * fhCentralityV0M
centrality V0 multiplicity A+C when TT is present