StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TGenAcceptance.h
1 #ifndef TGenAcceptance_h
2 #define TGenAcceptance_h
3 
4 #include "TGenerator.h"
5 
6 class TLorentzVector;
7 
8 class TGenAcceptance : public TGenerator {
9 
10  protected:
11 
12  // acceptance cuts
13 
14  Float_t fPtCutMin; // Lower cut for transverse momentum
15  Float_t fPtCutMax; // Upper cut for transverse momentum
16 
17  Float_t fEtaCutMin; // Lower cut for pseudo-rapidity
18  Float_t fEtaCutMax; // Upper cut for pseudo-rapidity
19 
20  Float_t fYCutMin; // Lower cut for rapidity
21  Float_t fYCutMax; // Upper cut for rapidity
22 
23  Float_t fPCutMin; // Lower cut for total momentum
24  Float_t fPCutMax; // Upper cut for total momentum
25 
26  //Float_t fThetaCutMin; // Lower cut for theta angle
27  //Float_t fThetaCutMax; // Upper cut for theta angle
28 
29  Float_t fPhiCutMin; // Lower cut for azimuthal angle (in rad)
30  Float_t fPhiCutMax; // Upper cut for azimuthal angle (in rad)
31 
32  enum {
33  kPtRange = BIT(10),
34  kEtaRange = BIT(11),
35  kYRange = BIT(12),
36  kPRange = BIT(13),
37  kThetaRange = BIT(14),
38  kPhiRange = BIT(15)
39  };
40 
41  Bool_t CheckCuts(TLorentzVector *v) const;
42 
43  Bool_t CheckPtYPhi(Float_t p[3]) const;
44  Bool_t CheckPtYPhi(Float_t pt, Float_t y, Float_t phi) const;
45 
46  Bool_t CheckPXYZ(Float_t p[3]) const;
47  Bool_t CheckPXYZ(Float_t px, Float_t py, Float_t pz) const;
48 
49  //Bool_t ChackCuts(TParticle *p);
50 
51  public:
52 
53  TGenAcceptance() {}
54  TGenAcceptance(const char *name, const char *title = "Generator with Acceptance");
55 
56  virtual ~TGenAcceptance() {};
57 
58  //getters
59  Float_t GetPtCutLow() const {return fPtCutMin;}
60  Float_t GetPtCutHigh() const {return fPtCutMax;}
61 
62  Float_t GetEtaCutLow() const {return fEtaCutMin;}
63  Float_t GetEtaCutHigh() const {return fEtaCutMax;}
64 
65  Float_t GetYCutLow() const {return fYCutMin;}
66  Float_t GetYCutHigh() const {return fYCutMax;}
67 
68  //Float_t GetThetaCutLow() const {return fThetaCutMin;}
69  //Float_t GetThetaCutHigh() const {return fThetaCutMax;}
70 
71  // setters
72  void SetPtRange(Float_t lowPt, Float_t highPt);
73  void SetEtaRange(Float_t lowEta, Float_t highEta);
74  void SetMomentumRange(Float_t lowP, Float_t highP);
75  void SetYRange(Float_t lowY, Float_t highY);
76  void SetThetaRange(Float_t lowTheta, Float_t highTheta);
77  void SetPhiRange(Float_t lowPhi, Float_t highPhi);
78 
79  ClassDef(TGenAcceptance,1) // Generator with Acceptance
80 
81 };
82 
83 
84 #endif