AliPhysics  cdeda5a (cdeda5a)
 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 (17.Nov. 2016)
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  kDmpjet = 3 // dmpjet simulation
47  };
48 
49  enum MyAnalType {
50  kRec = 0, // reconstructed real data
51  kEff = 1, // MC true+recontructed
52  kEmb = 2, // embedding pythia jet
53  kEmbSingl = 3,// embedding single track
54  kKine = 4 // kine
55  };
56 
57  enum MyRho {
61  kZeroRho, //WITHOUT UE SUBTRACTION
63  };
64 
65  enum MySystem { //collision system
66  kpp = 0,
67  kpPb = 1,
68  kPbPb = 2
69  };
70 
71  enum MyCentBins { //collision
72  kC0100 = 0,
73  kC020 = 1,
78  };
79 
80  enum {kRef=0, kSig=1, kTT=2}; //trigger track bins
81 
82  // ######### CONTRUCTORS/DESTRUCTORS AND STD FUNCTIONS
84  AliAnalysisTaskHJetSpectra(const char *name);
87  void Terminate(Option_t *);
88 
89 
90  // ######### SETTERS/GETTERS
91  void SetAnalysisType(Int_t sys, Int_t typeOfData, Int_t typeOfAnal){
92  fTypeOfData = typeOfData;
93  fTypeOfAnal = typeOfAnal;
94  fCollisionSystem = sys;
95  }
96 
98  void SetUsePileUpCut (Bool_t val) {fUsePileUpCut = val;}
99  void SetSignalJetMinArea(Double_t minArea) {fMinJetArea = minArea;}
100 
101 
103  fSignalJetRadius = radius;
106  }
107 
108  void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius){
109  fTrackEtaWindow = trackEta;
110  fSignalJetRadius = signalJetRadius;
112  fSignalJetRadiusSquared = fSignalJetRadius*fSignalJetRadius;
113  }
114 
115  void SetCentralityType(const char* type){
116  fCentralityType = type;
117  }
118 
119  void SetVertexCut(Double_t vz){ fZVertexCut = vz; }
120  void SetMinTrackPt(Double_t mpt){ fMinTrackPt = mpt;}
121 
122  void SetExternalRhoTaskName(const char* name) {fRhoTaskName = name;}
123  void SetExternalRhoTaskNameMC(const char* name) {fRhoTaskNameMC = name;}
124 
125  void SetTT(Double_t tlr, Double_t thr,Double_t tls, Double_t ths);
126  void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
128 
129 
132 
134  Bool_t Run();
136 
137  private:
138 
139  // ######### MAIN CALCULATION FUNCTIONS
140  void GetDeltaPt(Int_t nrho, TArrayD &rho, Double_t *dpt,
141  Double_t ttPhi, Double_t ttEta, AliParticleContainer *trkArray, Bool_t isGen);
142  //Double_t leadingJetExclusionProbability = 0);
143 
144 
145 
146  Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen);
147  //Double_t GetPtHard();
150 
151 
152  // ######### CHECK FUNCTIONS
153  Bool_t IsTrackInAcceptance(AliVParticle* track, Bool_t isGen=0);
154  Bool_t IsEventInAcceptance(AliVEvent* event);
155  Bool_t IsMCEventInAcceptance(AliVEvent* event);
156  Bool_t IsSignalJetInAcceptance(AliEmcalJet* jet, Bool_t suppressGhost=1);
157  Bool_t IsStrange(Int_t ip); //Check particle strangeness
158 
160  Double_t EstimateBgCone(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron, Bool_t isGen=kFALSE);
161  Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* trackTT); // median p/A of kt jets
162  Double_t EstimateBgKTcms(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle* triggerHadron); //CMS background
163 
164 
165 
166  //Double_t GetNcoll(Double_t centr); //gen Ncoll for given centrality
167  Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2);
169 
170  // ######### STANDARD FUNCTIONS
171  void ExecOnceLocal();
172 
173  // ########## USAGE TRIGGERS
174  Int_t fCollisionSystem; // collision system MySystem
175  Int_t fTypeOfData; //kind of input data MyDataType
176  Int_t fTypeOfAnal; //kind of analysis MyAnalType
177 
178  Bool_t fUseDefaultVertexCut; // trigger if automatic vertex cut from helper class should be done
179  Bool_t fUsePileUpCut; // trigger if pileup cut should be done
180 
181 
182  // ########## SOURCE INFORMATION
183  TString fRhoTaskName; // name of rho CMS bg task for this analysis
184  TString fRhoTaskNameMC; // MC name of rho CMS bg task for this analysis
185  // ########## JET/DIJET/RC PROPERTIES
186  Double_t fSignalJetRadius; // Radius for the signal jets
187  Double_t fSignalJetRadiusSquared; // Radius for the signal jets
188  // ########## CUTS
189  Double_t fSignalJetEtaWindow; // +- window in eta for signal jets
190  Double_t fTrackEtaWindow; //gc +- window in eta for tracks
191  Double_t fMinTrackPt; //gc Min track pt to be accepted
192  Double_t fMinJetArea; // Min jet area to be accepted
193  TString fCentralityType; //gc Used centrality estimate (V0A, V0C, V0M, ...)
194  Double_t fMinFractionShared; //Minimal fraction shared by embedded and rec jet
195 
196  // ########## EVENT PROPERTIES
200 
201  // ########## GENERAL ////VARS
202  TRandom3* fRandom;
203  AliAnalysisUtils* fHelperClass;
205 
206 
207  Double_t fTTlow[kTT]; //gc trigger particles TT bin lower boundary
208  Double_t fTThigh[kTT]; //gc trigger particles TT bin upper boundary
209  Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
210  Bool_t fUseDoubleBinPrecision; //use double bin precision
211 
212 
220 
221  TH1F *fhRhoTT[kCAll][kTT][kRho];
222  TH1F *fhRhoIncl[kCAll][kRho];
223 
224  TH1F *fARhoTT[kCAll][kTT][kRho];
225  //TH1F *fARhoTTGen[kRho-1]; //! #### jet area times rho from perp cone
226 
234 
236 
238 
245  TH1F *fhTrackPt[kCAll];
247  TH1F *fhVertexZ;
249  TH1F *fhVertexZMC;
254 
257 
264 
267 
270 
273 
274  THnSparse *fhZNAVzeroATrack[kCAll];
275  THnSparse *fhZNAVzeroATrackTT[kCAll][kTT];
276 
277 
278  //TProfile* fh1Xsec; //! gc pythia cross section and trials
279  //TH1F* fh1Trials; //! gc trials are added
280  //TH1F* fh1PtHard; //! Pt har of the event...
283 
292 
300 
307 
308 
309  TArrayD fRhoRec[kTT]; // labels of particles on reconstructed track level
310  TArrayD fRhoMC[kTT]; // labels of particles on reconstructed track level
311  TArrayD fCentralityBins; //bin boaders
312 
313 
314  Int_t fNofRandomCones; // the number of random cones per event
315 
316  Double_t fZVertexCut; // vertex cut in z
317  Double_t fCutPhi; // azimuthal cat around TT to exclude TTjet + recoil jet in perp rho estimate
318 
319  AliVParticle* fTrigTracksGen[kTT][999]; //list of trigger particle indices true MC
320  AliVParticle* fTrigTracks[kTT][999]; //list pf trigger particle indices
321 
322  Int_t ficb[2]; //centrality bin 0=MB 1=CENT bin
323  Double_t ftmpArray[2]; //tmp array
324  Double_t ftmpArrayX[3]; //tmp array
325  TArrayF fpyVtx; //primaru vertex
326  Double_t frhovec[999]; //auxiliary array to store pT/A of kT jets
327 
330 
331  ClassDef(AliAnalysisTaskHJetSpectra, 21); // Charged jet analysis for pA
332 
333 };
334 #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
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
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]
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.
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
ClassDef(AliAnalysisTaskHJetSpectra, 21)
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
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 * 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 of accepted jets after dphi cut.
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)
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