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