AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskPWGJEQA.h
Go to the documentation of this file.
1 
11 #ifndef ALIANALYSISTASKPWGJEQA_H
12 #define ALIANALYSISTASKPWGJEQA_H
13 
14 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
15  * See cxx source for full Copyright notice */
16 
17 class TH1;
18 class TH2;
19 class TH3;
20 class THnSparse;
21 class AliPHOSGeometry;
22 
23 #include "AliEventCuts.h"
24 #include "THistManager.h"
25 #include "AliTLorentzVector.h"
27 
45 
46 public:
47 
48  struct EventQA_t {
49  EventQA_t() : fCent(0), fNTracks(0), fMaxTrack() { fNClusters[0] = 0; fNClusters[1] = 0; fNClusters[2] = 0;}
55  };
56 
57  enum ClusterType {
58  kNA = -1,
59  kEMCal = 0,
60  kDCal = 1,
61  kPHOS = 2
62  };
63 
65  AliAnalysisTaskPWGJEQA(const char *name);
66  virtual ~AliAnalysisTaskPWGJEQA();
67 
69  const char* ntracks = "usedefault",
70  const char* nclusters = "usedefault",
71  const char* ncells = "usedefault",
72  const char *nGenLev = "mcparticles",
73  Bool_t doTrackQA = kTRUE,
74  Bool_t doCaloQA = kTRUE,
75  Bool_t doJetQA = kTRUE,
76  Bool_t doEventQA = kTRUE,
77  Double_t trackPtCut = 0.15,
78  Double_t clusECut = 0.30,
79  const char* suffix = ""
80  );
81 
83 
86  void SetCellEnergyCut(Float_t cut) { fCellEnergyCut = cut ; }
87  void SetGeneratorLevelName(const char* name) { fGeneratorLevelName = name ; }
88  void SetDetectorLevelName(const char* name) { fDetectorLevelName = name ; }
89 
90  void SetDoTrackQA(Bool_t b) { fDoTrackQA = b; }
91  void SetDoCaloQA(Bool_t b) { fDoCaloQA = b; }
92  void SetDoJetQA(Bool_t b) { fDoJetQA = b; }
93  void SetDoEventQA(Bool_t b) { fDoEventQA = b; }
95  void SetIsPtHard(Bool_t b) {fIsPtHard = b; }
96 
97 protected:
98 
99  void ExecOnce() ;
103  Bool_t UserNotify() ;
104 
105  void AllocateTrackHistograms() ;
106  void AllocateCellHistograms() ;
108  void AllocateJetHistograms() ;
110 
111  void FillTrackHistograms() ;
112  void FillCellHistograms() ;
113  void FillClusterHistograms() ;
114  void FillJetHistograms() ;
115  void FillEventQAHistograms() ;
116 
117  void GenerateHistoBins() ;
121  void FillDetectorLevelTHnSparse(Double_t cent, Double_t trackEta, Double_t trackPhi, Double_t trackPt,
122  Double_t sigma1OverPt, Byte_t trackType);
123  void FillGeneratorLevelTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Byte_t findable);
124  void FillMatchedParticlesTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt,
125  Double_t trackEta, Double_t trackPhi, Double_t trackPt, Byte_t trackType);
126  // Event selection
128  AliEventCuts fEventCuts;
131 
146 
147  // Service fields (non-streamed)
164  AliPHOSGeometry* fPHOSGeo ;
165 
167 
168 private:
169  AliAnalysisTaskPWGJEQA(const AliAnalysisTaskPWGJEQA&); // not implemented
170  AliAnalysisTaskPWGJEQA &operator=(const AliAnalysisTaskPWGJEQA&); // not implemented
171 
173  ClassDef(AliAnalysisTaskPWGJEQA, 5);
175 };
176 #endif
Double_t * fEtaHistBins
! eta bins
Double_t * fPtResHistBins
! pt res bins
void SetRejectOutlierEvents(Bool_t b)
Bool_t fDoEventQA
Set whether to enable event QA.
Int_t fNEtaHistBins
! number of eta bins
double Double_t
Definition: External.C:58
static AliAnalysisTaskPWGJEQA * AddTaskPWGJEQA(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *ncells="usedefault", const char *nGenLev="mcparticles", Bool_t doTrackQA=kTRUE, Bool_t doCaloQA=kTRUE, Bool_t doJetQA=kTRUE, Bool_t doEventQA=kTRUE, Double_t trackPtCut=0.15, Double_t clusECut=0.30, const char *suffix="")
Definition: External.C:244
Int_t fNPtResHistBins
! number of pt res bins
AliTrackContainer * fDetectorLevel
! detector level container
Int_t fNPhiHistBins
! number of phi bins
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Container with name, TClonesArray and cuts for particles.
Declaration of class AliTLorentzVector.
TList * fEventCutList
! Output list for event cut histograms
AliAnalysisTaskPWGJEQA()
Default constructor for ROOT I/O purposes.
THistManager fHistManager
Histogram manager.
Bool_t fRejectOutlierEvents
flag to reject pythia pt-hard jet outlier events
Int_t fNTotClusters[3]
!Total number of accepted clusters in current event (DCal/EMCal)
TString fDetectorLevelName
detector level container name
Bool_t FillHistograms()
Function filling histograms.
Bool_t fDoTrackQA
Set whether to enable track QA.
void SetCellEnergyCut(Float_t cut)
Double_t * fPtHistBins
! pt bins
AliEventCuts fEventCuts
event selection utility
void SetUseManualEvtCuts(Bool_t input)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
AliAnalysisTaskPWGJEQA & operator=(const AliAnalysisTaskPWGJEQA &)
AliPHOSGeometry * fPHOSGeo
! phos geometry
void FillDetectorLevelTHnSparse(Double_t cent, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Double_t sigma1OverPt, Byte_t trackType)
Int_t fNTotTracks
!Total number of accepted tracks in current event
Float_t fCellEnergyCut
Energy cell cut.
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
Double_t * fPtRelDiffHistBins
! pt relative difference bins
Int_t fNPtHistBins
! number of pt bins
void SetGeneratorLevelName(const char *name)
Int_t fNIntegerHistBins
! number of integer bins
Int_t fNCentHistBins
! number of cent bins
void ExecOnce()
Perform steps needed to initialize the analysis.
Double_t * fIntegerHistBins
! integer bins
void SetDetectorLevelName(const char *name)
void FillMatchedParticlesTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Byte_t trackType)
void FillGeneratorLevelTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Byte_t findable)
AliTLorentzVector fLeadingTrack
!Leading track in current event
Definition: External.C:220
void GenerateHistoBins()
Generate histogram binning arrays.
Bool_t fDoCaloQA
Set whether to enable cell/cluster QA.
This is a task used to do basic PWGJE QA on tracks, clusters, and jets.
Base task in the EMCAL jet framework.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
Container class for histograms.
Definition: THistManager.h:99
Bool_t fIsPtHard
flag to enable pt-hard histos and make available outlier cut
Bool_t fDoJetQA
Set whether to enable jet QA.
TString fGeneratorLevelName
generator level container name
Float_t fMaxPt
Histogram pt limit.
AliMCParticleContainer * fGeneratorLevel
! generator level container
bool Bool_t
Definition: External.C:53
Double_t * fCentHistBins
! cent bins
Container for MC-true particles within the EMCAL framework.
Int_t fNPtRelDiffHistBins
! number of pt relative difference bins
Definition: External.C:196
Double_t * fPhiHistBins
! phi bins
AliTLorentzVector fLeadingCluster[3]
!Leading cluster in current event (EMCal/DCal)