AliPhysics  a9863a5 (a9863a5)
 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;
10 class AliTLorentzVector;
11 
12 #include "AliEmcalContainer.h"
13 
15 
26  public:
28  AliParticleContainer(const char *name);
29  virtual ~AliParticleContainer(){;}
30 
37  virtual TObject *operator[](int index) const { return GetParticle(index); }
38 
39  virtual Bool_t ApplyParticleCuts(const AliVParticle* vp, UInt_t &rejectionReason) const;
40  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
41  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptParticle(i, rejectionReason);}
42  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptParticle(dynamic_cast<const AliVParticle*>(obj), rejectionReason);}
43  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const ;
44  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const ;
45  Double_t GetParticlePtCut() const { return GetMinPt() ; }
46  Double_t GetParticleEtaMin() const { return GetMinEta() ; }
47  Double_t GetParticleEtaMax() const { return GetMaxEta() ; }
48  Double_t GetParticlePhiMin() const { return GetMinPhi() ; }
49  Double_t GetParticlePhiMax() const { return GetMaxPhi() ; }
50  void SetParticlePtCut(Double_t cut) { SetMinPt(cut) ; }
51  void SetParticleEtaLimits(Double_t min, Double_t max) { SetEtaLimits(min, max); }
52  void SetParticlePhiLimits(Double_t min, Double_t max) { SetPhiLimits(min, max); }
53  virtual AliVParticle *GetLeadingParticle(const char* opt="") ;
54  virtual AliVParticle *GetParticle(Int_t i=-1) const;
55  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const;
56  virtual AliVParticle *GetNextAcceptParticle() ;
57  virtual AliVParticle *GetNextParticle() ;
58  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part, Double_t mass) const;
59  virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle* part) const;
60  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
61  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
62  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
63  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
64  Int_t GetNParticles() const {return GetNEntries();}
65  Int_t GetNAcceptedParticles() const;
67  void SetCharge(Short_t c) { fCharge = c ; }
68  void SelectHIJING(Bool_t s) { if (s) fGeneratorIndex = 0; else fGeneratorIndex = -1; }
69  void SetGeneratorIndex(Short_t i) { fGeneratorIndex = i ; }
70 
71  const char* GetTitle() const;
72 
73  const AliParticleIterableContainer all() const;
75 
80 
85 
86  protected:
87 
89  Short_t fCharge;
90  Short_t fGeneratorIndex;
91 
92  private:
93  AliParticleContainer(const AliParticleContainer& obj); // copy constructor
94  AliParticleContainer& operator=(const AliParticleContainer& other); // assignment
95 
97  ClassDef(AliParticleContainer,9);
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()
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
Double_t GetMinPhi() const
virtual TObject * operator[](int index) const
const char * GetTitle() const
const AliParticleIterableContainer all() const
AliParticleContainer & operator=(const AliParticleContainer &other)
Double_t GetMaxEta() const
Double_t mass
Int_t GetNParticles() const
virtual Bool_t ApplyParticleCuts(const AliVParticle *vp, UInt_t &rejectionReason) const
void SetMinPt(Double_t min)
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
AliParticleIterableContainer::iterator accept_end() const
AliParticleIterableContainer::iterator begin() const
void SetEtaLimits(Double_t min, Double_t max)
Double_t GetParticleEtaMin() const
AliEmcalIterableContainerT< AliVParticle > AliParticleIterableContainer
virtual Bool_t GetNextMomentum(TLorentzVector &mom)
bidirectional stl iterator over the EMCAL iterable container
Container for particles within the EMCAL framework.
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
AliParticleIterableContainer::iterator end() const
Double_t GetMaxPhi() const
Double_t GetMinEta() const
Double_t GetMinPt() const
virtual AliVParticle * GetLeadingParticle(const char *opt="")
virtual AliVParticle * GetParticle(Int_t i=-1) const
Base class for container structures within the EMCAL framework.
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Short_t fCharge
select particles with charge=fCharge
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
AliParticleIterableContainer::iterator rend() const
Double_t fMinDistanceTPCSectorEdge
require minimum distance to edge of TPC sector edge
Double_t GetParticlePtCut() const
Short_t fGeneratorIndex
select MC particles with generator index (default = -1 = switch off selection)
void SetParticleEtaLimits(Double_t min, Double_t max)
AliParticleIterableContainer::iterator accept_begin() const
AliParticleIterableContainer::iterator accept_rbegin() const
Double_t GetParticlePhiMax() const
virtual Bool_t GetMomentumFromParticle(TLorentzVector &mom, const AliVParticle *part, Double_t mass) const
Double_t GetParticleEtaMax() 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)
Int_t GetNEntries() const
void SetPhiLimits(Double_t min, Double_t max)
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
virtual AliVParticle * GetNextParticle()
AliParticleIterableContainer::iterator accept_rend() const
AliParticleIterableContainer::iterator rbegin() const