7 #include "AliAnalysisTaskSE.h"
8 #include "AliTRDTriggerAnalysis.h"
14 class AliAnalysisTaskJetsTriggerTRD :
15 public AliAnalysisTaskSE
18 AliAnalysisTaskJetsTriggerTRD(const char *name = "jets_trg_trd");
19 ~AliAnalysisTaskJetsTriggerTRD();
21 // analysis operations
22 virtual void UserCreateOutputObjects();
23 virtual Bool_t Notify();
24 virtual void UserExec(Option_t *option);
25 virtual void Terminate(const Option_t *option);
28 void SetNumberOfJetPtBins(Int_t n) { fNoJetPtBins = n; }
29 Int_t GetNumberOfJetPtBins() const { return fNoJetPtBins; }
31 void SetJetPtBinMax(Float_t ptmax) { fJetPtBinMax = ptmax; }
32 Float_t GetJetPtBinMax() const { return fJetPtBinMax; }
34 void SetJetBranchName(const char* const branchName) { strncpy(fJetBranchName, branchName, fgkStringLength-1); }
35 const char* GetJetBranchName() const { return fJetBranchName; }
37 Bool_t HasMC() const { return fMCEventHandler != 0; }
38 Bool_t AcceptTrackMC(Int_t track) const;
56 kHistLeadJetPtTrackPt,
84 kTrgMinBias = 1, // CINT1
89 // TRD jet trigger (HJT)
96 // analysis-level combinations
110 kTrgMC3x3Vtx = kTrgLast,
118 UInt_t fTriggerMask; // internal representation of trigger conditions
119 AliTRDTriggerAnalysis fTrdTrg; //! TRD trigger analysis
121 Bool_t DetectTriggers();
122 Bool_t DetectMCTriggers();
123 void MarkTrigger(Trigger_t trg) { fTriggerMask |= (1 << trg); }
124 void MarkTrigger(TriggerMC_t trg) { fTriggerMask |= (1 << trg); }
125 Bool_t IsTrigger(Trigger_t trg) const { return (fTriggerMask & (1 << trg)); }
127 Float_t GetEfficiencyTRD(Float_t /* pt */, Float_t /* eta */, Float_t /* phi */) { return 0.7; }
130 TList *fOutputList; // list of output objects
132 // histogram management
133 TH1 *fHist[kHistLast]; //! pointers to histogram
134 const char *fShortTaskId; //! short identifier for the task
136 Int_t fNoTriggers; // numbers of triggers used in histograms
138 TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
140 TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
141 Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
142 TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
143 Int_t xbins, Float_t xmin, Float_t xmax,
144 Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
145 TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
146 Int_t xbins, Float_t xmin, Float_t xmax,
147 Int_t ybins, Float_t ymin, Float_t ymax,
148 Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
150 void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
151 { GetHistogram(hist, idx)->Fill(x, weight); }
152 void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
153 { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
154 void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
155 { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
157 // task configuration
158 Int_t fNoJetPtBins; // number of bins for jet pt
159 Float_t fJetPtBinMax; // max jet pt (GeV) in histograms
161 Float_t fAvgXsection; // x-section from PYTHIA
162 Float_t fAvgTrials; // ratio of PYTHIA events
163 // over accepted events
164 Float_t fPtHard; // pt hard
165 Int_t fNTrials; // total number of trials
167 Float_t fGlobalEfficiencyGTU; // global efficiency used trigger emulation on MC
169 static const Int_t fgkStringLength = 100; // max length for the jet branch name
170 char fJetBranchName[fgkStringLength]; // jet branch name
172 const Int_t fGtuLabel; // constrain to tracks with given label
175 AliAnalysisTaskJetsTriggerTRD(const AliAnalysisTaskJetsTriggerTRD &rhs);
176 AliAnalysisTaskJetsTriggerTRD& operator=(const AliAnalysisTaskJetsTriggerTRD &rhs);
178 ClassDef(AliAnalysisTaskJetsTriggerTRD, 1);