AliPhysics  6bc8652 (6bc8652)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskChargedParticlesRefMC.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKCHARGEDPARTICLESREFMC_H
2 #define ALIANALYSISTASKCHARGEDPARTICLESREFMC_H
3 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include "AliAnalysisTaskEmcal.h"
7 #include "AliCutValueRange.h"
8 #include <TString.h>
9 #include <TCustomBinning.h>
10 
11 #include <vector>
12 
13 class TArrayD;
14 class TClonesArray;
15 class THistManager;
16 
17 class AliAnalysisUtils;
18 class AliAODTrack;
19 class AliEMCALGeometry;
20 class AliESDtrack;
22 class AliGenPythiaEventHeader;
23 class AliVParticle;
24 class AliMCEvent;
25 
26 namespace EMCalTriggerPtAnalysis {
27 
28 class AliEMCalTriggerWeightHandler;
29 
43 public:
53  kpPb = 1,
54  kPbp = -1
55  };
56 
61 
66  AliAnalysisTaskChargedParticlesRefMC(const char *name);
67 
72 
79  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
80 
87  void SetRapidityShift(Double_t yshift) { fYshift = yshift; }
88 
93  void SetBeamDirection(BeamDirection_t beamdir) { fEtaSign = static_cast<Double_t>(beamdir); }
94 
99  void SetAnalysisUtil(AliAnalysisUtils *util) { fAliAnalysisUtils = util; }
100 
106  void SetTrackSelection(AliEmcalTrackSelection * sel) { fTrackCuts = sel; }
107 
114  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut.SetLimits(etamin, etamax); }
115 
122  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut.SetLimits(etamin, etamax); }
123 
129  void SetTrackPhiCut(double phimin, double phimax) { fPhiCut.SetLimits(phimin, phimax); }
130 
136  void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel) { fTriggerSelection = sel; }
137 
142  void SetPlotPID(Bool_t plotPID) { fStudyPID = plotPID; }
143 
150  void InitializeTrackCuts(TString cutname, bool isAOD);
151 
157  void SetWeightHandler(const AliEMCalTriggerWeightHandler * wh) { fWeightHandler = wh; }
158 
164  void SetTriggerAcceptanceOADB(const TString &name) { fNameAcceptanceOADB = name; }
165 
172 
179 
180 protected:
181 
191  virtual void UserCreateOutputObjects();
192 
208  virtual bool Run();
209 
224  virtual bool IsEventSelected();
225 
231  virtual void ExecOnce();
232 
244  void FillTrackHistos(const TString &eventclass, Double_t weight, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t inEmcal, const TString &pid);
245 
251  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
252 
261  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
262 
263 private:
264 
273  class PtBinning : public TCustomBinning{
274  public:
275 
279  PtBinning();
280 
284  virtual ~PtBinning() {}
285  };
286 
289 
290  AliEmcalTrackSelection *fTrackCuts;
291  AliEmcalTriggerOfflineSelection *fTriggerSelection;
292  THistManager *fHistos;
293  const AliEMCalTriggerWeightHandler *fWeightHandler;
294 
295  std::vector<TString> fEventTriggers;
296  Double_t fEventWeight;
297 
298  Double_t fYshift;
299  Double_t fEtaSign;
300  AliCutValueRange<double> fEtaLabCut;
301  AliCutValueRange<double> fEtaCmsCut;
302  AliCutValueRange<double> fPhiCut;
303  Double_t fFracPtHard;
304  Bool_t fEnableSumw2;
305  Bool_t fStudyPID;
306 
307  TString fNameAcceptanceOADB;
308 
312 };
313 
314 } /* namespace EMCalTriggerPtAnalysis */
315 
316 #endif /* ALIANALYSISTASKCHARGEDPARTICLESREFMC_H */
Interface for virtual track selection.
double Double_t
Definition: External.C:58
Base task in the EMCAL framework.
AliAnalysisTaskEmcal & operator=(const AliAnalysisTaskEmcal &)
Helper class selecting events on the presence of a trigger patch for the given type above threshold...
const Double_t etamin
static AliAnalysisTaskChargedParticlesRefMC * AddTaskChargedParticlesRefMCDefault(const TString &cutname="standard")
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
Helper class creating user defined custom binning.
Test class for charged particle distributions (MC case)
virtual Bool_t IsEventSelected()
const Double_t etamax
Container class for histograms.
Definition: THistManager.h:43
bool Bool_t
Definition: External.C:53
static AliAnalysisTaskChargedParticlesRefMC * AddTaskChargedParticlesRefMC(const TString &suffix)
const Double_t phimin