7 #include "AliAnalysisTaskSE.h"
13 class AliAnalysisTaskJetsTriggerTRD :
14 public AliAnalysisTaskSE
17 AliAnalysisTaskJetsTriggerTRD(const char *name = "jets_trg_trd");
18 ~AliAnalysisTaskJetsTriggerTRD();
20 // analysis operations
21 virtual void UserCreateOutputObjects();
22 virtual Bool_t Notify();
23 virtual void UserExec(Option_t *option);
24 virtual void Terminate(const Option_t *option);
27 void SetNumberOfJetPtBins(Int_t n) { fNoJetPtBins = n; }
28 Int_t GetNumberOfJetPtBins() const { return fNoJetPtBins; }
30 void SetJetPtBinMax(Float_t ptmax) { fJetPtBinMax = ptmax; }
31 Float_t GetJetPtBinMax() const { return fJetPtBinMax; }
33 void SetJetBranchName(const char* const branchName) { strncpy(fJetBranchName, branchName, fgkStringLength-1); }
34 const char* GetJetBranchName() const { return fJetBranchName; }
41 kHistJetPt, kHistJetPtITS, kHistJetPt3x3,
42 kHistJetPtEMC, kHistJetPtHJT,
66 UInt_t fTriggerMask; // internal representation of trigger conditions
68 Bool_t DetectTriggers();
69 void MarkTrigger(Trigger_t trg) { fTriggerMask |= (1 << trg); }
70 Bool_t IsTrigger(Trigger_t trg) const { return (fTriggerMask & (1 << trg)); }
73 TList *fOutputList; // list of output objects
75 // histogram management
76 TH1 *fHist[kHistLast]; //! pointers to histogram
77 const char *fShortTaskId; //! short identifier for the task
79 TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
81 TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
82 Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
83 TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
84 Int_t xbins, Float_t xmin, Float_t xmax,
85 Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
86 TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
87 Int_t xbins, Float_t xmin, Float_t xmax,
88 Int_t ybins, Float_t ymin, Float_t ymax,
89 Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
91 void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
92 { GetHistogram(hist, idx)->Fill(x, weight); }
93 void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
94 { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
95 void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
96 { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
99 Int_t fNoJetPtBins; // number of bins for jet pt
100 Float_t fJetPtBinMax; // max jet pt (GeV) in histograms
102 static const Int_t fgkStringLength = 100; // max length for the jet branch name
103 char fJetBranchName[fgkStringLength]; // jet branch name
106 AliAnalysisTaskJetsTriggerTRD(const AliAnalysisTaskJetsTriggerTRD &rhs);
107 AliAnalysisTaskJetsTriggerTRD& operator=(const AliAnalysisTaskJetsTriggerTRD &rhs);
109 ClassDef(AliAnalysisTaskJetsTriggerTRD, 1);