AliPhysics  f9b5d69 (f9b5d69)
AliAnalysisTaskFullpAJets.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskFullpAJets_H
2 #define AliAnalysisTaskFullpAJets_H
3 
4 class TString;
5 class TH1F;
6 class TH2F;
7 class TH3F;
8 class THnSparse;
9 class TList;
10 class TProfile;
11 class TProfile2D;
12 class TProfile3D;
13 class TClonesArray;
14 class TObjArray;
15 class TLorentzVector;
16 class AliESDtrackCuts;
17 class AliEmcalJet;
18 class AliVEvent;
19 class AliEMCALGeometry;
20 class AliEMCALRecoUtils;
21 class AliVCaloCells;
22 class AliPicoTrack;
23 
25 #include "AliAnalysisTaskEmcal.h"
26 
28 {
29  // AlipAJetData Helper Class
31  {
32  public:
33  AlipAJetData();
34  AlipAJetData(const char *name, Bool_t isFull, Int_t nEntries);
35  virtual ~AlipAJetData();
36 
37  // User Defined Sub-Routines
38  void InitializeJetData(TClonesArray *jetList, Int_t nEntries);
39 
40  // Setters
41  void SetName(const char *name);
42  void SetIsJetsFull(Bool_t isFull);
43  void SetTotalEntries(Int_t nEntries);
44  void SetTotalJets(Int_t nJets);
45  void SetTotalSignalJets(Int_t nSignalJets);
46  void SetSignalCut(Double_t Pt);
47  void SetLeading(Int_t index, Double_t Pt);
48  void SetSubLeading(Int_t index, Double_t Pt);
49  void SetJetIndex(Int_t index, Int_t At);
50  void SetSignalJetIndex(Int_t index, Int_t At);
51  void SetIsJetInArray(Bool_t isInArray, Int_t At);
52  void SetAreaCutFraction(Double_t areaFraction);
53  void SetJetR(Double_t jetR);
54  void SetNEF(Double_t nef);
55  void SetSignalTrackPtBias(Bool_t chargedBias);
56 
57  // Getters
70  Double_t GetNEF();
71 
72  Int_t* GetJets() const {return fJetsIndex;}
73  Int_t* GetSignalJets() const {return fJetsSCIndex;}
74 
75  private:
76 
77  // Variables
78  const char *fName;
83 
89 
94 
99  };
100 
101  // AlipAJetHistos Helper Class
103  {
104  public:
105  AlipAJetHistos();
106  AlipAJetHistos(const char *name);
107  AlipAJetHistos(const char *name, TString centag, Bool_t doNEF = kFALSE);
108  AlipAJetHistos(const char *name, TString centag, Bool_t doNEF, Bool_t doNEFSignalOnly, Bool_t doTHnSparse, Bool_t do3DPlotting);
109 
110  virtual ~AlipAJetHistos();
111 
112  // User Defined Sub-Routines
113  void Init();
114  void FillRho(Double_t eventCentrality, Double_t rho);
115  void FillBSJS(Double_t eventCentrality, Double_t rho, Double_t signalCut, TClonesArray *jetList, Int_t *indexJetList, Int_t nIndexJetList);
116  void FillDeltaPt(Double_t eventCentrality, Double_t rho, Double_t jetRadius, Double_t *RCArray, Int_t nRC);
117  void FillDeltaPtSignal(Double_t eventCentrality, Double_t rho, Double_t jetRadius, Double_t *RCArray, Int_t nRC);
118  void FillDeltaPtNColl(Double_t eventCentrality, Double_t rho, Double_t jetRadius, Double_t *RCArray, Int_t nRC);
119  void FillBackgroundFluctuations(Double_t eventCentrality, Double_t rho, Double_t jetRadius);
120  void FillLeadingJetPtRho(Double_t jetPt, Double_t rho);
121  void DoNEFQAPlots(Bool_t doNEFAna);
122  void DoNEFSignalOnly(Bool_t doNEFSignalOnly);
123  void DoNEFAnalysis(Double_t nefCut, Double_t signalCut, TClonesArray *jetList, Int_t *indexJetList, Int_t nIndexJetList, TObjArray *clusterList, TClonesArray *orgClusterList, AliVEvent *event, AliEMCALGeometry *geometry, AliEMCALRecoUtils *recoUtils, AliVCaloCells *cells);
124  void FillMiscJetStats(TClonesArray *jetList, Int_t *indexJetList, Int_t nIndexJetList, TClonesArray *trackList, TClonesArray *clusterList, Double_t *vertex);
125  void FillJetEventCentrality(Double_t leadingJetPt, AliVEvent *event);
126 
127  // Setters
128  void SetName(const char *name);
129  void SetCentralityTag(TString name);
130  void SetCentralityRange(Int_t bins, Double_t low, Double_t up);
131  void SetPtRange(Int_t bins, Double_t low, Double_t up);
132  void SetRhoPtRange(Int_t bins, Double_t low, Double_t up);
133  void SetDeltaPtRange(Int_t bins, Double_t low, Double_t up);
134  void SetBackgroundFluctuationsPtRange(Int_t bins, Double_t low, Double_t up);
135  void SetLeadingJetPtRange(Int_t bins, Double_t low, Double_t up);
136  void SetLeadingChargedTrackPtRange(Int_t bins, Double_t low, Double_t up);
137  void SetNEFRange(Int_t bins, Double_t low, Double_t up);
138  void SetSignalTrackPtBias(Bool_t chargedBias);
139  void SetNEFJetDimensions(Int_t n);
140  void SetNEFClusterDimensions(Int_t n);
141  void SetRhoValue(Double_t value);
142  void DoTHnSparse(Bool_t doTHnSparse);
143  void Do3DPlotting(Bool_t do3DPlotting);
144 
145  // User Defined Functions
146  TList* GetOutputHistos();
147  Double_t GetRho();
148 
149  private:
151 
152  // Histograms
153  // This set of Histograms is for filling the Rho Spectral distributions
154  TH1F *fh020Rho;
155  TH1F *fh80100Rho;
156  TH1F *fhRho;
158 
159  // This set of Histograms is for filling the Background Subtracted Jet Spectra
160  TH1F *fh020BSPt;
161  TH1F *fh80100BSPt;
162  TH1F *fhBSPt;
164 
165  // This set of Histograms is for filling the Background Subtracted Signal Jet Spectra
168  TH1F *fhBSPtSignal;
170 
171  // This set of Histograms is for filling Delta Pt where the RC are at least 2R away from the leading Signal
172  TH1F *fh020DeltaPt;
174  TH1F *fhDeltaPt;
176 
177  // This set of Histograms is for filling Delta Pt where the RC have to spatial restrictions
182 
183  // This set of Histograms is for filling Delta Pt with NColl
188 
189  // This set of Histograms is for filling Background Fluctuations Spectra
192  TH1F *fhBckgFlucPt;
194 
195  // Profiles
196  TProfile *fpRho;
197  TProfile *fpLJetRho;
198 
199  // Jet Profile
214 
215  // Event Centrality vs Leading Jet Pt
218 
219  // Histograms for Neutral Energy Fraction
221 
223 
224  THnSparse *fhJetNEFInfo;
225  THnSparse *fhJetNEFSignalInfo;
226  THnSparse *fhClusterNEFInfo;
228 
231 
232  // Variables
233  const char *fName;
235 
239 
243 
247 
251 
255 
259 
261 
265 
271 
275 
278 
279  // These members are 'sourced' from the base class and are initalized in the constructor
284  };
285 
286  // AliAnalysisTaskFullpAJets
287  public:
289  AliAnalysisTaskFullpAJets(const char *name);
290  virtual ~AliAnalysisTaskFullpAJets();
291 
292  virtual void UserCreateOutputObjects();
293  virtual void UserExecOnce();
294 
295  virtual Bool_t Run();
296  virtual void Terminate(Option_t *);
297 
298  // User Defined Sub-Routines
299  void TrackCuts();
300  void ClusterCuts();
301  void EventCounts();
302  void TrackHisto();
303  void ClusterHisto();
304  void InitChargedJets();
305  void InitFullJets();
308 
309  void EstimateChargedRho0();
310  void EstimateChargedRho1();
311  void EstimateChargedRho2();
312  void EstimateChargedRhoN();
314  void EstimateChargedRhokT();
316  void EstimateChargedRhoCMS();
318 
319  void EstimateFullRho0();
320  void EstimateFullRho1();
321  void EstimateFullRho2();
322  void EstimateFullRhoN();
323  void EstimateFullRhoDijet();
324  void EstimateFullRhokT();
325  void EstimateFullRhoCMS();
326 
329 
330  void DeleteJetData(Int_t delOption);
331 
332  // User Defined Functions
334  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);
339  Bool_t IsInTPC(Double_t r,Double_t phi,Double_t eta,Bool_t Complete);
340  Bool_t IsJetOverlap(AliEmcalJet *jet1,AliEmcalJet *jet2,Bool_t EMCalOn);
341 
347  Double_t MedianRhokT(Double_t *pTkTEntries, Double_t *RhokTEntries, Int_t nEntries);
348 
349  // Used to set the R for the jet finders
350  inline void SetRjet(Int_t r)
351  {
352  fRJET = r;
353  };
354 
355  // Used to set the Centrality Tag
356  inline void SetCentralityTag(TString centag)
357  {
358  fCentralityTag = centag.Data();
359  };
360 
361  // Used to set apriori Scaling Factor
362  inline void SetScaleFactor(Double_t factor)
363  {
364  fScaleFactor = factor;
365  };
366 
367  // Used to set the minimum pT required to analyize picotracks
368  inline void SetTrackPtCut(Double_t pT)
369  {
370  fTrackMinPt = pT;
371  }
372 
373  // Used to set the minimum pT required to analyize picotracks
374  inline void SetClusterPtCut(Double_t pT)
375  {
376  fClusterMinPt = pT;
377  }
378 
379  // Used to set Tracks collection name
380  inline void SetTrackName(TString name)
381  {
382  fTrackName = name;
383  };
384 
385  // Used to set Clusters collection name
386  inline void SetClusterName(TString name)
387  {
388  fClusName = name;
389  };
390 
391  // Used to set kT Charged Jet collection name
392  inline void SetkTChargedJetName(TString name)
393  {
394  fkTChargedName = name;
395  };
396 
397  // Used to set anti-kT Charged Jet collection name
398  inline void SetAkTChargedJetName(TString name)
399  {
400  fAkTChargedName = name;
401  };
402 
403  // Used to set kT Full Jet collection name
404  inline void SetkTFullJetName(TString name)
405  {
406  fkTFullName = name;
407  };
408 
409  // Used to set anti-kT Full Jet collection name
410  inline void SetAkTFullJetName(TString name)
411  {
412  fAkTFullName = name;
413  };
414 
415  // Used to set Ncoll for Delta Pt
416  inline void SetNColl(Double_t ncoll)
417  {
418  fNColl = ncoll;
419  };
420 
421  inline void SetNEFSignalJetCut(Double_t nef)
422  {
423  fNEFSignalJetCut = nef;
424  };
425 
426  inline void DoNEFCalibration(Bool_t doNEF)
427  {
428  fDoNEF = doNEF;
429  };
430 
431  inline void SetJetChargeBias(Bool_t trackBias)
432  {
433  fSignalTrackBias = trackBias;
434  };
435 
436  inline void DoTrackQA(Bool_t doQA)
437  {
438  fTrackQA = doQA;
439  };
440 
441  inline void DoClusterQA(Bool_t doQA)
442  {
443  fClusterQA = doQA;
444  };
445 
446  inline void CalculateRhoJet(Int_t doRhoJet)
447  {
448  fCalculateRhoJet = doRhoJet;
449  };
450 
451  inline void DoNEFSignalOnly(Bool_t doNEF)
452  {
453  fDoNEFSignalOnly = doNEF;
454  };
455 
456  inline void DoVertexRCut(Bool_t doCut)
457  {
458  fDoVertexRCut = doCut;
459  };
460 
461  inline void SetMCParticleLevel(Bool_t mcPartLevel)
462  {
463  fMCPartLevel = mcPartLevel;
464  };
465 
467  {
468  fJetRAccept = r;
469  };
470 
471  inline void DoTHnSparse(Bool_t doTHnSparse)
472  {
473  fDoTHnSparse = doTHnSparse;
474  };
475 
476  inline void DoJetRhoDensity(Bool_t doJetRhoDensity)
477  {
478  fDoJetRhoDensity = doJetRhoDensity;
479  };
480 
481  inline void Do3DPlotting(Bool_t do3DPlotting)
482  {
483  fDo3DHistos = do3DPlotting;
484  };
485  private:
486  TList *fOutput;
489 
490  TH1F *fhTrackPt;
491  TH1F *fhTrackEta;
492  TH1F *fhTrackPhi;
499  TH1F *fhClusterPt;
500  TH1F *fhClusterEta;
501  TH1F *fhClusterPhi;
502  TH1F *fhCentrality;
504 
513 
523 
527 
531 
532  TProfile *fpEMCalEventMult;
533  TProfile *fpTPCEventMult;
534 
535  TProfile2D *fpTrackPtProfile;
536  TProfile2D *fpClusterPtProfile;
537 
538  TProfile3D *fpFullJetEDProfile;
539  TProfile3D *fpChargedJetEDProfile;
541 
544 
547 
555 
563 
574 
575  // Variables
577  Int_t fRJET; // Used to set Anti_kt R. Called from AddTask Macro
578  Long_t fnEvents; // Counter for the number of events that made the physics selection with TPC+EMCal
579  Long_t fnEventsCharged; // Counter for the number of events that made the physics selection with TPC only
580  Long_t fnDiJetEvents; // Counter for the number of dijet events
581  AliVEvent *fEvent;
582  AliEMCALRecoUtils *fRecoUtil;
583  AliEMCALGeometry *fEMCALGeometry;
584  AliVCaloCells *fCells;
596 
597  // Protected Global Variables
605 
613 
617 
618  Double_t fJetR; // Jet resolution parameter
619  Double_t fJetRAccept; // Jet radius used for additional acceptance constraint. Used to restrict eta acceptance in full ana
620  Double_t fFullEDJetR; // Radius used to calculate boundaries for jet within EMCal
621  Double_t fChargedEDJetR; // Radius used to calculate boundaries (in eta) for jet within TPC
622  Double_t fJetRForRho; // Required distance a track/cluster must be away from a jet for rho calculation
623  Double_t fJetAreaCutFrac; // Fudge factor for selecting on jets with threshold Pt or higher
625  Int_t fnEMCalCells; // Total number of cells in the EMCal
626  Double_t fScaleFactor; // Scale Factor obtained from Megan/Rosi
627  Double_t fNColl; // Used for partial rejection of signal from RC. Obtained via Glauber Calculations
631 
637 
638  Double_t fRhoFull; // From Full Rho 0
639  Double_t fRhoCharged; // From Charged Rho 0
640 
641  // General Global variables
651 
654 
658 
659  // Tracks and Clusters string names
662 
663  // Jet Finder string names
668 
669  // Dynamic Array variables
670  TClonesArray *fOrgTracks;
671  TClonesArray *fOrgClusters;
672  TClonesArray *fmyAKTFullJets;
673  TClonesArray *fmyAKTChargedJets;
674  TClonesArray *fmyKTFullJets;
675  TClonesArray *fmyKTChargedJets;
676 
679 
686 
687  AliAnalysisTaskFullpAJets(const AliAnalysisTaskFullpAJets&); // not implemented
689 
690  ClassDef(AliAnalysisTaskFullpAJets, 1); // example of analysis
691 };
692 #endif
THnSparse * fhClusterNEFInfo
Signal Jet NEF Information Histogram.
Double_t * fEMCalRCBckgFlucSignal
Stores the pT of RC Background clusters in TPC at least 2R away from Leading Signal.
void DoTHnSparse(Bool_t doTHnSparse)
Bool_t IsInEMCalFull(Double_t r, Double_t phi, Double_t eta)
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
THnSparse * fhJetNEFSignalInfo
Jet NEF Information Histogram.
Double_t AreaOverlap(Double_t r, Double_t x, Double_t y)
virtual 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.
Double_t MedianRhokT(Double_t *pTkTEntries, Double_t *RhokTEntries, Int_t nEntries)
Double_t * fTPCRCBckgFlucSignal
Stores the pT of RC Background clusters in EMCal with no spatial restrictions.
TH1F * fhTrackPt
Cluster QA List.
void DoJetRhoDensity(Bool_t doJetRhoDensity)
THnSparse * fhClusterNEFSignalInfo
Cluster Jet NEF Information Histogram.
void SetIsJetInArray(Bool_t isInArray, Int_t At)
TH1F * fhChargeAndNeutralEvents
Plots the distribution of cluster counts in the EMCal. Used to determine which cells are hot (if any...
virtual void UserExecOnce()
Task initializations handled in user tasks.
Bool_t IsJetOverlap(AliEmcalJet *jet1, AliEmcalJet *jet2, Bool_t EMCalOn)
int Int_t
Definition: External.C:63
Bool_t IsInEMCal(Double_t phi, Double_t eta)
void InitializeJetData(TClonesArray *jetList, Int_t nEntries)
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)
void SetMCParticleLevel(Bool_t mcPartLevel)
Double_t * fTPCRCBckgFluc
Stores the pT of RC Background clusters in EMCal at least 2R away from Leading Signal.
Bool_t IsInTPC(Double_t r, Double_t phi, Double_t eta, Bool_t Complete)
Double_t * fTPCRCBckgFlucNColl
Stores the pT of RC Background clusters in EMCal with no spatial restrictions.
Bool_t IsInEMCalPart(Double_t r, Double_t phi, Double_t eta)
Double_t AreaEdge(Double_t r, Double_t z)
Double_t TransverseArea(Double_t r, Double_t psi0, Double_t phi, Double_t eta)
Double_t AreaWithinEMCal(Double_t r, Double_t phi, Double_t eta)
void SetJetChargeBias(Bool_t trackBias)
TH1F * fhClusterShapeAll
Cluster Signal Jet NEF Information Histogram.
Double_t * fEMCalRCBckgFlucNColl
Stores the pT of RC Background clusters in TPC with no spatial restrictions.
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
const char Option_t
Definition: External.C:48
void SetScaleFactor(Double_t factor)
bool Bool_t
Definition: External.C:53
Bool_t IsInTPCFull(Double_t r, Double_t phi, Double_t eta)
void Do3DPlotting(Bool_t do3DPlotting)
Double_t AreaWithinTPC(Double_t r, Double_t eta)
AliAnalysisTaskFullpAJets & operator=(const AliAnalysisTaskFullpAJets &)