AliPhysics  d009c82 (d009c82)
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;
21 class AliGenPythiaEventHeader;
22 class AliVParticle;
23 class AliMCEvent;
25 
26 namespace EMCalTriggerPtAnalysis {
27 
28 class AliEMCalTriggerWeightHandler;
29 class AliEmcalTriggerOfflineSelection;
30 
44 public:
54  kpPb = 1,
55  kPbp = -1
56  };
57 
62 
67  AliAnalysisTaskChargedParticlesRefMC(const char *name);
68 
73 
81  void EnableSumw2(Bool_t doEnable) { fEnableSumw2 = doEnable; }
82 
91  void SetRapidityShift(Double_t yshift) { fYshift = yshift; }
92 
97  void SetBeamDirection(BeamDirection_t beamdir) { fEtaSign = static_cast<Double_t>(beamdir); }
98 
103  void SetAnalysisUtil(AliAnalysisUtils *util) { fAliAnalysisUtils = util; }
104 
111  void SetEMCALTrackSelection(AliEmcalTrackSelection *sel) { fTrackCuts = sel; }
112 
119  void SetEtaLabCut(double etamin, double etamax) { fEtaLabCut.SetLimits(etamin, etamax); }
120 
127  void SetEtaCMSCut(double etamin, double etamax) { fEtaCmsCut.SetLimits(etamin, etamax); }
128 
134  void SetTrackPhiCut(double phimin, double phimax) { fPhiCut.SetLimits(phimin, phimax); }
135 
140  void SetMinPtTracks(Double_t minpt) { fMinPt = minpt; }
141 
150  void SetOfflineTriggerSelection(AliEmcalTriggerOfflineSelection *sel) { fTriggerSelection = sel; }
151 
161  void SetRequireTOFBunchCrossing(Bool_t doRequire) { fRequireTOFBunchCrossing = doRequire; }
162 
171  AliEmcalTriggerOfflineSelection *GetOfflineTriggerSelection() const { return fTriggerSelection; }
172 
182  void SetPlotPID(Bool_t plotPID) { fStudyPID = plotPID; }
183 
190  void InitializeTrackCuts(TString cutname, bool isAOD);
191 
197  void SetWeightHandler(const AliEMCalTriggerWeightHandler * wh) { fWeightHandler = wh; }
198 
204  void SetTriggerAcceptanceOADB(const TString &name) { fNameAcceptanceOADB = name; }
205 
210  void SetStudyEMCALgeo(Bool_t doStudy) { fStudyEMCALgeo = doStudy; }
211 
220  void SetExclusiveMinBias(Bool_t exclusiveMinBias) { fExclusiveMinBias = exclusiveMinBias; this->SetCaloTriggerPatchInfoName(fExclusiveMinBias ? "" : "EmcalTriggers"); }
221 
228 
235 
236 protected:
237 
248  virtual void UserCreateOutputObjects();
249 
267  virtual bool Run();
268 
285  virtual bool IsEventSelected();
286 
294  virtual void ExecOnce();
295 
309  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);
310 
316  TString GetFiredTriggerClasses(const TClonesArray * triggerpatches);
317 
326  Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent);
327 
328 private:
329 
338  class PtBinning : public TCustomBinning{
339  public:
340 
344  PtBinning();
345 
349  virtual ~PtBinning() {}
350  };
351 
354 
355  AliEmcalTrackSelection *fTrackCuts;
356  AliEmcalTriggerOfflineSelection *fTriggerSelection;
357  THistManager *fHistos;
358  const AliEMCalTriggerWeightHandler *fWeightHandler;
359 
360  std::vector<TString> fEventTriggers;
361  Double_t fEventWeight;
362 
363  Double_t fYshift;
364  Double_t fEtaSign;
365  Double_t fMinPt;
366  AliCutValueRange<double> fEtaLabCut;
367  AliCutValueRange<double> fEtaCmsCut;
368  AliCutValueRange<double> fPhiCut;
369  Double_t fFracPtHard;
370  Bool_t fEnableSumw2;
371  Bool_t fStudyPID;
372  Bool_t fStudyEMCALgeo;
373  Bool_t fExclusiveMinBias;
374  Bool_t fRequireTOFBunchCrossing;
375 
376  TString fNameAcceptanceOADB;
377 
381 };
382 
383 } /* namespace EMCalTriggerPtAnalysis */
384 
385 #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.
void SetCaloTriggerPatchInfoName(const char *n)
void SetExclusiveMinBias(Bool_t exclusiveMinBias)
Switch for whether the analysis runs only in min. bias mode.
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.
Analysis of high- tracks in triggered events.
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