Changeset 1337 for trunk/examples/advanced/xray_telescope/src
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/advanced/xray_telescope/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/xray_telescope/src/XrayTelAnalysis.cc
r1230 r1337 26 26 // 27 27 // $Id: XrayTelAnalysis.cc,v 1.12 2006/06/29 16:30:00 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // Author: A. Pfeiffer (Andreas.Pfeiffer@cern.ch) -
trunk/examples/advanced/xray_telescope/src/XrayTelPhysicsList.cc
r807 r1337 59 59 #include "G4MaterialTable.hh" 60 60 #include "G4ios.hh" 61 // Hadrons 62 #include "G4MesonConstructor.hh" 63 #include "G4BaryonConstructor.hh" 64 #include "G4IonConstructor.hh" 61 65 62 66 #include "globals.hh" … … 68 72 // Default cut values 69 73 defaultCutValue = 2.0*mm; 70 cutForGamma = 1.0*micrometer; 71 cutForElectron = 1.0*micrometer; 72 cutForProton = 1.0*micrometer; 74 cutForGamma = 1.0*m; 75 cutForElectron = 1.0*m; 73 76 74 77 SetVerboseLevel(1); … … 85 88 ConstructMesons(); 86 89 ConstructBaryons(); 90 ConstructIons(); 87 91 ConstructAllShortLiveds(); 88 92 } … … 115 119 void XrayTelPhysicsList::ConstructMesons() 116 120 { 121 // mesons 122 G4MesonConstructor mConstructor; 123 mConstructor.ConstructParticle(); 117 124 } 118 125 void XrayTelPhysicsList::ConstructBaryons() 119 126 { 120 127 // barions 121 G4Proton::ProtonDefinition(); 122 G4AntiProton::AntiProtonDefinition(); 123 G4Neutron::NeutronDefinition(); 124 G4AntiNeutron::AntiNeutronDefinition(); 128 G4BaryonConstructor bConstructor; 129 bConstructor.ConstructParticle(); 130 } 131 void XrayTelPhysicsList::ConstructIons() 132 { 133 // ions 134 G4IonConstructor iConstructor; 135 iConstructor.ConstructParticle(); 125 136 } 126 137 void XrayTelPhysicsList::ConstructAllShortLiveds() … … 140 151 #include "G4GammaConversion.hh" 141 152 #include "G4PhotoElectricEffect.hh" 153 154 #include "G4eMultipleScattering.hh" 155 #include "G4hMultipleScattering.hh" 156 142 157 #include "G4eIonisation.hh" 143 158 #include "G4eBremsstrahlung.hh" 144 159 #include "G4eplusAnnihilation.hh" 145 #include "G4MultipleScattering.hh" 146 #include "G4hLowEnergyIonisation.hh" 160 161 #include "G4MuIonisation.hh" 162 #include "G4MuBremsstrahlung.hh" 163 #include "G4MuPairProduction.hh" 164 165 #include "G4hIonisation.hh" 166 #include "G4hBremsstrahlung.hh" 167 #include "G4hPairProduction.hh" 168 169 #include "G4ionIonisation.hh" 147 170 148 171 void XrayTelPhysicsList::ConstructEM() … … 166 189 { 167 190 //electron 168 pmanager->AddProcess(new G4 MultipleScattering(),-1, 1,1);191 pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1); 169 192 pmanager->AddProcess(new G4eIonisation(), -1, 2,2); 170 pmanager->AddProcess(new G4eBremsstrahlung(), -1, -1,3);171 } 172 else if (particleName == "e+") 173 { 193 pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3,3); 194 195 } else if (particleName == "e+") { 196 174 197 //positron 175 pmanager->AddProcess(new G4 MultipleScattering(),-1, 1,1);198 pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,1); 176 199 pmanager->AddProcess(new G4eIonisation(), -1, 2,2); 177 pmanager->AddProcess(new G4eBremsstrahlung(), -1, -1,3);200 pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3,3); 178 201 pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1,4); 179 } 180 else if ((!particle->IsShortLived()) && 202 203 } else if( particleName == "mu-" || 204 particleName == "mu+" ) { 205 206 //muon 207 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 208 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 209 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); 210 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); 211 212 } else if( particleName == "pi-" || 213 particleName == "pi+" ) { 214 215 //pions 216 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 217 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 218 pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); 219 pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); 220 221 } else if( particleName == "proton" ) { 222 223 //proton 224 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 225 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 226 pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); 227 pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); 228 229 } else if( particleName == "alpha" || 230 particleName == "He3" || 231 particleName == "GenericIon" ) { 232 233 //Ions 234 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 235 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 236 237 } else if ((!particle->IsShortLived()) && 181 238 (particle->GetPDGCharge() != 0.0) && 182 (particle->GetParticleName() != "chargedgeantino")) 183 { 239 (particle->GetParticleName() != "chargedgeantino")) { 240 184 241 //all others charged particles except geantino 185 pmanager->AddProcess(new G4MultipleScattering(),-1,1,1); 186 187 G4double demax = 0.05; // try to lose at most 5% of the energy in 188 // a single step (in limit of large energies) 189 G4double stmin = 1.e-9 * m; // length of the final step: 10 angstrom 190 // reproduced angular distribution of TRIM 191 192 G4hLowEnergyIonisation* lowEIonisation = new G4hLowEnergyIonisation(); 193 pmanager->AddProcess( lowEIonisation, -1,2,2); 194 lowEIonisation->SetStepFunction( demax, stmin ); 242 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 243 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 244 195 245 } 196 246 } … … 227 277 SetCutValue(cutForElectron, "e+"); 228 278 229 // set cut values for proton230 SetCutValue(cutForProton, "proton");231 SetCutValue(cutForProton, "anti_proton");232 233 279 // SetCutValueForOthers(defaultCutValue); 234 280 … … 250 296 } 251 297 252 void XrayTelPhysicsList::SetCutForProton(G4double cut)253 {254 ResetCuts();255 cutForProton = cut;256 }257 258 298 G4double XrayTelPhysicsList::GetCutForGamma() const 259 299 { … … 266 306 } 267 307 268 G4double XrayTelPhysicsList::GetCutForProton() const 269 { 270 return cutForProton; 271 } 272 273 274 275 276 308 309 310 311 -
trunk/examples/advanced/xray_telescope/src/XrayTelSteppingAction.cc
r807 r1337 67 67 #include "G4Step.hh" 68 68 #include "G4RunManager.hh" 69 #include "XrayTelEventAction.hh"70 69 #include "XrayTelRunAction.hh" 71 70 #include "XrayTelAnalysis.hh" … … 96 95 entering = true; 97 96 98 // Notify the corresponding UserAction that the event must be visualised99 97 G4RunManager* runManager = G4RunManager::GetRunManager(); 100 // Casting is safe here: one knows the RTTI of the UserActions101 // in the current application (otherwise one could dynamic_cast)102 XrayTelEventAction* eventAction = (XrayTelEventAction*) runManager->GetUserEventAction();103 eventAction->Update();104 98 105 99 // Notify the corresponding UserAction to update the run counters
Note: See TracChangeset
for help on using the changeset viewer.