Changeset 1337 for trunk/examples/extended/exoticphysics
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/exoticphysics/monopole
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/exoticphysics/monopole/History
r807 r1337 1 $Id: History,v 1. 2 2007/08/16 12:57:59 vnivanchExp $1 $Id: History,v 1.10 2010/06/07 05:40:46 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 6 6 ========================================================= 7 7 8 monopolHistory file9 -------------------- 8 Monopole Example History file 9 ----------------------------- 10 10 This file should be used by the G4 example coordinator to briefly 11 11 summarize all major modifications introduced in the code and keep … … 16 16 ---------------------------------------------------------- 17 17 18 6 June 10: J.Perl (monopole-V09-03-05) 19 - Remove unused variable in EventAction 20 21 4 June 10: J.Perl (monopole-V09-03-04) 22 - Updated vis usage 23 24 04 June 10: V.Ivant (monopole-V09-03-03) 25 - Substituted QGSP by QGSP_BERT 26 - (J. Apostolakis, B. Bozsogi) Added new classes for monopole 27 G4MonopoleEquation, G4MonopoleFieldSetup, G4MonopoleTransportation 28 29 12 May 10: J.Allison (monopole-V09-03-02) 30 - Introduced GUIExecutive. 31 32 31 March 10: V.Ivant (monopole-V09-03-01) 33 - Removed obsolete header G4MultipleScattering.hh 34 35 23 March 10: V.Ivant (monopole-V09-03-00) 36 - Cleanup and add test on ionisation of heavy highly charged particle 37 38 14 July 09: V.Ivant (monopole-V09-02-00) 39 - Added messenger to define mass and change of the monopole 40 41 11 June 08: V.Ivant (monopole-V09-01-00) 42 - Remove AIDA from GNUmakefile 43 - Fixed compillation warnings 44 18 45 16 August 07: V.Ivant (monopole-V09-00-00) 19 46 - First release -
trunk/examples/extended/exoticphysics/monopole/README
r807 r1337 1 $Id: README,v 1. 1 2007/08/16 10:32:04vnivanch Exp $1 $Id: README,v 1.2 2009/07/15 10:19:47 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 46 46 Physics Lists include standard QGSP physics and additional builder 47 47 for monopole physics. 48 To define monopole parameters an extra string should be provided 49 a) interactive mode by UI command: 50 /monopole/setup 2 0 200 GeV (magnetic number, electric number, mass) 51 b) batch mode: 52 $G4BIN/$G4SYSTEM/monopole file.mac '2 0 200 GeV' 48 53 49 54 3- AN EVENT : THE PRIMARY GENERATOR -
trunk/examples/extended/exoticphysics/monopole/include/DetectorConstruction.hh
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: DetectorConstruction.hh,v 1. 2 2009/07/15 10:19:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: DetectorConstruction.hh,v 1.3 2010/06/04 19:03:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 41 41 class G4UniformMagField; 42 42 class DetectorMessenger; 43 class G4MonopoleFieldSetup; 43 44 44 45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 83 84 G4double maxStepSize; 84 85 G4Material* absorMaterial; 86 85 87 G4UniformMagField* magField; 88 G4MonopoleFieldSetup* fMFieldSetup; 89 86 90 G4LogicalVolume* lAbsor; 87 91 -
trunk/examples/extended/exoticphysics/monopole/include/DetectorMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/EventAction.hh
r1230 r1337 25 25 // 26 26 // $Id: EventAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/EventActionMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/G4Monopole.hh
r1230 r1337 77 77 static G4Monopole* Monopole(); 78 78 79 static G4double MagneticCharge() {return magCharge;};79 G4double MagneticCharge() const; 80 80 81 81 private: -
trunk/examples/extended/exoticphysics/monopole/include/G4MonopolePhysics.hh
r1230 r1337 25 25 // 26 26 // 27 // $Id: G4MonopolePhysics.hh,v 1. 2 2009/07/15 10:19:47vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: G4MonopolePhysics.hh,v 1.3 2010/03/23 14:12:08 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 40 40 41 41 class G4MonopolePhysicsMessenger; 42 class G4Monopole; 42 43 43 44 class G4MonopolePhysics : public G4VPhysicsConstructor … … 63 64 64 65 // hide assignment operator 65 //G4MonopolePhysics & operator=(const G4MonopolePhysics &right);66 //G4MonopolePhysics(const G4MonopolePhysics&);66 G4MonopolePhysics & operator=(const G4MonopolePhysics &right); 67 G4MonopolePhysics(const G4MonopolePhysics&); 67 68 68 69 G4int magCharge; … … 71 72 72 73 G4MonopolePhysicsMessenger* theMessenger; 74 G4Monopole* mpl; 73 75 74 76 }; -
trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorAction.hh
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/RunAction.hh
r1230 r1337 25 25 // 26 26 // $Id: RunAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/RunActionMessenger.hh
r1230 r1337 25 25 // 26 26 // $Id: RunActionMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/SteppingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/include/TrackingAction.hh
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/monopole.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: monopole.cc,v 1. 2 2009/07/15 10:19:47 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: monopole.cc,v 1.6 2010/06/06 04:53:49 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 32 32 #include "G4RunManager.hh" 33 33 #include "G4UImanager.hh" 34 #include "G4UIterminal.hh"35 #include "G4UItcsh.hh"36 34 #include "Randomize.hh" 37 35 #include "globals.hh" … … 39 37 #include "DetectorConstruction.hh" 40 38 #include "G4MonopolePhysics.hh" 41 #include "QGSP .hh"39 #include "QGSP_BERT.hh" 42 40 #include "PrimaryGeneratorAction.hh" 43 41 … … 49 47 #ifdef G4VIS_USE 50 48 #include "G4VisExecutive.hh" 49 #endif 50 51 #ifdef G4UI_USE 52 #include "G4UIExecutive.hh" 51 53 #endif 52 54 … … 62 64 63 65 //create physicsList 64 QGSP * phys = new QGSP();66 QGSP_BERT* phys = new QGSP_BERT(); 65 67 G4MonopolePhysics * theMonopole = new G4MonopolePhysics(); 66 68 phys->RegisterPhysics(theMonopole); 67 69 70 // visualization manager 71 #ifdef G4VIS_USE 72 G4VisManager* visManager = new G4VisExecutive; 73 visManager->Initialize(); 74 #endif 75 68 76 //get the pointer to the User Interface manager 69 G4UImanager* UI = G4UImanager::GetUIpointer();77 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 70 78 71 79 // Setup monopole 72 80 G4String s = ""; 73 if(argc > 2) s = argv[2];74 UI ->ApplyCommand("/control/verbose 1");75 UI ->ApplyCommand("/monopole/setup "+s);81 if(argc > 2) { s = argv[2]; } 82 UImanager->ApplyCommand("/control/verbose 1"); 83 UImanager->ApplyCommand("/monopole/setup "+s); 76 84 77 85 // mandator user classes … … 84 92 runManager->SetUserAction(kin); 85 93 86 #ifdef G4VIS_USE87 //visualization manager88 G4VisManager* visManager = 0;89 #endif90 91 94 //user action classes 92 95 RunAction* run; … … 97 100 runManager->SetUserAction(new SteppingAction(det, run)); 98 101 99 if (argc == 1) // Define UI terminal for interactive mode 100 { 101 visManager = new G4VisExecutive(); 102 visManager->Initialize(); 103 G4UIsession* session = 0; 104 #ifdef G4UI_USE_TCSH 105 session = new G4UIterminal(new G4UItcsh); 106 #else 107 session = new G4UIterminal(); 108 #endif 109 session->SessionStart(); 110 delete session; 111 } 112 else // Batch mode 102 if (argc!=1) // batch mode 113 103 { 114 104 G4String command = "/control/execute "; 115 105 G4String fileName = argv[1]; 116 UI->ApplyCommand(command+fileName); 106 UImanager->ApplyCommand(command+fileName); 107 } 108 else 109 { // interactive mode : define UI session 110 #ifdef G4UI_USE 111 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 112 ui->SessionStart(); 113 delete ui; 114 #endif 117 115 } 118 116 -
trunk/examples/extended/exoticphysics/monopole/monopole.in
r807 r1337 18 18 /run/initialize 19 19 # 20 /process/eLoss/verbose 020 /process/eLoss/verbose 1 21 21 /testex/event/printModulo 10 22 22 # -
trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: DetectorConstruction.cc,v 1. 1 2007/08/16 10:32:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: DetectorConstruction.cc,v 1.2 2010/06/04 19:03:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 48 48 #include "G4NistManager.hh" 49 49 50 #include "G4MonopoleFieldSetup.hh" 51 #include "G4FieldManager.hh" 52 #include "G4TransportationManager.hh" 53 50 54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 51 55 … … 60 64 magField = 0; 61 65 lAbsor = 0; 66 fMFieldSetup = 0; 62 67 63 68 DefineMaterials(); … … 68 73 } 69 74 70 71 72 75 DetectorConstruction::~DetectorConstruction() 73 {delete detectorMessenger;} 74 76 { 77 delete detectorMessenger; 78 } 75 79 76 80 G4VPhysicalVolume* DetectorConstruction::Construct() 77 { return ConstructVolumes();} 78 81 { 82 return ConstructVolumes(); 83 } 79 84 80 85 void DetectorConstruction::DefineMaterials() … … 116 121 G4LogicalVolumeStore::GetInstance()->Clean(); 117 122 G4SolidStore::GetInstance()->Clean(); 118 119 120 123 121 124 /**************************** World *****************************/ … … 199 202 200 203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 201 #include "G4FieldManager.hh"202 #include "G4TransportationManager.hh"203 204 204 205 void DetectorConstruction::SetMagField(G4double fieldValue) 205 206 { 206 207 //apply a global uniform magnetic field along Z axis 207 G4FieldManager * fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); 208 G4FieldManager * fieldMgr = 209 G4TransportationManager::GetTransportationManager()->GetFieldManager(); 208 210 209 if (magField) delete magField; //delete the existing magn field 211 if (magField) { delete magField; } //delete the existing magn field 212 213 //fMFieldSetup = G4MonopoleFieldSetup::GetMonopoleFieldSetup(); // create the field 214 210 215 211 216 if (fieldValue != 0.) // create a new one if non nul … … 222 227 } 223 228 224 225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 230 226 231 void DetectorConstruction::SetMaxStepSize(G4double step_) 227 232 { -
trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 1 2007/08/16 10:32:04 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.3 2010/06/07 05:40:46 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 35 35 36 36 #include "G4Event.hh" 37 #include "G4TrajectoryContainer.hh"38 #include "G4Trajectory.hh"39 #include "G4VVisManager.hh"40 37 41 38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 66 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 67 64 68 void EventAction::EndOfEventAction(const G4Event* evt)65 void EventAction::EndOfEventAction(const G4Event*) 69 66 { 70 if (G4VVisManager::GetConcreteInstance())71 {72 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();73 G4int n_trajectories = 0;74 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();75 for(G4int i=0; i<n_trajectories; i++)76 {77 G4Trajectory* trj = (G4Trajectory*) ((*(evt->GetTrajectoryContainer()))[i]);78 if (drawFlag == "all")79 trj->DrawTrajectory(1000);80 else81 if ((drawFlag == "charged") && (trj->GetCharge() != 0.))82 trj->DrawTrajectory(1000);83 }84 }85 67 } 86 68 -
trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc
r1230 r1337 106 106 G4Monopole* G4Monopole::Monopole() 107 107 { 108 if(!theMonopole) theMonopole = MonopoleDefinition();108 if(!theMonopole) { theMonopole = MonopoleDefinition(); } 109 109 return theMonopole; 110 110 } … … 112 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 113 114 G4double G4Monopole::MagneticCharge() const 115 { 116 return magCharge; 117 } 118 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 120 -
trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4MonopolePhysics.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 26 // $Id: G4MonopolePhysics.cc,v 1.5 2010/06/04 19:03:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 28 // 30 29 //--------------------------------------------------------------------------- … … 51 50 #include "G4StepLimiter.hh" 52 51 #include "G4Transportation.hh" 53 #include "G4MultipleScattering.hh" 52 #include "G4MonopoleTransportation.hh" 53 #include "G4hMultipleScattering.hh" 54 54 #include "G4mplIonisation.hh" 55 55 #include "G4hhIonisation.hh" … … 73 73 void G4MonopolePhysics::ConstructParticle() 74 74 { 75 G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);75 mpl = G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge); 76 76 } 77 77 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......79 78 void G4MonopolePhysics::ConstructProcess() 80 79 { … … 82 81 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl; 83 82 } 84 G4Monopole* mpl = G4Monopole::Monopole();85 83 86 84 G4ProcessManager* pmanager = new G4ProcessManager(mpl); … … 101 99 nbin *= 10; 102 100 103 pmanager->AddProcess( new G4Transportation(), -1, 0, 0); 101 if(magn == 0.0) { 102 pmanager->AddProcess( new G4Transportation(), -1, 0, 0); 103 } else { 104 pmanager->AddProcess( new G4MonopoleTransportation(mpl), -1, 0, 0); 105 } 106 107 G4int idx = 1; 108 if(mpl->GetPDGCharge() != 0.0) { 109 //G4hMultipleScattering* hmsc = new G4hMultipleScattering(); 110 //pmanager->AddProcess(hmsc, -1, idx, idx); 111 //++idx; 112 G4hhIonisation* hhioni = new G4hhIonisation(); 113 hhioni->SetDEDXBinning(nbin); 114 hhioni->SetMinKinEnergy(emin); 115 hhioni->SetMaxKinEnergy(emax); 116 pmanager->AddProcess(hhioni, -1, idx, idx); 117 ++idx; 118 } 104 119 if(magn != 0.0) { 105 120 G4mplIonisation* mplioni = new G4mplIonisation(magn); … … 107 122 mplioni->SetMinKinEnergy(emin); 108 123 mplioni->SetMaxKinEnergy(emax); 109 pmanager->AddProcess(mplioni, -1, 1, 1); 124 pmanager->AddProcess(mplioni, -1, idx, idx); 125 ++idx; 110 126 } 111 if(mpl->GetPDGCharge() != 0.0) { 112 G4hhIonisation* hhioni = new G4hhIonisation(); 113 hhioni->SetDEDXBinning(nbin); 114 hhioni->SetMinKinEnergy(emin); 115 hhioni->SetMaxKinEnergy(emax); 116 pmanager->AddProcess(hhioni, -1, 2, 2); 117 } 118 pmanager->AddProcess( new G4StepLimiter(), -1, -1, 3); 127 pmanager->AddProcess( new G4StepLimiter(), -1, -1, idx); 119 128 120 129 } -
trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PrimaryGeneratorAction.cc,v 1. 2 2009/07/15 10:19:47vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PrimaryGeneratorAction.cc,v 1.3 2010/03/23 14:12:08 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 47 47 { 48 48 particleGun = new G4ParticleGun(1); 49 G4ParticleDefinition* particle =50 G4ParticleTable::GetParticleTable()->FindParticle("monopole");51 particleGun->SetParticleDefinition(particle);49 //G4ParticleDefinition* particle = 50 // G4ParticleTable::GetParticleTable()->FindParticle("monopole"); 51 //particleGun->SetParticleDefinition(particle); 52 52 particleGun->SetParticleEnergy(100 * GeV); 53 53 particleGun->SetParticleMomentumDirection(G4ThreeVector(1., 0., 0.)); -
trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: RunAction.cc,v 1. 2 2008/06/11 14:34:19vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: RunAction.cc,v 1.4 2010/06/04 19:03:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 50 50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 51 51 52 RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin):detector(det), kinematic(kin), af(0), tree(0) 52 RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin) 53 :detector(det), kinematic(kin), af(0), tree(0) 53 54 { 54 verboseLevel = 0;55 verboseLevel = 1; 55 56 binLength = offsetX = 0.; 56 57 histo[0] = 0; … … 60 61 // Creating the analysis factory 61 62 af = AIDA_createAnalysisFactory(); 62 ftype = "hbook";63 ftype = "root"; 63 64 fname = "monopole"; 64 65 #endif … … 68 69 } 69 70 70 71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 72 72 73 RunAction::~RunAction() 73 74 { … … 77 78 } 78 79 79 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 81 82 void RunAction::bookHisto() 82 83 { 83 84 G4double length = detector->GetAbsorSizeX(); 84 if(!binLength) binLength = 5 * mm; 85 if(binLength > detector->GetMaxStepSize()) binLength = detector->GetMaxStepSize(); 85 if(!binLength) { binLength = 5 * mm; } 86 if(binLength > detector->GetMaxStepSize()) { 87 binLength = detector->GetMaxStepSize(); 88 } 86 89 offsetX = 0.5 * length; 87 90 88 91 #ifdef G4ANALYSIS_USE 89 if(GetVerbose() > 0) G4cout << "\n----> Histogram Tree opened" << G4endl;90 91 G4int nbBins = ( int)(0.5 + length / binLength);92 if(GetVerbose() > 0) { G4cout << "\n----> Histogram Tree opened" << G4endl; } 93 94 G4int nbBins = (G4int)(0.5 + length / binLength); 92 95 93 96 // Create the tree factory … … 120 123 } 121 124 122 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 126 124 127 void RunAction::saveHisto() 125 128 { … … 133 136 } 134 137 135 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 139 137 140 void RunAction::SetBinSize(G4double size) 138 141 { … … 180 183 G4Material* material = detector->GetAbsorMaterial(); 181 184 G4double density = material->GetDensity(); 182 183 G4String particle = kinematic->GetParticleGun()->GetParticleDefinition()->GetParticleName(); 185 const G4ParticleDefinition* part = 186 kinematic->GetParticleGun()->GetParticleDefinition(); 187 G4String particle = part->GetParticleName(); 184 188 G4double energy = kinematic->GetParticleGun()->GetParticleEnergy(); 185 189 … … 209 213 calc.SetVerbose(0); 210 214 G4int i; 211 for(i = 0; i < 100; i++) {215 for(i = 0; i < 100; ++i) { 212 216 ekin[i] = std::pow(10., 0.1*G4double(i)) * keV; 213 217 dedxproton[i] = calc.ComputeElectronicDEDX(ekin[i], "proton", material->GetName()); … … 215 219 } 216 220 217 if(GetVerbose() > 1){221 if(GetVerbose() > 0){ 218 222 G4cout << "### Stopping Powers" << G4endl; 219 223 for(i=0; i<100; i++) { … … 223 227 } 224 228 }; 225 229 G4cout << "### End of stopping power table" << G4endl; 226 230 #ifdef G4ANALYSIS_USE 227 231 // normalize histogram … … 234 238 }; 235 239 236 237 for(i=0; i<100; i++) { 240 for(i=0; i<100; ++i) { 238 241 G4double e = std::log10(ekin[i] / MeV) + 0.05; 239 242 histo[1]->fill(e, dedxproton[i]); -
trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: RunActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.2 2007/12/10 16:28:17 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.