ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STCyclotronPhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file STCyclotronPhysicsList.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // Author: F. Poignant, floriane.poignant@gmail.com
27 //
28 
30 #include "G4Proton.hh"
31 #include "G4Neutron.hh"
32 #include "G4Electron.hh"
33 #include "G4Positron.hh"
34 #include "G4Gamma.hh"
35 #include "G4Deuteron.hh"
36 
37 //Physic Lists (contained inside the Geant 4 distribution)
39 #include "G4DecayPhysics.hh"
40 #include "G4Decay.hh"
41 #include "G4StepLimiter.hh"
42 #include "G4LossTableManager.hh"
43 #include "G4UnitsTable.hh"
44 #include "G4SystemOfUnits.hh"
45 #include "G4ProcessManager.hh"
46 #include "G4Region.hh"
47 #include "G4RegionStore.hh"
48 
49 #include "G4EmExtraPhysics.hh"
50 #include "G4EmParameters.hh"
51 #include "G4NuclideTable.hh"
52 
58 //#include "QGSP_BIC_HP.hh"
59 #include "G4PhysListFactory.hh"
60 #include "G4DeexPrecoParameters.hh"
61 #include "G4NuclideTable.hh"
62 
65 
66  //add new units for radioActive decays
67 
68  new G4UnitDefinition( "millielectronVolt", "meV", "Energy", 1.e-3*eV);
69  const G4double minute = 60*second;
70  const G4double hour = 60*minute;
71  const G4double day = 24*hour;
72  const G4double year = 365*day;
73  new G4UnitDefinition("minute", "min", "Time", minute);
74  new G4UnitDefinition("hour", "h", "Time", hour);
75  new G4UnitDefinition("day", "d", "Time", day);
76  new G4UnitDefinition("year", "y", "Time", year);
77 
78  // Mandatory for G4NuclideTable
79  // Half-life threshold must be set small or many short-lived isomers
80  // will not be assigned life times (default to 0)
83 
84  //---
85  fDetector = det;
86 
88 
89  defaultCutValue = 0.1*mm;
93 
96 
102 
108 
109  //EM physics
111  fEmName = G4String("emstandard_opt3");
112 
113  //Decay physics and all particles
116 
117  //Hadron physics
119  //fHadPhysicsList = new G4HadronPhysicsQGSP_BIC(0);
120 
121 
122 
123 
124 
125 }
126 
128 {
129 
130  delete fEmPhysicsList ;
131  delete fDecPhysicsList;
132  delete fRaddecayList;
133  delete fHadPhysicsList;
134 
135 
136 }
137 
139 {
140 
147 
149 
150 
151 }
152 
154 {
155  // Define transportation process
156 
157 
159 
160  //electromagnetic physics list
162  //em_config.AddModels();
163 
164  //decay physics list
167 
168  //hadronic physics lists
170 
171  //Get the value of the fThickness of foil and target
174 
175  //Update the cuts with the 1/2 of the thickness of the foil/target
176  //SetCuts();
177 
179 
180 
181 
182 }
183 
185 {
186 
187  if (verboseLevel >0){
188  G4cout << "PhysicsList::SetCuts:";
189  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
190  }
191 
192  // set cut values for gamma at first and for e- second and next for e+,
193  // because some processes for e+/e- need cut values for gamma
194  SetCutValue(fCutForGamma, "gamma");
197 
198  // Set cuts for detector
202 }
203 
205 {
206  fCutForGamma = cut;
208 }
209 
211 {
212  fCutForElectron = cut;
214 }
215 
217 {
218  fCutForPositron = cut;
220 }
221 
222 void STCyclotronPhysicsList::SetCutTarget(G4double cutProton, G4double cutElectron, G4double cutPositron, G4double cutGamma, G4double cutNeutron){
223 
224  fCutTargetProton = cutProton*mm;
225  fCutTargetElectron = cutElectron*mm;
226  fCutTargetPositron = cutPositron*mm;
227  fCutTargetGamma = cutGamma*mm;
228  fCutTargetNeutron = cutNeutron*mm;
229 
230  G4String regionNameTarget = "Target";
231  G4Region* regionTarget = G4RegionStore::GetInstance()->GetRegion(regionNameTarget);
232 
233  G4ProductionCuts* cutsTarget = new G4ProductionCuts ;
234  cutsTarget -> SetProductionCut(fCutTargetGamma,G4ProductionCuts::GetIndex("gamma"));
235  cutsTarget -> SetProductionCut(fCutTargetElectron,G4ProductionCuts::GetIndex("e-"));
236  cutsTarget -> SetProductionCut(fCutTargetPositron,G4ProductionCuts::GetIndex("e+"));
237  cutsTarget -> SetProductionCut(fCutTargetProton,G4ProductionCuts::GetIndex("proton"));
239  cutsTarget -> SetProductionCut(fCutTargetNeutron,G4ProductionCuts::GetIndex("neutron"));
240 
241  regionTarget -> SetProductionCuts(cutsTarget);
242 
243 }
244 
245 void STCyclotronPhysicsList::SetCutFoil(G4double cutProton, G4double cutElectron, G4double cutPositron, G4double cutGamma, G4double cutNeutron){
246 
247  fCutFoilProton = cutProton*mm;
248  fCutFoilElectron = cutElectron*mm;
249  fCutFoilPositron = cutPositron*mm;
250  fCutFoilGamma = cutGamma*mm;
251  fCutFoilNeutron = cutNeutron*mm;
252 
254  G4String regionNameFoil = "Foil";
255  G4Region* regionFoil = G4RegionStore::GetInstance()->GetRegion(regionNameFoil);
256 
257  G4ProductionCuts* cutsFoil = new G4ProductionCuts ;
258  cutsFoil -> SetProductionCut(fCutFoilGamma,G4ProductionCuts::GetIndex("gamma"));
259  cutsFoil -> SetProductionCut(fCutFoilElectron,G4ProductionCuts::GetIndex("e-"));
260  cutsFoil -> SetProductionCut(fCutFoilPositron,G4ProductionCuts::GetIndex("e+"));
261  cutsFoil -> SetProductionCut(fCutFoilProton,G4ProductionCuts::GetIndex("proton"));
263  cutsFoil -> SetProductionCut(fCutFoilNeutron,G4ProductionCuts::GetIndex("neutron"));
264 
265  regionFoil -> SetProductionCuts(cutsFoil);
266 
267 }
268