PandaRoot
detectors/hyp/hypTools/PndHypBupGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndHypBupGenerator header file -----
3 // ----- Created by Alicia Sanchez -----
4 // -------------------------------------------------------------------------
5 
17 #ifndef PNDHYPBUPGENERATOR_H
18 #define PNDHYPBUPGENERATOR_H 1
19 
20 #include "THParticle.h"
21 
22 #include "FairGenerator.h"
23 
24 class TClonesArray;
25 class TFile;
26 class TTree;
27 class TVirtualMCStack;
28 
29 class PndPrimaryGenerator;
30 // class CbmParticle;
31 
32 class PndHypBupGenerator : public FairGenerator {
33 
34  public:
37 
41  PndHypBupGenerator(const char *fileName);
42 
44  virtual ~PndHypBupGenerator();
45 
48  void SetPhiRange(Double32_t phimin = 0, Double32_t phimax = 360)
49  {
50  fPhiMin = phimin;
51  fPhiMax = phimax;
52  };
53 
54  void SetThetaRange(Double32_t thetamin = 0, Double32_t thetamax = 90)
55  {
56  fThetaMin = thetamin;
57  fThetaMax = thetamax;
58  fThetaRangeIsSet = kTRUE;
59  };
60 
61  void SetPRange(Double32_t pmin = 0, Double32_t pmax = 10)
62  {
63  fPMin = pmin;
64  fPMax = pmax;
65  fPRangeIsSet = kTRUE;
66  }
67 
68  void GammaEmissPar(Bool_t On = kFALSE) { fGamOn = On; }
69 
74  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
75 
76  private:
78  Int_t iEvent;
79  const Char_t *fFileName;
80  TFile *fInputFile;
81  TTree *fInputTree;
82  TClonesArray *fParticles;
83 
84  Double32_t fPMin, fPMax;
85  Double32_t fPhiMin, fPhiMax;
86  Double32_t fThetaMin, fThetaMax;
87  Bool_t fThetaRangeIsSet; // True if theta range is set
88  Bool_t fPRangeIsSet; // True if abs.momentum range is set
89  Bool_t fGamOn; // True if. gamma emission is selected
90 
93  void CloseInput();
94 
98  // Int_t RegisterIons();
99 
101  // std::map<TString,CbmParticle*> fIonMap; //!
102 
103  ClassDef(PndHypBupGenerator, 2);
104 };
105 
106 #endif
virtual ~PndHypBupGenerator()
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)