AliPhysics  6cf2591 (6cf2591)
 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 
109  void SetTrackSelection(AliEmcalTrackSelection * sel) { fTrackCuts = sel; }
110 
117  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut.SetLimits(etamin, etamax); }
118 
125  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut.SetLimits(etamin, etamax); }
126 
132  void SetTrackPhiCut(double phimin, double phimax) { fPhiCut.SetLimits(phimin, phimax); }
133 
142  void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel) { fTriggerSelection = sel; }
143 
152  AliEmcalTriggerOfflineSelection *GetOfflineTriggerSelection() const { return fTriggerSelection; }
153 
163  void SetPlotPID(Bool_t plotPID) { fStudyPID = plotPID; }
164 
171  void InitializeTrackCuts(TString cutname, bool isAOD);
172 
178  void SetWeightHandler(const AliEMCalTriggerWeightHandler * wh) { fWeightHandler = wh; }
179 
185  void SetTriggerAcceptanceOADB(const TString &name) { fNameAcceptanceOADB = name; }
186 
193 
200 
201 protected:
202 
213  virtual void UserCreateOutputObjects();
214 
232  virtual bool Run();
233 
250  virtual bool IsEventSelected();
251 
259  virtual void ExecOnce();
260 
273  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, const TString &pid);
274 
280  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
281 
290  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
291 
292 private:
293 
302  class PtBinning : public TCustomBinning{
303  public:
304 
308  PtBinning();
309 
313  virtual ~PtBinning() {}
314  };
315 
318 
319  AliEmcalTrackSelection *fTrackCuts;
320  AliEmcalTriggerOfflineSelection *fTriggerSelection;
321  THistManager *fHistos;
322  const AliEMCalTriggerWeightHandler *fWeightHandler;
323 
324  std::vector<TString> fEventTriggers;
325  Double_t fEventWeight;
326 
327  Double_t fYshift;
328  Double_t fEtaSign;
329  AliCutValueRange<double> fEtaLabCut;
330  AliCutValueRange<double> fEtaCmsCut;
331  AliCutValueRange<double> fPhiCut;
332  Double_t fFracPtHard;
333  Bool_t fEnableSumw2;
334  Bool_t fStudyPID;
335 
336  TString fNameAcceptanceOADB;
337 
341 };
342 
343 } /* namespace EMCalTriggerPtAnalysis */
344 
345 #endif /* ALIANALYSISTASKCHARGEDPARTICLESREFMC_H */
Interface for virtual track selection.
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
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()
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)
void SetTrackSelection(AliEmcalTrackSelection *sel)
Set the track selection.
const Double_t phimin