AliPhysics  vAN-20150429 (ffa5c54)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskPtEMCalTrigger.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKPTEMCALTRIGGER_H_
2 #define ALIANALYSISTASKPTEMCALTRIGGER_H_
3 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 // Author: Markus Fasel
7 
8 #include "AliAnalysisTaskEmcalJet.h"
9 #include "AliESDtrackCuts.h"
10 #include <TClonesArray.h>
11 #include <TList.h>
12 #include "AliCutValueRange.h"
13 
14 class TArrayD;
15 class Axis;
16 class AliClusterContainer;
17 class AliEmcalJet;
18 class AliESDtrack;
19 class AliJetContainer;
20 class AliParticleContainer;
21 class AliVTrack;
22 class AliVParticle;
23 
31 namespace EMCalTriggerPtAnalysis {
33 
34 class AliAnalysisTaskPtEMCalTrigger : public AliAnalysisTaskEmcalJet {
35 public:
41  };
42  static const Int_t kNJetRadii;
43  static const Double_t *kJetRadii;
44 
46  AliAnalysisTaskPtEMCalTrigger(const char *name);
48 
49  virtual void UserCreateOutputObjects();
50  virtual Bool_t Run();
51 
52  void AddESDTrackCuts(AliESDtrackCuts *trackCuts);
53  void AddCutsForAOD(AliESDtrackCuts *trackCuts, UInt_t filterBits);
54  void SetEtaRange(double etamin, double etamax) { fEtaRange.SetLimits(etamin, etamax); }
55  void SetPtRange(double ptmin, double ptmax) { fPtRange.SetLimits(ptmin, ptmax); }
56  void SetVertexRange(double vmin, double vmax) { fVertexRange.SetLimits(vmin, vmax); }
57  void SetClusterEnergyRange(double emin, double emax) { fEnergyRange.SetLimits(emin,emax); }
58  void SetSwapEta() { fSwapEta = kTRUE; }
60  void AddJetContainerName(const Char_t * contname, Bool_t isMC = kFALSE);
61  void SelectAllTracks(Bool_t doAll) { fSelectAllTracks = doAll; }
62 
63 private:
66  void CreateDefaultPtBinning(TArrayD &binning) const;
67  void CreateDefaultZVertexBinning(TArrayD &binning) const;
68  void CreateDefaultEtaBinning(TArrayD &binning) const;
69  void DefineAxis(TAxis &axis, const char *name, const char *title, const TArrayD &binning, const char **labels = NULL);
70  void DefineAxis(TAxis &axis, const char *name, const char *title, int nbins, double min, double max, const char **labels = NULL);
71  void FillEventHist(const char *trigger, double vz, bool isPileup);
72  void FillTrackHist(const char *trigger, const AliVTrack *track, double vz, bool isPileup, int cut, bool isMinBias, double jetradius = -1.);
73  void FillClusterHist(const char *trigger, const AliVCluster *clust, double vz, bool isPileup, bool isMinBias);
74  void FillMCParticleHist(const char *histname, const AliVParticle * const part, double vz, bool isPileup);
75  bool IsTrueTrack(const AliVTrack *const) const;
76  TString BuildTriggerString();
77  const AliVVertex *GetSPDVertex() const;
78  const AliEmcalJet *FoundTrackInJet(const AliVParticle * const track, AliJetContainer *const jets) const;
79  const AliEmcalJet *FoundClusterInJet(const AliVCluster * const clust, AliJetContainer *const jets) const;
80  bool TrackInJet(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, const AliParticleContainer *const particles) const;
81  bool ClusterInJet(const AliVCluster *const clust, const AliEmcalJet *reconstructedJet, const AliClusterContainer *const particles) const;
82  bool IsInRadius(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, Double_t radius) const;
83  bool IsInRadius(const AliVCluster *const clust, const AliEmcalJet *reconstructedJet, Double_t radius) const;
84 
86  TList *fListTrackCuts; // List of track cuts
87 
88  // Cuts
89  AliCutValueRange<double> fEtaRange; // Eta Selection Range
90  AliCutValueRange<double> fPtRange; // Pt Selection Range
91  AliCutValueRange<double> fEnergyRange; // Cluster energy selection range
93 
94  // Jet containers
95  TList fJetContainersMC; // List of jet containers for MC
96  TList fJetContainersData; // List of jet containers for Data
97 
98  // Settings
99  Bool_t fSelectAllTracks; // Loop over all tracks
100  Bool_t fSwapEta; // Allow swapping of the eta sign in asymmetric collision systems
101  Bool_t fUseTriggersFromTriggerMaker; // Use trigger classes from trigger maker
102 
103  ClassDef(AliAnalysisTaskPtEMCalTrigger, 1); // Analysis of EMCal triggered events
104 };
105 
106 }
107 #endif
void CreateDefaultPtBinning(TArrayD &binning) const
const AliEmcalJet * FoundTrackInJet(const AliVParticle *const track, AliJetContainer *const jets) const
AliAnalysisTaskPtEMCalTrigger & operator=(const AliAnalysisTaskPtEMCalTrigger &)
const AliEmcalJet * FoundClusterInJet(const AliVCluster *const clust, AliJetContainer *const jets) const
void AddESDTrackCuts(AliESDtrackCuts *trackCuts)
void FillTrackHist(const char *trigger, const AliVTrack *track, double vz, bool isPileup, int cut, bool isMinBias, double jetradius=-1.)
void AddCutsForAOD(AliESDtrackCuts *trackCuts, UInt_t filterBits)
void FillEventHist(const char *trigger, double vz, bool isPileup)
Container class for histograms for the high- charged particle analysis.
bool IsInRadius(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, Double_t radius) const
void AddJetContainerName(const Char_t *contname, Bool_t isMC=kFALSE)
void FillClusterHist(const char *trigger, const AliVCluster *clust, double vz, bool isPileup, bool isMinBias)
void DefineAxis(TAxis &axis, const char *name, const char *title, const TArrayD &binning, const char **labels=NULL)
void FillMCParticleHist(const char *histname, const AliVParticle *const part, double vz, bool isPileup)
void CreateDefaultZVertexBinning(TArrayD &binning) const
bool IsTrueTrack(const AliVTrack *const) const
ClassDef(AliAnalysisTaskPtEMCalTrigger, 1)
void CreateDefaultEtaBinning(TArrayD &binning) const
bool TrackInJet(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, const AliParticleContainer *const particles) const
bool ClusterInJet(const AliVCluster *const clust, const AliEmcalJet *reconstructedJet, const AliClusterContainer *const particles) const