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