PandaRoot
PndFtfDirect.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFtfDirect header file -----
3 // ----- Created 11/04/08 by M.Al-Turany -----
4 // -------------------------------------------------------------------------
5 
18 #ifndef PND_FTFDIRECT_H
19 #define PND_FTFDIRECT_H
20 
21 #include "PndTargetGenerator.h"
22 #include "TF1.h"
23 
24 namespace CLHEP {
25 class RanluxEngine;
26 class Hep3Vector;
27 } // namespace CLHEP
28 #include "G4Types.hh"
29 #include "G4String.hh"
30 
31 class G4Evaporation;
32 class G4ExcitationHandler;
33 class G4PreCompoundModel;
34 class G4ParticleTable;
35 class Test30Material;
36 class Test30Physics;
37 
38 class G4RunManager;
39 class G4VUserPhysicsList;
40 class G4DynamicParticle;
41 class G4VProcess;
42 class G4Step;
43 class G4Track;
44 class G4ParticleDefinition;
45 class G4Material;
46 class TVirtualMCStack;
47 class FairPrimaryGenerator;
48 
50 
51  public:
52  PndFtfDirect();
53 
54  PndFtfDirect(const char *configfile);
55  PndFtfDirect(const PndFtfDirect &);
56  PndFtfDirect(const char *particle, const char *material, int targetA, const char *generator, double mom, int seed = 0, bool noelastic = false);
57 
59  virtual ~PndFtfDirect();
60 
64  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
65  Bool_t ProcessEvent(FairPrimaryGenerator *primGen);
66  void SetVerbose(int v = 1) { fverbose = v; };
67  void SetNoElastic(bool n = true) { fNoElastics = n; };
68  void LoadG4();
69 
70  private:
71  void InitZero(); // initialize numbers etc. to defaults
72  void parseConfigfile(); // parse the configuration file
73  void Setup(); // setup
74  bool fDoSetup;
78  float fMom;
83  float fMode;
84  double fSeed;
85  double fRsigma;
86  float fThtMin;
87 
88  G4RunManager *fG4RunManager;
89  G4VUserPhysicsList *fG4VUserPhysicsList;
90  std::ifstream *fin;
91  Test30Material *fmate;
92  Test30Physics *fphys;
93  G4ParticleTable *fpartTable;
94 
95  CLHEP::RanluxEngine *fdefaultEngine;
96 
97  G4int fverbose;
98  G4bool fsaverand;
99  G4bool fNoElastics;
100  //
101  G4String fnamePart;
102  G4bool fionParticle;
103  G4double fPlab; // VU
104  G4double fenergy;
105  G4double fsigmae;
106  //
107  G4int fionZ, fionA;
108  G4int ftargetA;
109  G4String fnameMat;
110  //
111  G4bool fShen;
112  G4String fnameGen;
113  //
114  G4int fnevt;
115  G4int fmodu;
116  //
117  G4double ftheStep;
118  G4Material *fmaterial;
119  //
120  G4bool fxsbgg;
121  //
122  // // Track
123  CLHEP::Hep3Vector *faPosition;
124  G4double faTime;
125  CLHEP::Hep3Vector *faDirection;
126  G4double fnx, fny, fnz;
127 
128  G4ExcitationHandler *ftheDeExcitation;
129  G4Evaporation *ftheEvaporation;
130  G4PreCompoundModel *fthePreCompound;
131 
132  G4double fsigTot;
133  G4double fsigEl;
134  G4double fsigIn;
135 
136  int fnpart;
137  // Root initialization
138  // TFile f1("FTF.root","RECREATE","ROOT_Tree");
139 
140  Int_t factiveCnt;
141  // TTree* fTree = new TTree("data","FTF Background");
142  // TClonesArray* fEvt;
143 
144  // fEvt=new TClonesArray("TParticle",100);
145  // fTree->Branch("Npart",&activeCnt,"Npart/I");
146  // fTree->Branch("Particles",&fEvt, 32000,99);
147 
148  G4DynamicParticle *dParticle;
149  G4VProcess *proc;
150  G4Step *step;
151  G4Track *gTrack;
152  G4ParticleDefinition *part;
153 
154  // G4ParticleDefinition* gamma;
155  G4ParticleDefinition *electron;
156  G4ParticleDefinition *proton;
157  G4ParticleDefinition *neutron;
158  G4ParticleDefinition *pin;
159  G4ParticleDefinition *pip;
160  // G4ParticleDefinition* pi0;
161  G4ParticleDefinition *deu;
162  G4ParticleDefinition *tri;
163  G4ParticleDefinition *he3;
164  G4ParticleDefinition *alp;
165  // G4ParticleDefinition* ion;
166 
167  G4ParticleDefinition *anti_proton;
168  G4ParticleDefinition *anti_neutron;
169  G4ParticleDefinition *anti_deuteron;
170  G4ParticleDefinition *anti_triton;
171  G4ParticleDefinition *anti_He3;
172  G4ParticleDefinition *anti_alpha;
173 
174  void TestPointers()
175  {
176  std::cout << "PndFtfDirect::fin -> " << fin << std::endl;
177  std::cout << "PndFtfDirect::fmate -> " << fmate << std::endl;
178  std::cout << "PndFtfDirect::fphys -> " << fphys << std::endl;
179  std::cout << "PndFtfDirect::fpartTable -> " << fpartTable << std::endl;
180  std::cout << "PndFtfDirect::fdefaultEngine -> " << fdefaultEngine << std::endl;
181  std::cout << "PndFtfDirect::fmaterial -> " << fmaterial << std::endl;
182  std::cout << "PndFtfDirect::faPosition -> " << faPosition << std::endl;
183  std::cout << "PndFtfDirect::faDirection -> " << faDirection << std::endl;
184  std::cout << "PndFtfDirect::ftheDeExcitation -> " << ftheDeExcitation << std::endl;
185  std::cout << "PndFtfDirect::ftheEvaporation -> " << ftheEvaporation << std::endl;
186  std::cout << "PndFtfDirect::fthePreCompound -> " << fthePreCompound << std::endl;
187  std::cout << "PndFtfDirect::dParticle -> " << dParticle << std::endl;
188  std::cout << "PndFtfDirect::proc -> " << proc << std::endl;
189  std::cout << "PndFtfDirect::step -> " << step << std::endl;
190  std::cout << "PndFtfDirect::gTrack -> " << gTrack << std::endl;
191  std::cout << "PndFtfDirect::part -> " << part << std::endl;
192  std::cout << "PndFtfDirect::electron -> " << electron << std::endl;
193  std::cout << "PndFtfDirect::proton -> " << proton << std::endl;
194  std::cout << "PndFtfDirect::neutron -> " << neutron << std::endl;
195  std::cout << "PndFtfDirect::pin -> " << pin << std::endl;
196  std::cout << "PndFtfDirect::pip -> " << pip << std::endl;
197  std::cout << "PndFtfDirect::deu -> " << deu << std::endl;
198  std::cout << "PndFtfDirect::tri -> " << tri << std::endl;
199  std::cout << "PndFtfDirect::he3 -> " << he3 << std::endl;
200  std::cout << "PndFtfDirect::alp -> " << alp << std::endl;
201  std::cout << "PndFtfDirect::anti_proton -> " << anti_proton << std::endl;
202  std::cout << "PndFtfDirect::anti_neutron -> " << anti_neutron << std::endl;
203  std::cout << "PndFtfDirect::anti_deuteron -> " << anti_deuteron << std::endl;
204  std::cout << "PndFtfDirect::anti_triton -> " << anti_triton << std::endl;
205  std::cout << "PndFtfDirect::anti_He3 -> " << anti_He3 << std::endl;
206  std::cout << "PndFtfDirect::anti_alpha -> " << anti_alpha << std::endl;
207  };
208 
209  ClassDef(PndFtfDirect, 1);
210 };
211 
212 #endif
void SetNoElastic(bool n=true)
Definition: PndFtfDirect.h:67
__m128 v
Definition: P4_F32vec4.h:3
void SetVerbose(int v=1)
Definition: PndFtfDirect.h:66