Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TransitionRadiationPhysics.cc
Go to the documentation of this file.
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 // $Id: TransitionRadiationPhysics.cc 85047 2014-10-23 13:06:38Z maire $
27 //
28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 
32 #include "DetectorConstruction.hh"
33 #include "G4VXTRenergyLoss.hh"
34 #include "G4ProcessManager.hh"
35 #include "G4Electron.hh"
36 #include "G4Positron.hh"
37 
38 #include "G4VXTRenergyLoss.hh"
39 #include "G4RegularXTRadiator.hh"
41 #include "G4GammaXTRadiator.hh"
42 #include "G4StrawTubeXTRadiator.hh"
43 
44 #include "G4XTRGammaRadModel.hh"
45 #include "G4XTRRegularRadModel.hh"
48 
50 G4VXTRenergyLoss* TransitionRadiationPhysics::fXTRProcess = nullptr;
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53 
56  : G4VPhysicsConstructor("XTR"),
57  fDetector(ptr),
58  fVerbose(verb),
59  fXTRModel("transpM")
60 {}
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {}
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
70 {
71  if("dummy" == fXTRModel) { return; }
72  if(0 < fVerbose) {
73  G4cout<< "TransitionRadiationPhysics: XTR model <" << fXTRModel
74  << ">" <<G4endl;
75  }
76  RadiatorDescription* rDescription = fDetector->GetRadiatorDescription();
77 
78  if(fXTRModel == "gammaR" ) {
79 
80  fXTRProcess = new G4GammaXTRadiator(rDescription->fLogicalVolume,
81  100., 100.,
82  rDescription->fFoilMaterial,
83  rDescription->fGasMaterial,
84  rDescription->fFoilThickness,
85  rDescription->fGasThickness,
86  rDescription->fFoilNumber,
87  "GammaXTRadiator");
88  }
89  else if(fXTRModel == "gammaM" )
90  {
91  fXTRProcess = new G4XTRGammaRadModel(rDescription->fLogicalVolume,
92  100., 100.,
93  rDescription->fFoilMaterial,
94  rDescription->fGasMaterial,
95  rDescription->fFoilThickness,
96  rDescription->fGasThickness,
97  rDescription->fFoilNumber,
98  "GammaXTRadiator");
99  }
100  else if(fXTRModel == "strawR" )
101  {
102  fXTRProcess = new G4StrawTubeXTRadiator(rDescription->fLogicalVolume,
103  rDescription->fFoilMaterial,
104  rDescription->fGasMaterial,
105  0.53,
106  3.14159,
107  fDetector->GetAbsorberMaterial(),
108  true,
109  "strawXTRadiator");
110  }
111  else if(fXTRModel == "regR" )
112  {
113  fXTRProcess = new G4RegularXTRadiator(rDescription->fLogicalVolume,
114  rDescription->fFoilMaterial,
115  rDescription->fGasMaterial,
116  rDescription->fFoilThickness,
117  rDescription->fGasThickness,
118  rDescription->fFoilNumber,
119  "RegularXTRadiator");
120  }
121  else if(fXTRModel == "transpR" )
122  {
123  // G4TransparentRegXTRadiator*
124  fXTRProcess = new G4TransparentRegXTRadiator(rDescription->fLogicalVolume,
125  rDescription->fFoilMaterial,
126  rDescription->fGasMaterial,
127  rDescription->fFoilThickness,
128  rDescription->fGasThickness,
129  rDescription->fFoilNumber,
130  "RegularXTRadiator");
131  }
132  else if(fXTRModel == "regM" )
133  {
134  fXTRProcess = new G4XTRRegularRadModel(rDescription->fLogicalVolume,
135  rDescription->fFoilMaterial,
136  rDescription->fGasMaterial,
137  rDescription->fFoilThickness,
138  rDescription->fGasThickness,
139  rDescription->fFoilNumber,
140  "RegularXTRadiator");
141 
142  }
143  else if(fXTRModel == "transpM" )
144  {
145  fXTRProcess = new XTRTransparentRegRadModel(rDescription->fLogicalVolume,
146  rDescription->fFoilMaterial,
147  rDescription->fGasMaterial,
148  rDescription->fFoilThickness,
149  rDescription->fGasThickness,
150  rDescription->fFoilNumber,
151  "RegularXTRadiator");
152  }
153  if(!fXTRProcess) {
154  if(0 < fVerbose) {
155  G4cout<< "TransitionRadiationPhysics: XTR model <" << fXTRModel
156  << "> is not known - no XTR process defined" <<G4endl;
157  }
158  return;
159  }
160 
161  fXTRProcess->SetVerboseLevel(fVerbose);
162 
164  G4ProcessManager* manager = elec->GetProcessManager();
165  manager->AddDiscreteProcess(fXTRProcess);
166 
168  manager = posi->GetProcessManager();
169  manager->AddDiscreteProcess(fXTRProcess);
170 }
171 
172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173 
TransitionRadiationPhysics(G4int verb, DetectorConstruction *ptr)
RadiatorDescription * GetRadiatorDescription() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
Definition of the XTRTransparentRegRadModel class.
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4Material * GetAbsorberMaterial()
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4ProcessManager * GetProcessManager() const
static G4Electron * Electron()
Definition: G4Electron.cc:94
Detector construction class to define materials and geometry.
#define G4endl
Definition: G4ios.hh:61
Definition of the TransitionRadiationPhysics class.
G4LogicalVolume * fLogicalVolume
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:437