AliPhysics  8bb951a (8bb951a)
 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 
80  // ######### CONTRUCTORS/DESTRUCTORS AND STD FUNCTIONS
82  AliAnalysisTaskHJetSpectra(const char *name);
85  void Terminate(Option_t *);
86 
87 
88  // ######### SETTERS/GETTERS
89  void SetAnalysisType(Int_t sys, Int_t typeOfData, Int_t typeOfAnal){
90  fTypeOfData = typeOfData;
91  fTypeOfAnal = typeOfAnal;
92  fCollisionSystem = sys;
93  }
94 
95  void SetUseDefaultVertexCut (Bool_t val) {fUseDefaultVertexCut = val;}
96  void SetUsePileUpCut (Bool_t val) {fUsePileUpCut = val;}
97  void SetSignalJetMinArea(Double_t minArea) {fMinJetArea = minArea;}
98 
99 
100  void SetSignalJetRadius(Double_t radius) {
101  fSignalJetRadius = radius;
104  }
105 
106  void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius){
107  fTrackEtaWindow = trackEta;
108  fSignalJetRadius = signalJetRadius;
110  fSignalJetRadiusSquared = fSignalJetRadius*fSignalJetRadius;
111  }
112 
113  void SetCentralityType(const char* type){
114  fCentralityType = type;
115  }
116 
117  void SetVertexCut(Double_t vz){ fZVertexCut = vz; }
118  void SetMinTrackPt(Double_t mpt){ fMinTrackPt = mpt;}
119 
120  void SetExternalRhoTaskName(const char* name) {fRhoTaskName = name;}
121  void SetExternalRhoTaskNameMC(const char* name) {fRhoTaskNameMC = name;}
122 
123  void SetTT(Double_t ttlow, Double_t tthigh){ fTTlow = ttlow; fTThigh = tthigh; }
124  void SetTTType(Int_t tttype){ fTTtype = tttype;}
125  void SetDphi(Double_t dphi){ fDphiCut = TMath::Pi() - dphi;}
127 
128  void SkipEventsWithSignalTT(Double_t ttlow, Double_t tthigh){ fTTLowToSkip = ttlow; fTTHighToSkip = tthigh; } //skip TT range
129 
130  void SetNofRandomCones(Int_t nrc){ fNofRandomCones = nrc;}
131  void SetMinFractionShared(Double_t f) { fMinFractionShared = f; }
132 
133  Bool_t RetrieveEventObjects();
134  Bool_t Run();
135  Bool_t FillHistograms();
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();
148  Double_t GetImpactParameter();
149  Double_t GetSimPrimaryVertex();
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 
158 
159  Double_t RelativePhi(Double_t mphi,Double_t vphi);
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);
168  Double_t GetFractionSharedPt(AliEmcalJet *jRec, AliJetContainer *jconRec, AliEmcalJet *jGen, AliJetContainer *jconGen);
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
197  Double_t fCrossSection;
198  Double_t fTrials;
199  Double_t fImpParam;
200 
201  // ########## GENERAL ////VARS
202  TRandom3* fRandom;
203  AliAnalysisUtils* fHelperClass;
205 
206 
207  Double_t fTTlow; //gc trigger particles TT bin lower boundary
208  Double_t fTThigh; //gc trigger particles TT bin upper boundary
209  Int_t fTTtype; //trigger particle type 0=single inclusive, 2 = inclusive
210  Double_t fDphiCut; //minimal azimuthal angle between trigger and assoc jet
211  Bool_t fUseDoubleBinPrecision; //use double bin precision
212 
213  Double_t fTTLowToSkip;// skip event that contains particle in the range fTTLowToSkip to fTTHighToSkip
214  Double_t fTTHighToSkip;// skip event that contains particle in the range fTTLowToSkip to fTTHighToSkip
215 
223 
224  TH1F *fhRhoTT[kCAll][kRho-1];
225  TH1F *fhRhoIncl[kCAll][kRho-1];
226 
227  TH1F *fARhoTT[kCAll][kRho-1];
228  //TH1F *fARhoTTGen[kRho-1]; //! #### jet area times rho from perp cone
229 
230  TH1D *fhDeltaPt[kCAll][kRho-1];
231  TH1D *fhDeltaPtEmb[kCAll][kRho-1];
236 
237  TH2F *fhKTAreaPt;
238 
239  TH2F *fhJetPhi[kCAll];
241  TH2F *fhTrackPhi[kCAll];
242  TH2F *fhJetEta[kCAll];
244  TH2F *fhTrackEta[kCAll];
245  TH1F *fhTrackPt[kCAll];
247  TH1F *fhVertexZ;
249  TH1F *fhVertexZMC;
254 
264  /*
265  TH1F *fhVzeroATotMult[kCAll]; //! V0A multiplicity for given V0A centrality selection
266  TH1F *fhVzeroATotMultTT[kCAll]; //! V0A multiplicity
267  TH2F *fh2VzeroATotMultVsCent; //! V0A multiplicity versus Centrality
268  TH2F *fh2VzeroATotMultVsCentTT; //! V0A multiplicity versus Centrality for TT selection
269 
270  TH1F *fhZNAEnergy[kCAll]; //! ZDC A neutral energy for given V0A centrality selection
271  TH1F *fhZNAEnergyTT[kCAll]; //! ZDC A neutral energy
272  TH2F *fh2ZNAEnergyVsCent; //! ZDC A Neutral energyy versus Centrality
273  TH2F *fh2ZNAEnergyVsCentTT; //! ZDC A Neutral energy versus Centrality for TT selection
274 
275  TH1D *fhTrackMultiplicity[kCAll]; //! multiplicity of tracks
276  TH1D *fhTrackMultiplicityTT[kCAll]; //! multiplicity of tracks in event with TT track
277  TH2D *fh2TrackMultVsCent; //! track multiplicity versus centrality
278  TH2D *fh2TrackMultVsCentTT; //! track multiplicity versus centrality
279 
280  THnSparse *fhZNAVzeroATrack[kCAll]; //! ZNA energy versus Vzero A mult versus track mult.
281  THnSparse *fhZNAVzeroATrackTT[kCAll]; //! ZNA energy versus Vzero mult. versus track mult. in events with TT
282  */
283 
284  //TProfile* fh1Xsec; //! gc pythia cross section and trials
285  //TH1F* fh1Trials; //! gc trials are added
286  //TH1F* fh1PtHard; //! Pt har of the event...
289 
293  TH2D* fhPtTrkTruePrimRec[kCAll]; // pt spectrum of true reconstructed primary tracks
294  TH2D* fhPtTrkTruePrimGen[kCAll]; // pt spectrum of true generated primary track
295  TH2D* fhPtTrkSecOrFakeRec[kCAll]; // pt spectrum of reconstructed fake or secondary tracks
296 
297 
298  TArrayD fRhoRec; // labels of particles on reconstructed track level
299  TArrayD fRhoMC; // labels of particles on reconstructed track level
300  TArrayD fCentralityBins; //bin boaders
301 
302 
303  Int_t fNofRandomCones; // the number of random cones per event
304 
305  Double_t fZVertexCut; // vertex cut in z
306  Double_t fCutPhi; // azimuthal cat around TT to exclude TTjet + recoil jet in perp rho estimate
307 
308  AliVParticle* fTrigTracksGen[999]; //list of trigger particle indices true MC
309  AliVParticle* fTrigTracks[999]; //list pf trigger particle indices
310 
311  Int_t ficb[2]; //centrality bin 0=MB 1=CENT bin
312  Double_t ftmpArray[2]; //tmp array
313  //Double_t ftmpArrayX[3]; //tmp array
314  TArrayF fpyVtx; //primaru vertex
315  Double_t frhovec[999]; //auxiliary array to store pT/A of kT jets
316 
319 
320  ClassDef(AliAnalysisTaskHJetSpectra, 15); // Charged jet analysis for pA
321 
322 };
323 #endif
Double_t fTTlow
gc trigger if tracks/jets are loaded initiates calling ExecOnce
Double_t GetDeltaR(Double_t phi1, Double_t phi2, Double_t eta1, Double_t eta2)
TH2F * fhJetPhiGen[kCAll]
gc jet phi vs jet pT
TH2F * fhDphiTriggerJet[kCAll][kRho]
gc vertexZ accepted after vtx cut in MC
TH1F * fhVertexZ
gc X=centrality; Y= track pT
TH1F * fhRhoTT[kCAll][kRho-1]
TT associated spectrum of jets.
void SetAcceptanceWindows(Double_t trackEta, Double_t signalJetRadius)
TH1D * fh1TriggerMult[kCAll]
trigger counter
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)
TH1F * fARhoTT[kCAll][kRho-1]
gc X=rho from perp cone, Y=centrality
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)
TH1F * fhCentralityV0ATT
centrality V0 multiplicity A+C when TT is present
Bool_t IsSignalJetInAcceptance(AliEmcalJet *jet, Bool_t suppressGhost=1)
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
TH1F * fhCentralityV0MTT
centrality from ZNA
TH1D * fhDeltaPtIncl[kCAll][kRho-1]
embedded delta pT versus pT of the embedded jet (emb track is perp to TT)
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)
TH1F * fhCentrality[kCAll]
Dphi of accepted jets after dphi cut.
TH1D * fhDeltaPtEmbPerp[kCAll][kRho-1]
embedded delta pT versus pT of the embedded jet
TH1D * fh1TriggerMultGen[kCAll]
trigger counter
Bool_t IsMCEventInAcceptance(AliVEvent *event)
TH2F * fhJetEtaGen[kCAll]
jet eta vs jet pT
TH1F * fhTrackPtGen[kCAll]
gc X=centrality; Y= track pT
TH1D * fhJetPtGen[kCAll][kRho]
impact parameter distribution hijing versus TT
TH1D * fhDeltaPt[kCAll][kRho-1]
jet area times rho from perp cone
TH1F * fhCentralityV0A
centrality V0 multiplicity A+C
void SetTT(Double_t ttlow, Double_t tthigh)
Bool_t IsTrackInAcceptance(AliVParticle *track, Bool_t isGen=0)
Double_t EstimateBgKT(AliJetContainer *jetCont, AliParticleContainer *trkArray, AliVParticle *trackTT)
TH1F * fhVertexZAcceptMC
gc vertexZ inclusive in MC
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
TH2D * fHJetSpecGen[kCAll][kRho]
TT associated spectrum of jets.
void SetSignalJetMinArea(Double_t minArea)
TH1F * fhCentralityV0CTT
centrality from V0A when TT is present
Double_t GetConePt(Double_t eta, Double_t phi, Double_t radius, AliParticleContainer *trkArray, Bool_t isGen)
TH2F * fhDphiTriggerJetGen[kCAll][kRho]
gc Delta phi versus jet pT
void SetExternalRhoTaskName(const char *name)
void SkipEventsWithSignalTT(Double_t ttlow, Double_t tthigh)
TH1D * fh1Ntriggers[kCAll]
gc event statistics
ClassDef(AliAnalysisTaskHJetSpectra, 15)
Double_t RelativePhi(Double_t mphi, Double_t vphi)
TH1F * fhDphiTriggerJetAccept
gc Delta phi versus jet pT
TH1D * fhImpactParameterTT[kCAll]
impact parameter distribution hijing
Double_t fImpParam
gc value is filled, if pythia header is accessible
TH2D * fhDeltaPtEmb2D[kCAll][kRho-1]
embedded delta pT
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)
TH1D * fhDeltaPtEmb[kCAll][kRho-1]
delta pT
TH2D * fhDeltaPtEmbPerp2D[kCAll][kRho-1]
embedded delta pT (emb track is perp to TT)
void SetSignalJetRadius(Double_t radius)
TH1F * fhVertexZMC
gc vertexZ accepted after vtx cut
void SetExternalRhoTaskNameMC(const char *name)
TH1D * fhImpactParameter[kCAll]
centrality from ZNA when TT is present
TH1D * fh1NtriggersGen[kCAll]
tirgger multiplicity in event
TH1F * fhCentralityZNA
centrality from V0C
Container structure for EMCAL clusters.
Bool_t fInitializedLocal
gc Vertex selection helper
TH1F * fhCentralityZNATT
centrality from V0C when TT is present
TH2D * fHJetSpec[kCAll][kRho]
trigger multiplicity in event