AliPhysics  ec7afe5 (ec7afe5)
 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 
80  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
81 
90  void SetRapidityShift(Double_t yshift) { fYshift = yshift; }
91 
96  void SetBeamDirection(BeamDirection_t beamdir) { fEtaSign = static_cast<Double_t>(beamdir); }
97 
102  void SetAnalysisUtil(AliAnalysisUtils *util) { fAliAnalysisUtils = util; }
103 
110  void SetEMCALTrackSelection(AliEmcalTrackSelection *sel) { fTrackCuts = sel; }
111 
118  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut.SetLimits(etamin, etamax); }
119 
126  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut.SetLimits(etamin, etamax); }
127 
133  void SetTrackPhiCut(double phimin, double phimax) { fPhiCut.SetLimits(phimin, phimax); }
134 
139  void SetMinPtTracks(Double_t minpt) { fMinPt = minpt; }
140 
149  void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel) { fTriggerSelection = sel; }
150 
159  AliEmcalTriggerOfflineSelection *GetOfflineTriggerSelection() const { return fTriggerSelection; }
160 
170  void SetPlotPID(Bool_t plotPID) { fStudyPID = plotPID; }
171 
178  void InitializeTrackCuts(TString cutname, bool isAOD);
179 
185  void SetWeightHandler(const AliEMCalTriggerWeightHandler * wh) { fWeightHandler = wh; }
186 
192  void SetTriggerAcceptanceOADB(const TString &name) { fNameAcceptanceOADB = name; }
193 
198  void SetStudyEMCALgeo(Bool_t doStudy) { fStudyEMCALgeo = doStudy; }
199 
206 
213 
214 protected:
215 
226  virtual void UserCreateOutputObjects();
227 
245  virtual bool Run();
246 
263  virtual bool IsEventSelected();
264 
272  virtual void ExecOnce();
273 
287  void FillTrackHistos(const TString &eventclass, Double_t weight, Bool_t posCharge, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t inEmcal, Bool_t isPrimary, const TString &pid);
288 
294  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
295 
304  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
305 
306 private:
307 
316  class PtBinning : public TCustomBinning{
317  public:
318 
322  PtBinning();
323 
327  virtual ~PtBinning() {}
328  };
329 
332 
333  AliEmcalTrackSelection *fTrackCuts;
334  AliEmcalTriggerOfflineSelection *fTriggerSelection;
335  THistManager *fHistos;
336  const AliEMCalTriggerWeightHandler *fWeightHandler;
337 
338  std::vector<TString> fEventTriggers;
339  Double_t fEventWeight;
340 
341  Double_t fYshift;
342  Double_t fEtaSign;
343  Double_t fMinPt;
344  AliCutValueRange<double> fEtaLabCut;
345  AliCutValueRange<double> fEtaCmsCut;
346  AliCutValueRange<double> fPhiCut;
347  Double_t fFracPtHard;
348  Bool_t fEnableSumw2;
349  Bool_t fStudyPID;
350  Bool_t fStudyEMCALgeo;
351 
352  TString fNameAcceptanceOADB;
353 
357 };
358 
359 } /* namespace EMCalTriggerPtAnalysis */
360 
361 #endif /* ALIANALYSISTASKCHARGEDPARTICLESREFMC_H */
void SetMinPtTracks(Double_t minpt)
Set minimum used to select track candidate.
Interface for virtual track selection.
virtual Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel)
Set offline trigger selection.
double Double_t
Definition: External.C:58
Base task in the EMCAL framework.
AliEmcalTriggerOfflineSelection * GetOfflineTriggerSelection() const
Get the trigger offline selection.
AliAnalysisTaskEmcal & operator=(const AliAnalysisTaskEmcal &)
Helper class selecting events on the presence of a trigger patch for the given type above threshold...
void SetRapidityShift(Double_t yshift)
Set rapidity shift originating from the asymmetric collision system.
const Double_t etamin
void SetStudyEMCALgeo(Bool_t doStudy)
Add histograms for tracks pointing to EMCAL supermodules.
static AliAnalysisTaskChargedParticlesRefMC * AddTaskChargedParticlesRefMCDefault(const TString &cutname="standard")
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
Helper class creating user defined custom binning.
void EnableSumw2(Bool_t doEnable)
Enable Sumw2 when creating the histograms.
Test class for charged particle distributions (MC case)
virtual Bool_t IsEventSelected()
Performing event selection.
const Double_t etamax
Container class for histograms.
Definition: THistManager.h:99
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
void SetEMCALTrackSelection(AliEmcalTrackSelection *sel)
Set the virtual track selection.
bool Bool_t
Definition: External.C:53
static AliAnalysisTaskChargedParticlesRefMC * AddTaskChargedParticlesRefMC(const TString &suffix)
const Double_t phimin