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  PndFtfDirect(const char *particle, const char *material, int targetA, const char *generator, double mom, bool noelastic = false);
58 
60  virtual ~PndFtfDirect();
61 
65  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
66  Bool_t ProcessEvent(FairPrimaryGenerator *primGen);
67  void SetVerbose(int v = 1) { fverbose = v; };
68  void SetNoElastic(bool n = true) { fNoElastics = n; };
69  void LoadG4();
70 
71  private:
72  void InitZero(); // initialize numbers etc. to defaults
73  void parseConfigfile(); // parse the configuration file
74  void Setup(); // setup
75  bool fDoSetup;
79  float fMom;
84  float fMode;
85  double fSeed;
86  double fRsigma;
87  float fThtMin;
88 
89  G4RunManager *fG4RunManager;
90  G4VUserPhysicsList *fG4VUserPhysicsList;
91  std::ifstream *fin;
92  Test30Material *fmate;
93  Test30Physics *fphys;
94  G4ParticleTable *fpartTable;
95 
96  CLHEP::RanluxEngine *fdefaultEngine;
97 
98  G4int fverbose;
99  G4bool fsaverand;
100  G4bool fNoElastics;
101  //
102  G4String fnamePart;
103  G4bool fionParticle;
104  G4double fPlab; // VU
105  G4double fenergy;
106  G4double fsigmae;
107  //
108  G4int fionZ, fionA;
109  G4int ftargetA;
110  G4String fnameMat;
111  //
112  G4bool fShen;
113  G4String fnameGen;
114  //
115  G4int fnevt;
116  G4int fmodu;
117  //
118  G4double ftheStep;
119  G4Material *fmaterial;
120  //
121  G4bool fxsbgg;
122  //
123  // // Track
124  CLHEP::Hep3Vector *faPosition;
125  G4double faTime;
126  CLHEP::Hep3Vector *faDirection;
127  G4double fnx, fny, fnz;
128 
129  G4ExcitationHandler *ftheDeExcitation;
130  G4Evaporation *ftheEvaporation;
131  G4PreCompoundModel *fthePreCompound;
132 
133  G4double fsigTot;
134  G4double fsigEl;
135  G4double fsigIn;
136 
137  int fnpart;
138  // Root initialization
139  // TFile f1("FTF.root","RECREATE","ROOT_Tree");
140 
141  Int_t factiveCnt;
142  // TTree* fTree = new TTree("data","FTF Background");
143  // TClonesArray* fEvt;
144 
145  // fEvt=new TClonesArray("TParticle",100);
146  // fTree->Branch("Npart",&activeCnt,"Npart/I");
147  // fTree->Branch("Particles",&fEvt, 32000,99);
148 
149  G4DynamicParticle *dParticle;
150  G4VProcess *proc;
151  G4Step *step;
152  G4Track *gTrack;
153  G4ParticleDefinition *part;
154 
155  // G4ParticleDefinition* gamma;
156  G4ParticleDefinition *electron;
157  G4ParticleDefinition *proton;
158  G4ParticleDefinition *neutron;
159  G4ParticleDefinition *pin;
160  G4ParticleDefinition *pip;
161  // G4ParticleDefinition* pi0;
162  G4ParticleDefinition *deu;
163  G4ParticleDefinition *tri;
164  G4ParticleDefinition *he3;
165  G4ParticleDefinition *alp;
166  // G4ParticleDefinition* ion;
167 
168  G4ParticleDefinition *anti_proton;
169  G4ParticleDefinition *anti_neutron;
170  G4ParticleDefinition *anti_deuteron;
171  G4ParticleDefinition *anti_triton;
172  G4ParticleDefinition *anti_He3;
173  G4ParticleDefinition *anti_alpha;
174 
175  void TestPointers()
176  {
177  std::cout << "PndFtfDirect::fin -> " << fin << std::endl;
178  std::cout << "PndFtfDirect::fmate -> " << fmate << std::endl;
179  std::cout << "PndFtfDirect::fphys -> " << fphys << std::endl;
180  std::cout << "PndFtfDirect::fpartTable -> " << fpartTable << std::endl;
181  std::cout << "PndFtfDirect::fdefaultEngine -> " << fdefaultEngine << std::endl;
182  std::cout << "PndFtfDirect::fmaterial -> " << fmaterial << std::endl;
183  std::cout << "PndFtfDirect::faPosition -> " << faPosition << std::endl;
184  std::cout << "PndFtfDirect::faDirection -> " << faDirection << std::endl;
185  std::cout << "PndFtfDirect::ftheDeExcitation -> " << ftheDeExcitation << std::endl;
186  std::cout << "PndFtfDirect::ftheEvaporation -> " << ftheEvaporation << std::endl;
187  std::cout << "PndFtfDirect::fthePreCompound -> " << fthePreCompound << std::endl;
188  std::cout << "PndFtfDirect::dParticle -> " << dParticle << std::endl;
189  std::cout << "PndFtfDirect::proc -> " << proc << std::endl;
190  std::cout << "PndFtfDirect::step -> " << step << std::endl;
191  std::cout << "PndFtfDirect::gTrack -> " << gTrack << std::endl;
192  std::cout << "PndFtfDirect::part -> " << part << std::endl;
193  std::cout << "PndFtfDirect::electron -> " << electron << std::endl;
194  std::cout << "PndFtfDirect::proton -> " << proton << std::endl;
195  std::cout << "PndFtfDirect::neutron -> " << neutron << std::endl;
196  std::cout << "PndFtfDirect::pin -> " << pin << std::endl;
197  std::cout << "PndFtfDirect::pip -> " << pip << std::endl;
198  std::cout << "PndFtfDirect::deu -> " << deu << std::endl;
199  std::cout << "PndFtfDirect::tri -> " << tri << std::endl;
200  std::cout << "PndFtfDirect::he3 -> " << he3 << std::endl;
201  std::cout << "PndFtfDirect::alp -> " << alp << std::endl;
202  std::cout << "PndFtfDirect::anti_proton -> " << anti_proton << std::endl;
203  std::cout << "PndFtfDirect::anti_neutron -> " << anti_neutron << std::endl;
204  std::cout << "PndFtfDirect::anti_deuteron -> " << anti_deuteron << std::endl;
205  std::cout << "PndFtfDirect::anti_triton -> " << anti_triton << std::endl;
206  std::cout << "PndFtfDirect::anti_He3 -> " << anti_He3 << std::endl;
207  std::cout << "PndFtfDirect::anti_alpha -> " << anti_alpha << std::endl;
208  };
209 
210  ClassDef(PndFtfDirect, 1);
211 };
212 
213 #endif
void SetNoElastic(bool n=true)
Definition: PndFtfDirect.h:68
__m128 v
Definition: P4_F32vec4.h:3
void SetVerbose(int v=1)
Definition: PndFtfDirect.h:67