AliPhysics  64f4410 (64f4410)
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 SetTTType(Int_t ttt){ fTTType = ttt;}
128  void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
130 
131 
134 
136  Bool_t Run();
138 
139  private:
140 
141  // ######### MAIN CALCULATION FUNCTIONS
142  void GetDeltaPt(Int_t nrho, TArrayD &rho, Double_t *dpt,
143  Double_t ttPhi, Double_t ttEta, AliParticleContainer *trkArray, Bool_t isGen);
144  //Double_t leadingJetExclusionProbability = 0);
145 
146 
147 
148  Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen);
149  //Double_t GetPtHard();
152 
153 
154  // ######### CHECK FUNCTIONS
155  Bool_t IsTrackInAcceptance(AliVParticle* track, Bool_t isGen=0);
156  Bool_t IsEventInAcceptance(AliVEvent* event);
157  Bool_t IsMCEventInAcceptance(AliVEvent* event);
158  Bool_t IsSignalJetInAcceptance(AliEmcalJet* jet, Bool_t suppressGhost=1);
159  Bool_t IsStrange(Int_t ip); //Check particle strangeness
160 
162  Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron, Bool_t isGen=kFALSE);
163  Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* trackTT); // median p/A of kt jets
164  Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron); //CMS background
165 
166 
167 
168  //Double_t GetNcoll(Double_t centr); //gen Ncoll for given centrality
169  Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2);
171 
172  // ######### STANDARD FUNCTIONS
173  void ExecOnceLocal();
174 
175  // ########## USAGE TRIGGERS
176  Int_t fCollisionSystem; // collision system MySystem
177  Int_t fTypeOfData; //kind of input data MyDataType
178  Int_t fTypeOfAnal; //kind of analysis MyAnalType
179 
180  Bool_t fUseDefaultVertexCut; // trigger if automatic vertex cut from helper class should be done
181  Bool_t fUsePileUpCut; // trigger if pileup cut should be done
182 
183 
184  // ########## SOURCE INFORMATION
185  TString fRhoTaskName; // name of rho CMS bg task for this analysis
186  TString fRhoTaskNameMC; // MC name of rho CMS bg task for this analysis
187  // ########## JET/DIJET/RC PROPERTIES
188  Double_t fSignalJetRadius; // Radius for the signal jets
189  Double_t fSignalJetRadiusSquared; // Radius for the signal jets
190  // ########## CUTS
191  Double_t fSignalJetEtaWindow; // +- window in eta for signal jets
192  Double_t fTrackEtaWindow; //gc +- window in eta for tracks
193  Double_t fMinTrackPt; //gc Min track pt to be accepted
194  Double_t fMinJetArea; // Min jet area to be accepted
195  TString fCentralityType; //gc Used centrality estimate (V0A, V0C, V0M, ...)
196  Double_t fMinFractionShared; //Minimal fraction shared by embedded and rec jet
197 
198  // ########## EVENT PROPERTIES
202 
203  // ########## GENERAL ////VARS
204  TRandom3* fRandom;
205  AliAnalysisUtils* fHelperClass;
207 
208 
209  Double_t fTTlow[kTT]; //gc trigger particles TT bin lower boundary
210  Double_t fTThigh[kTT]; //gc trigger particles TT bin upper boundary
211  Int_t fTTType; // 0=TT selection unscaled, 1=TT scaled according to MB
212  Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
213  Bool_t fUseDoubleBinPrecision; //use double bin precision
214 
215 
223 
224  TH1F *fhRhoTT[kCAll][kTT][kRho];
225  TH1F *fhRhoIncl[kCAll][kRho];
226 
227  TH1F *fARhoTT[kCAll][kTT][kRho];
228  //TH1F *fARhoTTGen[kRho-1]; //! #### jet area times rho from perp cone
229 
237 
239 
241 
252  TH1F *fhTrackPt[kCAll];
254  TH1F *fhVertexZ;
261  TH1F *fhVertexZMC;
266  TH1F *fhDphiTTTT[kTT];
267 
270 
277 
280 
283 
286 
287  THnSparse *fhZNAVzeroATrack[kCAll];
288  THnSparse *fhZNAVzeroATrackTT[kCAll][kTT];
289 
290 
291  //TProfile* fh1Xsec; //! gc pythia cross section and trials
292  //TH1F* fh1Trials; //! gc trials are added
293  //TH1F* fh1PtHard; //! Pt har of the event...
296 
305 
313 
320 
321 
322  TArrayD fRhoRec[kTT]; // labels of particles on reconstructed track level
323  TArrayD fRhoMC[kTT]; // labels of particles on reconstructed track level
324  TArrayD fCentralityBins; //bin boaders
325 
326 
327  Int_t fNofRandomCones; // the number of random cones per event
328 
329  Double_t fZVertexCut; // vertex cut in z
330  Double_t fCutPhi; // azimuthal cat around TT to exclude TTjet + recoil jet in perp rho estimate
331 
332  AliVParticle* fTrigTracksGen[kTT][999]; //list of trigger particle indices true MC
333  AliVParticle* fTrigTracks[kTT][999]; //list pf trigger particle indices
334 
335  Int_t ficb[2]; //centrality bin 0=MB 1=CENT bin
336  Double_t ftmpArray[2]; //tmp array
337  Double_t ftmpArrayX[3]; //tmp array
338  Double_t fVtxArray[3]; //tmp array vx,vy,vz
339  TArrayF fpyVtx; //primaru vertex
340  Double_t frhovec[999]; //auxiliary array to store pT/A of kT jets
341 
344 
345  ClassDef(AliAnalysisTaskHJetSpectra, 26); // Charged jet analysis for pA
346 
347 };
348 #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 * fhJetPhiRecoil[kCAll][kTT]
minimum bias eta for recoil jets gen
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
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
Bool_t FillHistograms()
Function filling histograms.
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
TH2F * fhJetEta[kCAll][kTT]
gc track phi vs track pT
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
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
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)
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
TH2F * fhJetEtaGen[kCAll][kTT]
jet eta vs jet pT
Definition: External.C:204
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)
TH2F * fhJetEtaRecoilGen[kCAll][kTT]
minimum bias eta fore recoil jets
TH1F * fhVertexZAcceptMC
gc vertexZ inclusive in MC
TH2D * fhInvPtQVsPhiCSide[2]
q*1/pT versus eta
TH2F * fhJetPhiRecoilGen[kCAll][kTT]
minimum bias phi for recoil jets
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)
TH1F * fhDphiTTTT[kTT]
Dphi of accepted jets after dphi cut.
TH2F * fhJetPhi[kCAll][kTT]
KT jets area versus PT.
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
TH2F * fhJetEtaRecoil[kCAll][kTT]
jet eta vs jet pT
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]
minimum bias phi for recoil jets gen
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:51
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
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
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.
TH2F * fhJetPhiGen[kCAll][kTT]
gc jet phi vs jet pT
TH1D * fhImpactParameterTT[kCAll][kTT]
impact parameter distribution hijing
TH1F * fhCentralityV0M
centrality V0 multiplicity A+C when TT is present