FairRoot/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 
18 #ifndef PNDHYPBUPGENERATOR_H
19 #define PNDHYPBUPGENERATOR_H 1
20 
21 #include "../hyp/THParticle.h"
22 
23 
24 #include "FairGenerator.h"
25 
26 class TClonesArray;
27 class TFile;
28 class TTree;
29 class TVirtualMCStack;
30 
31 class PndPrimaryGenerator;
32 //class CbmParticle;
33 
34 
35 
36 class PndHypBupGenerator : public FairGenerator
37 {
38 
39  public:
40 
43 
44 
48  PndHypBupGenerator(const char* fileName);
49 
50 
52  virtual ~PndHypBupGenerator();
53 
56  void SetPhiRange (Double32_t phimin=0 , Double32_t phimax=360)
57  {fPhiMin=phimin; fPhiMax=phimax;};
58 
59  void SetThetaRange (Double32_t thetamin=0, Double32_t thetamax=90)
60  {fThetaMin=thetamin; fThetaMax=thetamax; fThetaRangeIsSet=kTRUE;};
61 
62  void SetPRange(Double32_t pmin=0 , Double32_t pmax=10)
63  {fPMin=pmin; fPMax=pmax; fPRangeIsSet=kTRUE;}
64 
65  void GammaEmissPar(Bool_t On=kFALSE){fGamOn=On;}
66 
71  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
72 
73 
74 
75  private:
76 
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 
95 
99  //Int_t RegisterIons();
100 
101 
102 
104  //std::map<TString,CbmParticle*> fIonMap; //!
105 
106 
108 
109 };
110 
111 #endif
const Char_t * fFileName
Event number.
TTree * fInputTree
Pointer to input file.
ClassDef(PndHypBupGenerator, 2)
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
TClonesArray * fParticles
Pointer to input tree.
Double32_t fThetaMin
Azimuth angle range [degree].
Bool_t fThetaRangeIsSet
Polar angle range in lab system [degree].
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
Double32_t fPhiMin
Transverse momentum range [GeV].