AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
14 #if !(defined(__CINT__) || defined(__MAKECINT__))
17 #endif
18 
28 class AliParticleContainer : public AliEmcalContainer {
29  public:
31 
33  AliParticleContainer(const char *name);
34  virtual ~AliParticleContainer(){;}
35 
42  virtual TObject *operator[](int index) const { return GetParticle(index); }
43 
44  virtual Bool_t ApplyParticleCuts(const AliVParticle* vp, UInt_t &rejectionReason) const;
45  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
46  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptParticle(i, rejectionReason);}
47  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptParticle(dynamic_cast<const AliVParticle*>(obj), rejectionReason);}
48  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const ;
49  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const ;
50  Double_t GetParticlePtCut() const { return GetMinPt() ; }
51  Double_t GetParticleEtaMin() const { return GetMinEta() ; }
52  Double_t GetParticleEtaMax() const { return GetMaxEta() ; }
53  Double_t GetParticlePhiMin() const { return GetMinPhi() ; }
54  Double_t GetParticlePhiMax() const { return GetMaxPhi() ; }
55  void SetParticlePtCut(Double_t cut) { SetMinPt(cut) ; }
56  void SetParticleEtaLimits(Double_t min, Double_t max) { SetEtaLimits(min, max); }
57  void SetParticlePhiLimits(Double_t min, Double_t max) { SetPhiLimits(min, max); }
58  virtual AliVParticle *GetLeadingParticle(const char* opt="") ;
59  virtual AliVParticle *GetParticle(Int_t i=-1) const;
60  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const;
61  virtual AliVParticle *GetNextAcceptParticle() ;
62  virtual AliVParticle *GetNextParticle() ;
63  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part, Double_t mass) const;
64  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part) const;
65  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
66  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
67  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
68  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
69  Int_t GetNParticles() const {return GetNEntries();}
73  void SelectHIJING(Bool_t s) { if (s) fGeneratorIndex = 0; else fGeneratorIndex = -1; }
75 
76  const char* GetTitle() const;
77 
78 #if !(defined(__CINT__) || defined(__MAKECINT__))
79  const AliParticleIterableContainer all() const;
81 
84 #endif
85 
86  protected:
87 
91 
92  private:
93  AliParticleContainer(const AliParticleContainer& obj); // copy constructor
94  AliParticleContainer& operator=(const AliParticleContainer& other); // assignment
95 
97  ClassDef(AliParticleContainer,10);
99 
100 };
101 
111 int TestParticleContainerIterator(const AliParticleContainer *const cont, int iteratorType = 0, bool verbose = false);
112 
113 #endif
114 
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
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
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()