b3f904cb3c9a825a9875d15ae863682d1ca51459
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliParticleContainer.h
1 #ifndef AliParticleContainer_H
2 #define AliParticleContainer_H
3
4 // $Id$
5
6 class AliVEvent;
7 class AliVParticle;
8
9 #include "AliAODMCParticle.h"
10
11 #include "AliEmcalContainer.h"
12
13 class AliParticleContainer : public AliEmcalContainer {
14  public:
15   AliParticleContainer();
16   AliParticleContainer(const char *name); 
17   virtual ~AliParticleContainer(){;}
18
19   Bool_t                      AcceptParticle(AliVParticle         *vp)       ;
20   Double_t                    GetParticlePtCut()                        const   { return fParticlePtCut; }
21   Double_t                    GetParticleEtaMin()                       const   { return fParticleMinEta; }
22   Double_t                    GetParticleEtaMax()                       const   { return fParticleMaxEta; }
23   Double_t                    GetParticlePhiMin()                       const   { return fParticleMinPhi; }
24   Double_t                    GetParticlePhiMax()                       const   { return fParticleMaxPhi; }
25   AliVParticle               *GetLeadingParticle(const char* opt="")         ;
26   AliVParticle               *GetParticle(Int_t i)                      const;
27   AliVParticle               *GetAcceptParticle(Int_t i)                     ;
28   AliVParticle               *GetParticleWithLabel(Int_t lab)           const;
29   AliVParticle               *GetAcceptParticleWithLabel(Int_t lab)          ;
30   AliVParticle               *GetNextAcceptParticle(Int_t i=-1)              ;
31   AliVParticle               *GetNextParticle(Int_t i=-1)                    ;
32   void                        GetMomentum(TLorentzVector &mom, Int_t i) const;
33   Int_t                       GetNParticles()                           const   {return GetNEntries();}
34   Int_t                       GetNAcceptedParticles()                   ;
35   void                        SetClassName(const char *clname);
36   void                        SetMCTrackBitMap(UInt_t m)                        { fMCTrackBitMap   = m ; }
37   void                        SetMinMCLabel(Int_t s)                            { fMinMCLabel      = s ; }
38   void                        SetParticlePtCut(Double_t cut)                    { fParticlePtCut = cut ; }
39   void                        SetParticleEtaLimits(Double_t min, Double_t max)  { fParticleMaxEta = max ; fParticleMinEta = min ; }
40   void                        SetParticlePhiLimits(Double_t min, Double_t max)  { fParticleMaxPhi = max ; fParticleMinPhi = min ; }
41   void                        SetTrackBitMap(UInt_t m)                          { fTrackBitMap     = m ; }
42   void                        SetMCFlag(UInt_t m)                               { fMCFlag          = m ; }
43   void                        SelectHIJING(Bool_t s)                            { if (s) fGeneratorIndex = 0; else fGeneratorIndex = -1; }
44   void                        SetGeneratorIndex(Short_t i)                      { fGeneratorIndex = i  ; }
45   void                        SelectPhysicalPrimaries(Bool_t s)                 { if (s) fMCFlag |=  AliAODMCParticle::kPhysicalPrim ; 
46                                                                                   else   fMCFlag &= ~AliAODMCParticle::kPhysicalPrim ; }
47   void                        SetCharge(Short_t c)                              { fCharge = c         ; }
48
49  protected:
50   Double_t                    fParticlePtCut;                 // cut on particle pt
51   Double_t                    fParticleMinEta;                // cut on particle eta
52   Double_t                    fParticleMaxEta;                // cut on particle eta
53   Double_t                    fParticleMinPhi;                // cut on particle phi
54   Double_t                    fParticleMaxPhi;                // cut on particle phi
55   UInt_t                      fTrackBitMap;                   // bit map of accepted tracks (non MC)
56   UInt_t                      fMCTrackBitMap;                 // bit map of accepted MC tracks
57   Int_t                       fMinMCLabel;                    // minimum MC label value for the tracks/clusters being considered MC particles
58   UInt_t                      fMCFlag;                        // select MC particles with flags
59   Short_t                     fGeneratorIndex;                // select MC particles with generator index (default = -1 = switch off selection)
60   Short_t                     fCharge;                        // select particles with charge=fCharge
61
62  private:
63   AliParticleContainer(const AliParticleContainer& obj); // copy constructor
64   AliParticleContainer& operator=(const AliParticleContainer& other); // assignment
65
66   ClassDef(AliParticleContainer,3);
67
68 };
69
70 #endif
71