AliPhysics  db95e02 (db95e02)
 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 TF1;
8 class TH2F;
9 class TH2D;
10 class TH1D;
11 class TArrayD;
12 class TArrayF;
13 class THnSparse;
14 class TProfile;
15 class TList;
16 class TClonesArray;
17 class TString;
18 class AliEmcalJet;
19 class AliRhoParameter;
20 class AliVParticle;
21 class AliLog;
22 class AliAnalysisUtils;
23 class TRandom3;
24 class AliJetContainer;
27 
29 
30 // ANALYSIS OF HIGH PT HADRON TRIGGER ASSOCIATED SPECTRUM OF RECOIL JETS IN P+PB
31 // Author Filip Krizek (17.Nov. 2016)
32 
34  public:
35 
36  enum MyContainer {
37  kContainerOne = 0, //analyze real data
38  kContainerTwo = 1, //analyze monte carlo
39  kContainerThree, //KT real
41  };
42 
43  enum MyDataType {
44  kReal = 0, // reconstructed real data
45  kPythia = 1, // pythia simulation
46  kHijing = 2, // hijing simulation
47  kDmpjet = 3 // dmpjet simulation
48  };
49 
50  enum MyAnalType {
51  kRec = 0, // reconstructed real data
52  kEff = 1, // MC true+recontructed
53  kEmb = 2, // embedding pythia jet
54  kEmbSingl = 3,// embedding single track
55  kKine = 4 // kine
56  };
57 
58  enum MyRho {
62  kZeroRho, //WITHOUT UE SUBTRACTION
64  };
65 
66  enum MySystem { //collision system
67  kpp = 0,
68  kpPb = 1,
69  kPbPb = 2
70  };
71 
72  enum MyCentBins { //collision
73  kC0100 = 0,
74  kC020 = 1,
79  };
80 
81  enum {kRef=0, kSig=1, kTT=2}; //trigger track bins
82 
83  // ######### CONTRUCTORS/DESTRUCTORS AND STD FUNCTIONS
85  AliAnalysisTaskHJetSpectra(const char *name);
88  void Terminate(Option_t *);
89 
90 
91  // ######### SETTERS/GETTERS
92  void SetAnalysisType(Int_t sys, Int_t typeOfData, Int_t typeOfAnal){
93  fTypeOfData = typeOfData;
94  fTypeOfAnal = typeOfAnal;
95  fCollisionSystem = sys;
96  }
97 
99  void SetUsePileUpCut (Bool_t val) {fUsePileUpCut = val;}
100  void SetSignalJetMinArea(Double_t minArea) {fMinJetArea = minArea;}
101 
102 
104  fSignalJetRadius = radius;
107  }
108 
109  void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius){
110  fTrackEtaWindow = trackEta;
111  fSignalJetRadius = signalJetRadius;
113  fSignalJetRadiusSquared = fSignalJetRadius*fSignalJetRadius;
114  }
115 
116  void SetCentralityType(const char* type){
117  fCentralityType = type;
118  }
119 
120  void SetVertexCut(Double_t vz){ fZVertexCut = vz; }
121  void SetMinTrackPt(Double_t mpt){ fMinTrackPt = mpt;}
122 
123  void SetExternalRhoTaskName(const char* name) {fRhoTaskName = name;}
124  void SetExternalRhoTaskNameMC(const char* name) {fRhoTaskNameMC = name;}
125 
126  void SetTT(Double_t tlr, Double_t thr,Double_t tls, Double_t ths);
127  void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
129 
130 
133 
135  Bool_t Run();
137 
138  private:
139 
140  // ######### MAIN CALCULATION FUNCTIONS
141  void GetDeltaPt(Int_t nrho, TArrayD &rho, Double_t *dpt,
142  Double_t ttPhi, Double_t ttEta, AliParticleContainer *trkArray, Bool_t isGen);
143  //Double_t leadingJetExclusionProbability = 0);
144 
145 
146 
147  Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen);
148  //Double_t GetPtHard();
151 
152 
153  // ######### CHECK FUNCTIONS
154  Bool_t IsTrackInAcceptance(AliVParticle* track, Bool_t isGen=0);
155  Bool_t IsEventInAcceptance(AliVEvent* event);
156  Bool_t IsMCEventInAcceptance(AliVEvent* event);
157  Bool_t IsSignalJetInAcceptance(AliEmcalJet* jet, Bool_t suppressGhost=1);
158  Bool_t IsStrange(Int_t ip); //Check particle strangeness
159 
161  Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron, Bool_t isGen=kFALSE);
162  Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* trackTT); // median p/A of kt jets
163  Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron); //CMS background
164 
165 
166 
167  //Double_t GetNcoll(Double_t centr); //gen Ncoll for given centrality
168  Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2);
170 
171  // ######### STANDARD FUNCTIONS
172  void ExecOnceLocal();
173 
174  // ########## USAGE TRIGGERS
175  Int_t fCollisionSystem; // collision system MySystem
176  Int_t fTypeOfData; //kind of input data MyDataType
177  Int_t fTypeOfAnal; //kind of analysis MyAnalType
178 
179  Bool_t fUseDefaultVertexCut; // trigger if automatic vertex cut from helper class should be done
180  Bool_t fUsePileUpCut; // trigger if pileup cut should be done
181 
182 
183  // ########## SOURCE INFORMATION
184  TString fRhoTaskName; // name of rho CMS bg task for this analysis
185  TString fRhoTaskNameMC; // MC name of rho CMS bg task for this analysis
186  // ########## JET/DIJET/RC PROPERTIES
187  Double_t fSignalJetRadius; // Radius for the signal jets
188  Double_t fSignalJetRadiusSquared; // Radius for the signal jets
189  // ########## CUTS
190  Double_t fSignalJetEtaWindow; // +- window in eta for signal jets
191  Double_t fTrackEtaWindow; //gc +- window in eta for tracks
192  Double_t fMinTrackPt; //gc Min track pt to be accepted
193  Double_t fMinJetArea; // Min jet area to be accepted
194  TString fCentralityType; //gc Used centrality estimate (V0A, V0C, V0M, ...)
195  Double_t fMinFractionShared; //Minimal fraction shared by embedded and rec jet
196 
197  // ########## EVENT PROPERTIES
201 
202  // ########## GENERAL ////VARS
203  TRandom3* fRandom;
204  AliAnalysisUtils* fHelperClass;
206 
207 
208  Double_t fTTlow[kTT]; //gc trigger particles TT bin lower boundary
209  Double_t fTThigh[kTT]; //gc trigger particles TT bin upper boundary
210  Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
211  Bool_t fUseDoubleBinPrecision; //use double bin precision
212 
213 
221 
222  TH1F *fhRhoTT[kCAll][kTT][kRho];
223  TH1F *fhRhoIncl[kCAll][kRho];
224 
225  TH1F *fARhoTT[kCAll][kTT][kRho];
226  //TH1F *fARhoTTGen[kRho-1]; //! #### jet area times rho from perp cone
227 
235 
237 
239 
246  TH1F *fhTrackPt[kCAll];
248  TH1F *fhVertexZ;
255  TH1F *fhVertexZMC;
260  TH1F *fhDphiTTTT;
261 
264 
271 
274 
277 
280 
281  THnSparse *fhZNAVzeroATrack[kCAll];
282  THnSparse *fhZNAVzeroATrackTT[kCAll][kTT];
283 
284 
285  //TProfile* fh1Xsec; //! gc pythia cross section and trials
286  //TH1F* fh1Trials; //! gc trials are added
287  //TH1F* fh1PtHard; //! Pt har of the event...
290 
299 
307 
314 
315 
316  TArrayD fRhoRec[kTT]; // labels of particles on reconstructed track level
317  TArrayD fRhoMC[kTT]; // labels of particles on reconstructed track level
318  TArrayD fCentralityBins; //bin boaders
319 
320  TF1 *fTrackPtRef; //inclusive track pt spectrum 6-7 GeV
321  TF1 *fTrackPtSig; //inclusive track pt spectrum 12-50 GeV
322 
323  Int_t fNofRandomCones; // the number of random cones per event
324 
325  Double_t fZVertexCut; // vertex cut in z
326  Double_t fCutPhi; // azimuthal cat around TT to exclude TTjet + recoil jet in perp rho estimate
327 
328  AliVParticle* fTrigTracksGen[kTT][999]; //list of trigger particle indices true MC
329  AliVParticle* fTrigTracks[kTT][999]; //list pf trigger particle indices
330 
331  Int_t ficb[2]; //centrality bin 0=MB 1=CENT bin
332  Double_t ftmpArray[2]; //tmp array
333  Double_t ftmpArrayX[3]; //tmp array
334  Double_t fVtxArray[3]; //tmp array vx,vy,vz
335  TArrayF fpyVtx; //primaru vertex
336  Double_t frhovec[999]; //auxiliary array to store pT/A of kT jets
337 
340 
341  ClassDef(AliAnalysisTaskHJetSpectra, 22); // Charged jet analysis for pA
342 
343 };
344 #endif
Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2)
TH2D * fhPtTrkSecOrFakeRec[kCAll]
pt spectrum of true generated primary track
TH1F * fhVertexZAcceptTT
gc vertexZ accepted after vtx cut
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
TH1D * fhDeltaPtEmbBc2Bc[kCAll][kTT][kRho]
embedded delta pT versus pT of the embedded jet (emb track is perp to TT)
AliVParticle * fTrigTracksGen[kTT][999]
void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius)
TH2D * fhDCAinXVsPt
hybrid TPC constrained track phi vs track pT
Definition: External.C:236
TH1F * fhCentralityV0C
centrality from V0A
ClassDef(AliAnalysisTaskHJetSpectra, 22)
TH1F * fhVertexZAccept
gc vertexZ accepted after vtx cut
TH2F * fhTrackPhi[kCAll]
gc jet phi vs jet pT
Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *triggerHadron)
TH2D * fhJetPtResolutionVsPtGen[kCAll][kRho]
pt jet gen level vs pT jet rec level
Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *triggerHadron, Bool_t isGen=kFALSE)
TH2D * fhPtTrkTruePrimGen[kCAll]
pt spectrum of true reconstructed primary tracks
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 * fhDeltaPt[kCAll][kTT][kRho]
jet area times rho from perp cone
TH1D * fhDeltaPtEmbPerp[kCAll][kTT][kRho]
embedded delta pT versus pT of the embedded jet
Bool_t IsSignalJetInAcceptance(AliEmcalJet *jet, Bool_t suppressGhost=1)
TH2D * fhDeltaPtEmb2D[kCAll][kTT][kRho]
embedded delta pT
TH1D * fh1NtriggersGen[kCAll][kTT]
tirgger multiplicity in event
TH1F * fhRhoIncl[kCAll][kRho]
gc X=rho from perp cone, Y=centrality
TArrayD fRhoRec[kTT]
Y DCA versus pT of non strange tracks.
TH1F * fhVertexXAccept
gc vertexZ inclusive
TH1D * fhDeltaPtEmb[kCAll][kTT][kRho]
delta pT
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
TH1D * fhDeltaPtIncl[kCAll][kRho]
embedded delta pT versus pT of the embedded jet (emb track is backtoback in azimtuh w...
TH2D * fhInvPtQVsPhi[2]
track Y= rec pt - true pt X= true track pT
TRandom3 * fRandom
impact parameter from hijing
TH1D * fh1TriggerMult[kCAll][kTT]
trigger counter
TH2D * fhSigmaPtOverPtVsPt[2]
q*1/pT versus eta
TH1F * fhVertexXAcceptTT
gc vertexZ accepted after vtx cut
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 * fhCentrality[kCAll]
minimum bias eta inclusive
Bool_t IsMCEventInAcceptance(AliVEvent *event)
TH2F * fhJetEtaGen[kCAll]
jet eta vs jet pT
TH2D * fhPtJetPrimVsPtJetRec[21]
pt spectrum of reconstructed fake or secondary tracks
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
TH2D * fhDCAinYVsPtNonStrange
X DCA versus pT of non strange tracks.
int Int_t
Definition: External.C:63
TH1F * fhCentralityV0A
centrality V0 multiplicity A+C
Definition: External.C:204
TH1F * fhDphiTTTT
Dphi of accepted jets after dphi cut.
Bool_t IsTrackInAcceptance(AliVParticle *track, Bool_t isGen=0)
TH1F * fhZNAEnergy[kCAll]
V0A multiplicity.
TH2D * fhDeltaPtEmbPerp2D[kCAll][kTT][kRho]
embedded delta pT (emb track is perp to TT)
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 * fhInvPtQVsPhiCSide[2]
q*1/pT versus eta
AliAnalysisUtils * fHelperClass
A random number.
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)
TH2D * fhJetPtGenVsJetPtRec[kCAll][kRho]
pt distribution of generator level jets
TH2F * fhDphiTriggerJetGen[kCAll][kTT][kRho]
gc Delta phi versus jet pT
Double_t RelativePhi(Double_t mphi, Double_t vphi)
TH1F * fhVertexYAccept
gc vertexZ accepted after vtx cut
TH1F * fhZNAEnergyTT[kCAll][kTT]
ZDC A neutral energy for given V0A centrality selection.
TH2D * fhDCAinXVsPtStrange
Y DCA versus pT.
TH2F * fhJetEtaIncl
minimum bias phi inclusive
TH1F * fhRhoTT[kCAll][kTT][kRho]
TT associated spectrum of jets.
TH1F * fhDphiTriggerJetAccept
gc Delta phi versus jet pT
TH2F * fhJetPhiIncl
Dphi between multiple trigger tracks.
TH2D * fHJetSpec[kCAll][kTT][kRho]
trigger multiplicity in event
Double_t fImpParam
gc value is filled, if pythia header is accessible
TH2D * fhDiffPtVsPtTrackTrue
pt spectrum of reconstructed jets without fake track pT vs reconstructed jet pT
TH1F * fARhoTT[kCAll][kTT][kRho]
gc X=rho from perp cone, Y=centrality
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)
TH1F * fhVertexYAcceptTT
gc vertexZ accepted after vtx cut
Base task in the EMCAL jet framework.
TH2D * fhInvPtQVsPhiASide[2]
q*1/pT versus eta
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
const char Option_t
Definition: External.C:48
TH2D * fhDCAinYVsPtStrange
X DCA versus pT of strange tracks.
void SetSignalJetRadius(Double_t radius)
TH1F * fhVzeroATotMult[kCAll]
centrality from ZNA
bool Bool_t
Definition: External.C:53
TH1F * fhVertexZMC
gc vertexZ accepted after vtx cut
TH2D * fhInvPtQVsEta[2]
q*1/pT versus phi
AliVParticle * fTrigTracks[kTT][999]
void SetExternalRhoTaskNameMC(const char *name)
TH1D * fhImpactParameter[kCAll]
ZNA energy versus Vzero mult. versus track mult. in events with TT.
TH2F * fhTrackPhiTPCG
hybrid constrained global track phi vs track pT
TH2D * fhDCAinXVsPtNonStrange
Y DCA versus pT of strange tracks.
TH2D * fhDeltaPtEmbBc2Bc2D[kCAll][kTT][kRho]
embedded delta pT (emb track is back-to-back in azimuth to TT)
TH1F * fhCentralityZNA
centrality from V0C
Container structure for EMCAL clusters.
TH2D * fhDCAinYVsPt
X DCA versus pT.
Bool_t fInitializedLocal
gc Vertex selection helper
TH2D * fhPtTrkTruePrimRec[kCAll]
pt jet resolution
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