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