AliPhysics  b0c77bb (b0c77bb)
AliParticleContainer.h
Go to the documentation of this file.
1 #ifndef ALIPARTICLECONTAINER_H
2 #define ALIPARTICLECONTAINER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include <TArrayI.h>
7 #include <AliVParticle.h>
8 
9 class AliVEvent;
11 
12 #include "AliEmcalContainer.h"
13 #if !(defined(__CINT__) || defined(__MAKECINT__))
15 #endif
16 
17 #if !(defined(__CINT__) || defined(__MAKECINT__))
20 #endif
21 
31 class AliParticleContainer : public AliEmcalContainer {
32  public:
34 
36  AliParticleContainer(const char *name);
37  virtual ~AliParticleContainer(){;}
38 
45  virtual TObject *operator[](int index) const { return GetParticle(index); }
46 
47  virtual Bool_t ApplyParticleCuts(const AliVParticle* vp, UInt_t &rejectionReason) const;
48  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
49  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptParticle(i, rejectionReason);}
50  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptParticle(dynamic_cast<const AliVParticle*>(obj), rejectionReason);}
51  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const ;
52  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const ;
53  Double_t GetParticlePtCut() const { return GetMinPt() ; }
54  Double_t GetParticleEtaMin() const { return GetMinEta() ; }
55  Double_t GetParticleEtaMax() const { return GetMaxEta() ; }
56  Double_t GetParticlePhiMin() const { return GetMinPhi() ; }
57  Double_t GetParticlePhiMax() const { return GetMaxPhi() ; }
58  void SetParticlePtCut(Double_t cut) { SetMinPt(cut) ; }
59  void SetParticleEtaLimits(Double_t min, Double_t max) { SetEtaLimits(min, max); }
60  void SetParticlePhiLimits(Double_t min, Double_t max) { SetPhiLimits(min, max); }
61  virtual AliVParticle *GetLeadingParticle(const char* opt="") ;
62  virtual AliVParticle *GetParticle(Int_t i=-1) const;
63  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const;
64  virtual AliVParticle *GetNextAcceptParticle() ;
65  virtual AliVParticle *GetNextParticle() ;
66  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part, Double_t mass) const;
67  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part) const;
68  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
69  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
70  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
71  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
72  Int_t GetNParticles() const {return GetNEntries();}
76  void SelectHIJING(Bool_t s) { if (s) fGeneratorIndex = 0; else fGeneratorIndex = -1; }
78  void SetArray(const AliVEvent * event);
79 
80  const char* GetTitle() const;
81 
82 #if !(defined(__CINT__) || defined(__MAKECINT__))
85 
86  const AliParticleIterableContainer all() const;
88 
91 #endif
92 
93  protected:
94 
95 #if !(defined(__CINT__) || defined(__MAKECINT__))
97 #endif
98 
102 
103  private:
104  AliParticleContainer(const AliParticleContainer& obj); // copy constructor
105  AliParticleContainer& operator=(const AliParticleContainer& other); // assignment
106 
108  ClassDef(AliParticleContainer,11);
110 
111 };
112 
122 int TestParticleContainerIterator(const AliParticleContainer *const cont, int iteratorType = 0, bool verbose = false);
123 
124 #endif
125 
void SetParticlePtCut(Double_t cut)
virtual AliVParticle * GetNextAcceptParticle()
double Double_t
Definition: External.C:58
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
void SetArray(const AliVEvent *event)
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
virtual TObject * operator[](int index) const
const char * GetTitle() const
const AliParticleIterableContainer all() const
AliParticleContainer & operator=(const AliParticleContainer &other)
Double_t mass
Int_t GetNParticles() const
virtual Bool_t ApplyParticleCuts(const AliVParticle *vp, UInt_t &rejectionReason) const
EChargeCut_t fChargeCut
select particles according to their charge
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
TCanvas * c
Definition: TestFitELoss.C:172
Double_t GetParticleEtaMin() const
virtual Bool_t GetNextMomentum(TLorentzVector &mom)
Container for particles within the EMCAL framework.
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
virtual AliVParticle * GetLeadingParticle(const char *opt="")
virtual AliVParticle * GetParticle(Int_t i=-1) const
EMCALIterableContainer::AliEmcalIterableContainerT< AliVParticle, EMCALIterableContainer::operator_star_object< AliVParticle > > AliParticleIterableContainer
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
Double_t fMinDistanceTPCSectorEdge
require minimum distance to edge of TPC sector edge
static AliEmcalContainerIndexMap< TClonesArray, AliVParticle > fgEmcalContainerIndexMap
! Mapping from containers to indices
Double_t GetParticlePtCut() const
short Short_t
Definition: External.C:23
Short_t fGeneratorIndex
select MC particles with generator index (default = -1 = switch off selection)
void SetParticleEtaLimits(Double_t min, Double_t max)
Double_t GetParticlePhiMax() const
virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle *part, Double_t mass) const
Double_t GetParticleEtaMax() const
const AliParticleIterableMomentumContainer accepted_momentum() const
void SetGeneratorIndex(Short_t i)
Double_t GetParticlePhiMin() const
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
const AliParticleIterableContainer accepted() const
int TestParticleContainerIterator(const AliParticleContainer *const cont, int iteratorType=0, bool verbose=false)
EMCALIterableContainer::AliEmcalIterableContainerT< AliVParticle, EMCALIterableContainer::operator_star_pair< AliVParticle > > AliParticleIterableMomentumContainer
bool Bool_t
Definition: External.C:53
Int_t GetNAcceptedParticles() const
void SetParticlePhiLimits(Double_t min, Double_t max)
void SetMinDistanceTPCSectorEdge(Double_t min)
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
const AliParticleIterableMomentumContainer all_momentum() const
void SetCharge(EChargeCut_t c)
virtual AliVParticle * GetNextParticle()
static const AliEmcalContainerIndexMap< TClonesArray, AliVParticle > & GetEmcalContainerIndexMap()
Get the EMCal container utils associated with particle containers.