1 #ifndef AliAnalysisTaskFullpAJets_H
2 #define AliAnalysisTaskFullpAJets_H
14 class AliESDtrackCuts;
16 class AliEMCALGeometry;
18 #ifndef ALIANALYSISTASKSE_H
19 #include "AliAnalysisTaskSE.h"
22 class AliAnalysisTaskFullpAJets : public AliAnalysisTaskSE
24 // AlipAJetData Helper Class
29 AlipAJetData(const char *name, Bool_t isFull, Int_t nEntries);
30 virtual ~AlipAJetData();
32 // User Defined Sub-Routines
33 void InitializeJetData(TClonesArray *jetList, Int_t nEntries);
36 void SetName(const char *name);
37 void SetIsJetsFull(Bool_t isFull);
38 void SetTotalEntries(Int_t nEntries);
39 void SetTotalJets(Int_t nJets);
40 void SetTotalSignalJets(Int_t nSignalJets);
41 void SetSignalCut(Double_t Pt);
42 void SetLeading(Int_t index, Double_t Pt);
43 void SetSubLeading(Int_t index, Double_t Pt);
44 void SetJetIndex(Int_t index, Int_t At);
45 void SetSignalJetIndex(Int_t index, Int_t At);
46 void SetIsJetInArray(Bool_t isInArray, Int_t At);
47 void SetAreaCutFraction(Double_t areaFraction);
48 void SetJetR(Double_t jetR);
51 Int_t GetTotalEntries();
53 Int_t GetTotalSignalJets();
54 Double_t GetSignalCut();
55 Int_t GetLeadingIndex();
56 Double_t GetLeadingPt();
57 Int_t GetSubLeadingIndex();
58 Double_t GetSubLeadingPt();
59 Int_t GetJetIndex(Int_t At);
60 Int_t GetSignalJetIndex(Int_t At);
61 Bool_t GetIsJetInArray(Int_t At);
63 Int_t* GetJets() const {return fJetsIndex;}
64 Int_t* GetSignalJets() const {return fJetsSCIndex;}
77 Double_t fAreaCutFrac;
81 Int_t fPtSubLeadingIndex;
82 Double_t fPtSubLeading;
86 Bool_t *fIsJetInArray;
89 // AlipAJetHistos Helper Class
94 AlipAJetHistos(const char *name);
95 AlipAJetHistos(const char *name, const char *centag);
96 virtual ~AlipAJetHistos();
98 // User Defined Sub-Routines
100 void FillRho(Double_t eventCentrality, Double_t rho);
101 void FillBSJS(Double_t eventCentrality, Double_t rho, Double_t signalCut, TClonesArray *jetList, Int_t *indexJetList, Int_t nIndexJetList);
102 void FillDeltaPt(Double_t eventCentrality, Double_t rho, Double_t jetRadius, Double_t *RCArray, Int_t nRC);
103 void FillDeltaPtSignal(Double_t eventCentrality, Double_t rho, Double_t jetRadius, Double_t *RCArray, Int_t nRC);
104 void FillBackgroundFluctuations(Double_t eventCentrality, Double_t rho, Double_t jetRadius);
105 void FillLeadingJetPtRho(Double_t jetPt, Double_t rho);
108 void SetName(const char *name);
109 void SetCentralityTag(const char *name);
110 void SetCentralityRange(Int_t bins, Double_t low, Double_t up);
111 void SetPtRange(Int_t bins, Double_t low, Double_t up);
112 void SetRhoPtRange(Int_t bins, Double_t low, Double_t up);
113 void SetDeltaPtRange(Int_t bins, Double_t low, Double_t up);
114 void SetBackgroundFluctuationsPtRange(Int_t bins, Double_t low, Double_t up);
115 void SetLeadingJetPtRange(Int_t bins, Double_t low, Double_t up);
117 // User Defined Functions
118 TList* GetOutputHistos();
121 TList *fOutput; // Output list
124 // This set of Histograms is for filling the Rho Spectral distributions
126 TH1D *fh80100Rho; //!
130 // This set of Histograms is for filling the Background Subtracted Jet Spectra
132 TH1D *fh80100BSPt; //!
136 // This set of Histograms is for filling the Background Subtracted Signal Jet Spectra
137 TH1D *fh020BSPtSignal; //!
138 TH1D *fh80100BSPtSignal; //!
139 TH1D *fhBSPtSignal; //!
140 TH2D *fhBSPtCenSignal; //!
142 // This set of Histograms is for filling Delta Pt where the RC are at least 2R away from the leading Signal
143 TH1D *fh020DeltaPt; //!
144 TH1D *fh80100DeltaPt; //!
146 TH2D *fhDeltaPtCen; //!
148 // This set of Histograms is for filling Delta Pt where the RC have to spatial restrictions
149 TH1D *fh020DeltaPtSignal; //!
150 TH1D *fh80100DeltaPtSignal; //!
151 TH1D *fhDeltaPtSignal; //!
152 TH2D *fhDeltaPtCenSignal; //!
154 // This set of Histograms is for filling Background Fluctuations Spectra
155 TH1D *fh020BckgFlucPt; //!
156 TH1D *fh80100BckgFlucPt; //!
157 TH1D *fhBckgFlucPt; //!
158 TH2D *fhBckgFlucPtCen; //!
162 TProfile *fpLJetRho; //!
166 const char *fCentralityTag;
168 Int_t fCentralityBins;
169 Double_t fCentralityLow;
170 Double_t fCentralityUp;
181 Double_t fDeltaPtLow;
184 Int_t fBckgFlucPtBins;
185 Double_t fBckgFlucPtLow;
186 Double_t fBckgFlucPtUp;
193 // AliAnalysisTaskFullpAJets
195 AliAnalysisTaskFullpAJets();
196 AliAnalysisTaskFullpAJets(const char *name);
197 virtual ~AliAnalysisTaskFullpAJets();
199 virtual void UserCreateOutputObjects();
200 virtual void UserExecOnce();
201 virtual void UserExec(Option_t *option);
202 virtual void Terminate(Option_t *);
204 // User Defined Sub-Routines
209 void InitChargedJets();
212 void GenerateTPCRandomConesPt();
213 void GenerateEMCalRandomConesPt();
215 void EstimateChargedRho0();
216 void EstimateChargedRho1();
217 void EstimateChargedRho2();
218 void EstimateChargedRhoN();
219 void EstimateChargedRhoScale();
220 void EstimateChargedRhokT();
221 void EstimateChargedRhokTScale();
222 void EstimateChargedRhoCMS();
223 void EstimateChargedRhoCMSScale();
225 void EstimateFullRho0();
226 void EstimateFullRho1();
227 void EstimateFullRho2();
228 void EstimateFullRhoN();
229 void EstimateFullRhoDijet();
230 void EstimateFullRhokT();
231 void EstimateFullRhoCMS();
233 void JetPtFullProfile();
234 void JetPtChargedProfile();
235 void JetPtEtaProfile();
236 void DeleteJetData(Bool_t EMCalOn);
238 // User Defined Functions
239 Bool_t IsDiJetEvent();
240 Bool_t InsideRect(Double_t phi,Double_t phi_min,Double_t phi_max,Double_t eta,Double_t eta_min,Double_t eta_max);
241 Bool_t IsInEMCal(Double_t phi,Double_t eta);
242 Bool_t IsInEMCalFull(Double_t r,Double_t phi,Double_t eta);
243 Bool_t IsInEMCalPart(Double_t r,Double_t phi,Double_t eta);
244 Bool_t IsInTPCFull(Double_t r,Double_t phi,Double_t eta);
245 Bool_t IsInTPC(Double_t r,Double_t phi,Double_t eta,Bool_t Complete);
246 Bool_t IsJetOverlap(AliEmcalJet *jet1,AliEmcalJet *jet2,Bool_t EMCalOn);
248 Double_t AreaWithinTPC(Double_t r,Double_t eta);
249 Double_t AreaWithinEMCal(Double_t r,Double_t phi,Double_t eta);
250 Double_t AreaEdge(Double_t r,Double_t z);
251 Double_t AreaOverlap(Double_t r,Double_t x,Double_t y);
252 Double_t TransverseArea(Double_t r,Double_t psi0,Double_t phi,Double_t eta);
253 Double_t MedianRhokT(Double_t *pTkTEntries, Double_t *RhokTEntries, Int_t nEntries);
255 // Used to set the R for the jet finders
256 inline void SetRjet(Int_t r)
261 // Used to set the Centrality Tag
262 inline void SetCentralityTag(const char *centag)
264 fCentralityTag = centag;
267 // Used to set apriori Scaling Factor
268 inline void SetScaleFactor(Double_t factor)
270 fScaleFactor = factor;
273 // Used to set the minimum pT required to analyize picotracks
274 inline void SetTrackPtCut(Double_t pT)
279 // Used to set the minimum pT required to analyize picotracks
280 inline void SetClusterPtCut(Double_t pT)
285 inline Double_t GetScaleFactor()
289 return fRhoFull/fRhoCharged;
295 TList *fOutput; // Output list
298 TH1D *fhTrackEta; //!
299 TH1D *fhTrackPhi; //!
300 TH1D *fhClusterPt; //!
301 TH1D *fhClusterEta; //!
302 TH1D *fhClusterPhi; //!
303 TH1D *fhCentrality; //!
304 TH1D *fhEMCalCellCounts; //! Plots the distribution of cluster counts in the EMCal. Used to determine which cells are hot (if any...)
306 TH2D *fhTrackEtaPhi; //!
307 TH2D *fhClusterEtaPhi; //!
308 TH2D *fhJetPtArea; //! Jet Area distribution vs Pt
309 TH2D *fhJetConstituentPt; //! Pt distribution of jet constituents
310 TH2D *fhRhoScale; //!
312 TProfile *fpEMCalEventMult; //!
313 TProfile *fpTPCEventMult; //!
314 TProfile *fpRhoScale; //! Scale of rho_total/rho_charged event/event vs centrality
316 TProfile **fpJetEtaProfile; //!
317 TProfile **fpJetAbsEtaProfile; //!
318 TProfile **fpChargedJetRProfile; //!
319 TProfile **fpJetRProfile; //!
321 TProfile2D *fpTrackPtProfile; //!
322 TProfile2D *fpClusterPtProfile; //!
324 TProfile3D **fpChargedJetEDProfile; //! Profile of Charged Jet Energy Density as a function of Jet pT, jet Eta, and distance from jet center in bins of 10% centrality cuts. Jet profile must be fully contained within TPC
325 TProfile3D **fpJetEDProfile; //! Profile of Jet Energy Density as a function of Jet pT, jet Eta, and distance from jet center in bins of 10% centrality cuts. Jet profile must be fully contained within EMCal
327 AlipAJetHistos *fTPCRawJets; //!
328 AlipAJetHistos *fEMCalRawJets; //!
330 AlipAJetHistos *fRhoFull0; //!
331 AlipAJetHistos *fRhoFull1; //!
332 AlipAJetHistos *fRhoFull2; //!
333 AlipAJetHistos *fRhoFullN; //!
334 AlipAJetHistos *fRhoFullDijet; //!
335 AlipAJetHistos *fRhoFullkT; //!
336 AlipAJetHistos *fRhoFullCMS; //!
338 AlipAJetHistos *fRhoCharged0; //!
339 AlipAJetHistos *fRhoCharged1; //!
340 AlipAJetHistos *fRhoCharged2; //!
341 AlipAJetHistos *fRhoChargedN; //!
342 AlipAJetHistos *fRhoChargedScale; //!
343 AlipAJetHistos *fRhoChargedkT; //!
344 AlipAJetHistos *fRhoChargedkTScale; //!
345 AlipAJetHistos *fRhoChargedCMS; //!
346 AlipAJetHistos *fRhoChargedCMSScale; //!
348 AlipAJetData *fTPCJet; //!
349 AlipAJetData *fTPCFullJet; //!
350 AlipAJetData *fTPCOnlyJet; //!
351 AlipAJetData *fTPCkTFullJet; //!
352 AlipAJetData *fEMCalJet; //!
353 AlipAJetData *fEMCalFullJet; //!
354 AlipAJetData *fEMCalPartJet; //!
355 AlipAJetData *fEMCalkTFullJet; //!
358 Bool_t fIsInitialized;
359 Int_t fRJET; // Used to set Anti_kt R. Called from AddTask Macro
360 Long_t fnEvents; // Counter for the number of events that made the physics selection with TPC+EMCal
361 Long_t fnEventsCharged; // Counter for the number of events that made the physics selection with TPC only
362 Long_t fnDiJetEvents; // Counter for the number of dijet events
364 // Protected Global Variables
365 Double_t fEMCalPhiMin;
366 Double_t fEMCalPhiMax;
367 Double_t fEMCalPhiTotal;
368 Double_t fEMCalEtaMin;
369 Double_t fEMCalEtaMax;
370 Double_t fEMCalEtaTotal;
375 Double_t fTPCPhiTotal;
378 Double_t fTPCEtaTotal;
382 Double_t fJetRForRho; // Required distance a track/cluster must be away from a jet for rho calculation
383 Double_t fJetAreaCutFrac; // Fudge factor for selecting on jets with threshold Pt or higher
384 Double_t fJetAreaThreshold;
385 Int_t fnEMCalCells; // Total number of cells in the EMCal
386 Double_t fScaleFactor; // Scale Factor obtained from Megan/Rosi
387 Double_t fTrackMinPt;
388 Double_t fClusterMinPt;
390 const char *fCentralityTag;
391 Int_t fCentralityBins;
392 Double_t fCentralityLow;
393 Double_t fCentralityUp;
394 Double_t fEventCentrality;
396 Double_t fRhoFull; // From Full Rho 0
397 Double_t fRhoCharged; // From Charged Rho 0
399 // Jet profile variables
400 Int_t fEtaProfileBins;
401 Double_t fEtaProfileLow;
402 Double_t fEtaProfileUp;
404 Int_t fEDProfileRBins;
405 Double_t fEDProfileRLow;
406 Double_t fEDProfileRUp;
408 Int_t fEDProfilePtBins;
409 Double_t fEDProfilePtLow;
410 Double_t fEDProfilePtUp;
412 Int_t fEDProfileEtaBins;
413 Double_t fEDProfileEtaLow;
414 Double_t fEDProfileEtaUp;
416 // General Global variables
420 Int_t fnAKTChargedJets;
422 Int_t fnKTChargedJets;
423 Int_t fnBckgClusters;
425 Double_t fTPCJetThreshold;
426 Double_t fEMCalJetThreshold;
429 Double_t fVertexWindow;
430 Double_t fVertexMaxR;
432 // Dynamic Array variables
433 TClonesArray *fOrgTracks; //!
434 TClonesArray *fOrgClusters; //!
435 TClonesArray *fmyAKTFullJets; //!
436 TClonesArray *fmyAKTChargedJets; //!
437 TClonesArray *fmyKTFullJets; //!
438 TClonesArray *fmyKTChargedJets; //!
440 TObjArray *fmyTracks; //!
441 TObjArray *fmyClusters; //!
443 Double_t *fEMCalRCBckgFluc; //! Stores the pT of RC Background clusters in EMCal at least 2R away from Leading Signal
444 Double_t *fTPCRCBckgFluc; //! Stores the pT of RC Background clusters in TPC at least 2R away from Leading Signal
445 Double_t *fEMCalRCBckgFlucSignal; //! Stores the pT of RC Background clusters in EMCal with no spatial restrictions
446 Double_t *fTPCRCBckgFlucSignal; //! Stores the pT of RC Background clusters in TPC with no spatial restrictionsl
448 AliAnalysisTaskFullpAJets(const AliAnalysisTaskFullpAJets&); // not implemented
449 AliAnalysisTaskFullpAJets& operator=(const AliAnalysisTaskFullpAJets&); // not implemented
451 ClassDef(AliAnalysisTaskFullpAJets, 1); // example of analysis