AliPhysics  7dff9e1 (7dff9e1)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliParticleContainer.h
Go to the documentation of this file.
1 #ifndef ALIPARTICLECONTAINER_H
2 #define ALIPARTICLECONTAINER_H
3 
4 class AliVEvent;
5 class AliVParticle;
6 class AliVCuts;
7 
8 #include <TArrayC.h>
9 
10 #include "AliAODMCParticle.h"
11 #include "AliEmcalTrackSelection.h"
12 #include "AliEmcalContainer.h"
13 
15  public:
16 
18 
19  enum ETrackType_t {
20  kRejected = -1,
25  };
26 
28  AliParticleContainer(const char *name, const char *period = "");
29  virtual ~AliParticleContainer(){;}
30 
31  Bool_t AcceptParticle(AliVParticle *vp) ;
32  Bool_t AcceptParticle(Int_t i) ;
33  Double_t GetParticlePtCut() const { return fParticlePtCut ; }
34  Double_t GetParticleEtaMin() const { return fParticleMinEta ; }
35  Double_t GetParticleEtaMax() const { return fParticleMaxEta ; }
36  Double_t GetParticlePhiMin() const { return fParticleMinPhi ; }
37  Double_t GetParticlePhiMax() const { return fParticleMaxPhi ; }
38  AliVParticle *GetLeadingParticle(const char* opt="") ;
39  AliVParticle *GetParticle(Int_t i=-1) const;
40  AliVParticle *GetAcceptParticle(Int_t i=-1) ;
41  AliVParticle *GetParticleWithLabel(Int_t lab) const;
42  AliVParticle *GetAcceptParticleWithLabel(Int_t lab) ;
43  AliVParticle *GetNextAcceptParticle(Int_t i=-1) ;
44  AliVParticle *GetNextParticle(Int_t i=-1) ;
45  Bool_t GetMomentum(TLorentzVector &mom, Int_t i);
46  Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i);
47  Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1);
48  Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1);
49  Int_t GetNParticles() const {return GetNEntries();}
50  Int_t GetNAcceptedParticles() ;
52  Char_t GetTrackType(Int_t i) const { return i >= 0 && i < fTrackTypes.GetSize() ? fTrackTypes[i] : kUndefined ; }
53 
54  void SetArray(AliVEvent *event);
55 
56  void SetClassName(const char *clname);
57  void SetMCTrackBitMap(UInt_t m) { fMCTrackBitMap = m ; }
58  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
59  void SetMinMCLabelAccept(Int_t s) { fMinMCLabelAccept= s ; }
60  void SetParticlePtCut(Double_t cut) { fParticlePtCut = cut ; }
61  void SetParticleEtaLimits(Double_t min, Double_t max) { fParticleMaxEta = max ; fParticleMinEta = min ; }
62  void SetParticlePhiLimits(Double_t min, Double_t max, Double_t offset=0.) { fParticleMaxPhi = max ; fParticleMinPhi = min ; fPhiOffset = offset;}
64  void SetTrackBitMap(UInt_t m) { fTrackBitMap = m ; }
65  void SetMCFlag(UInt_t m) { fMCFlag = m ; }
66  void SelectHIJING(Bool_t s) { if (s) fGeneratorIndex = 0; else fGeneratorIndex = -1; }
67  void SetGeneratorIndex(Short_t i) { fGeneratorIndex = i ; }
68  void SelectPhysicalPrimaries(Bool_t s) { if (s) fMCFlag |= AliAODMCParticle::kPhysicalPrim ;
69  else fMCFlag &= ~AliAODMCParticle::kPhysicalPrim ; }
70  void SetCharge(Short_t c) { fCharge = c ; }
73 
74  void SetTrackCutsPeriod(const char* period) { fTrackCutsPeriod = period; }
75  void AddTrackCuts(AliVCuts *cuts);
76  Int_t GetNumberOfCutObjects() const;
77  AliVCuts *GetTrackCuts(Int_t icut);
78  void SetAODFilterBits(UInt_t bits) { fAODFilterBits = bits ; }
79  void AddAODFilterBit(UInt_t bit) { fAODFilterBits |= bit ; }
80  UInt_t GetAODFilterBits() const { return fAODFilterBits ; }
81 
84 
85  void NextEvent();
86 
87  static void SetDefTrackCutsPeriod(const char* period) { fgDefTrackCutsPeriod = period; }
88  static TString GetDefTrackCutsPeriod() { return fgDefTrackCutsPeriod ; }
89 
90  protected:
91  static TString fgDefTrackCutsPeriod;
92 
93  Double_t fParticlePtCut; // cut on particle pt
94  Double_t fParticleMinEta; // cut on particle eta
95  Double_t fParticleMaxEta; // cut on particle eta
96  Double_t fParticleMinPhi; // cut on particle phi
97  Double_t fParticleMaxPhi; // cut on particle phi
98  Double_t fPhiOffset; // phi offset
99  Double_t fMinDistanceTPCSectorEdge; // require minimum distance to edge of TPC sector edge
100  UInt_t fTrackBitMap; // bit map of accepted tracks (non MC)
101  UInt_t fMCTrackBitMap; // bit map of accepted MC tracks
102  Int_t fMinMCLabel; // minimum MC label value for the tracks/clusters being considered MC particles
103  Int_t fMinMCLabelAccept; // minimum MC label value to accept particle
104  UInt_t fMCFlag; // select MC particles with flags
105  Short_t fGeneratorIndex; // select MC particles with generator index (default = -1 = switch off selection)
106  Short_t fCharge; // select particles with charge=fCharge
107  ETrackFilterType_t fTrackFilterType; // track filter type
108  TObjArray *fListOfCuts; // list of track cut objects
109  Bool_t fSelectionModeAny; // accept track if any of the cuts is fulfilled
110  UInt_t fAODFilterBits; // track filter bits
111  TString fTrackCutsPeriod; // period string used to generate track cuts
113  TObjArray *fFilteredTracks;
114  TArrayC fTrackTypes;
115 
116  private:
117  AliParticleContainer(const AliParticleContainer& obj); // copy constructor
118  AliParticleContainer& operator=(const AliParticleContainer& other); // assignment
119 
121 
122 };
123 
124 #endif
125 
ETrackFilterType_t GetTrackFilterType() const
Interface for virtual track selection.
void SetParticlePtCut(Double_t cut)
Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1)
static TString GetDefTrackCutsPeriod()
Double_t fParticlePtCut
default period string used to generate track cuts
AliVParticle * GetParticleWithLabel(Int_t lab) const
AliParticleContainer & operator=(const AliParticleContainer &other)
void SetClassName(const char *clname)
Int_t GetNParticles() const
ETrackFilterType_t fTrackFilterType
Char_t GetTrackType(Int_t i) const
void SelectPhysicalPrimaries(Bool_t s)
Bool_t AcceptParticle(AliVParticle *vp)
TArrayC fTrackTypes
tracks filtered using fEmcalTrackSelection
static TString fgDefTrackCutsPeriod
Double_t GetParticleEtaMin() const
void SetFilterHybridTracks(Bool_t f)
UInt_t GetAODFilterBits() const
void SetTrackBitMap(UInt_t m)
AliVCuts * GetTrackCuts(Int_t icut)
AliVParticle * GetAcceptParticleWithLabel(Int_t lab)
void SetMinMCLabelAccept(Int_t s)
Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i)
void SetTrackCutsPeriod(const char *period)
void SetArray(AliVEvent *event)
AliEmcalTrackSelection::ETrackFilterType_t ETrackFilterType_t
static void SetDefTrackCutsPeriod(const char *period)
void SetTrackFilterType(ETrackFilterType_t f)
AliVParticle * GetLeadingParticle(const char *opt="")
AliVParticle * GetParticle(Int_t i=-1) const
Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1)
void AddTrackCuts(AliVCuts *cuts)
Bool_t GetMomentum(TLorentzVector &mom, Int_t i)
void AddAODFilterBit(UInt_t bit)
AliVParticle * GetNextAcceptParticle(Int_t i=-1)
Int_t GetNumberOfCutObjects() const
Double_t GetParticlePtCut() const
AliVParticle * GetNextParticle(Int_t i=-1)
void SetParticleEtaLimits(Double_t min, Double_t max)
TObjArray * fFilteredTracks
track selection object
Double_t GetParticlePhiMax() const
void SetMCTrackBitMap(UInt_t m)
Double_t GetParticleEtaMax() const
void SetAODFilterBits(UInt_t bits)
void SetGeneratorIndex(Short_t i)
Double_t GetParticlePhiMin() const
AliEmcalTrackSelection * fEmcalTrackSelection
void SetParticlePhiLimits(Double_t min, Double_t max, Double_t offset=0.)
Int_t GetNEntries() const
ClassDef(AliParticleContainer, 8)
AliVParticle * GetAcceptParticle(Int_t i=-1)
void SetMinDistanceTPCSectorEdge(Double_t min)
Declartion of class AliEmcalTrackSelection.