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; }
63 kTrgMinBias = 1, // CINT1
68 // TRD jet trigger (HJT)
78 UInt_t fTriggerMask; // internal representation of trigger conditions
80 Bool_t DetectTriggers();
81 void MarkTrigger(Trigger_t trg) { fTriggerMask |= (1 << trg); }
82 Bool_t IsTrigger(Trigger_t trg) const { return (fTriggerMask & (1 << trg)); }
85 TList *fOutputList; // list of output objects
87 // histogram management
88 TH1 *fHist[kHistLast]; //! pointers to histogram
89 const char *fShortTaskId; //! short identifier for the task
91 TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
93 TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
94 Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
95 TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
96 Int_t xbins, Float_t xmin, Float_t xmax,
97 Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
98 TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
99 Int_t xbins, Float_t xmin, Float_t xmax,
100 Int_t ybins, Float_t ymin, Float_t ymax,
101 Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
103 void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
104 { GetHistogram(hist, idx)->Fill(x, weight); }
105 void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
106 { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
107 void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
108 { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
110 // task configuration
111 Int_t fNoJetPtBins; // number of bins for jet pt
112 Float_t fJetPtBinMax; // max jet pt (GeV) in histograms
114 Float_t fXsection; // x-section from PYTHIA
115 Float_t fAvgTrials; // ratio of PYTHIA events
116 // over accepted events
117 Float_t fPtHard; // pt hard
119 static const Int_t fgkStringLength = 100; // max length for the jet branch name
120 char fJetBranchName[fgkStringLength]; // jet branch name
123 AliAnalysisTaskJetsTriggerTRD(const AliAnalysisTaskJetsTriggerTRD &rhs);
124 AliAnalysisTaskJetsTriggerTRD& operator=(const AliAnalysisTaskJetsTriggerTRD &rhs);
126 ClassDef(AliAnalysisTaskJetsTriggerTRD, 1);