AliPhysics  68dfc25 (68dfc25)
 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 
160  void SetRequireTOFBunchCrossing(Bool_t doRequire) { fRequireTOFBunchCrossing = doRequire; }
161 
170  AliEmcalTriggerOfflineSelection *GetOfflineTriggerSelection() const { return fTriggerSelection; }
171 
181  void SetPlotPID(Bool_t plotPID) { fStudyPID = plotPID; }
182 
189  void InitializeTrackCuts(TString cutname, bool isAOD);
190 
196  void SetWeightHandler(const AliEMCalTriggerWeightHandler * wh) { fWeightHandler = wh; }
197 
203  void SetTriggerAcceptanceOADB(const TString &name) { fNameAcceptanceOADB = name; }
204 
209  void SetStudyEMCALgeo(Bool_t doStudy) { fStudyEMCALgeo = doStudy; }
210 
217 
224 
225 protected:
226 
237  virtual void UserCreateOutputObjects();
238 
256  virtual bool Run();
257 
274  virtual bool IsEventSelected();
275 
283  virtual void ExecOnce();
284 
298  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);
299 
305  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
306 
315  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
316 
317 private:
318 
327  class PtBinning : public TCustomBinning{
328  public:
329 
333  PtBinning();
334 
338  virtual ~PtBinning() {}
339  };
340 
343 
344  AliEmcalTrackSelection *fTrackCuts;
345  AliEmcalTriggerOfflineSelection *fTriggerSelection;
346  THistManager *fHistos;
347  const AliEMCalTriggerWeightHandler *fWeightHandler;
348 
349  std::vector<TString> fEventTriggers;
350  Double_t fEventWeight;
351 
352  Double_t fYshift;
353  Double_t fEtaSign;
354  Double_t fMinPt;
355  AliCutValueRange<double> fEtaLabCut;
356  AliCutValueRange<double> fEtaCmsCut;
357  AliCutValueRange<double> fPhiCut;
358  Double_t fFracPtHard;
359  Bool_t fEnableSumw2;
360  Bool_t fStudyPID;
361  Bool_t fStudyEMCALgeo;
362  Bool_t fRequireTOFBunchCrossing;
363 
364  TString fNameAcceptanceOADB;
365 
369 };
370 
371 } /* namespace EMCalTriggerPtAnalysis */
372 
373 #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)
void SetRequireTOFBunchCrossing(Bool_t doRequire)
Require bunch crossing information of track obtained from TOF (if available) matches the bunch crossi...
const Double_t phimin