Changeset 1230 for trunk/examples/extended/exoticphysics/monopole/src
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (14 years ago)
- Location:
- trunk/examples/extended/exoticphysics/monopole/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc
r807 r1230 25 25 // 26 26 // $Id: DetectorConstruction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc
r807 r1230 25 25 // 26 26 // $Id: EventAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc
r807 r1230 103 103 104 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 105 106 G4Monopole* G4Monopole::Monopole() 106 107 { -
trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc
r807 r1230 25 25 // 26 26 // 27 // $Id: G4MonopolePhysics.cc,v 1. 1 2007/08/16 10:32:04vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4MonopolePhysics.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //--------------------------------------------------------------------------- … … 42 42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 43 43 44 #include "G4MonopolePhysics.hh" 45 #include "G4MonopolePhysicsMessenger.hh" 46 44 47 #include "G4Monopole.hh" 45 #include "G4MonopolePhysics.hh"46 48 #include "G4ParticleDefinition.hh" 47 49 #include "G4ProcessManager.hh" … … 55 57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 56 58 57 G4MonopolePhysics::G4MonopolePhysics(const G4String& name): G4VPhysicsConstructor(name) 58 {} 59 G4MonopolePhysics::G4MonopolePhysics(const G4String& nam) 60 : G4VPhysicsConstructor(nam) 61 { 62 magCharge = 1; 63 elCharge = 0; 64 monopoleMass = 100.*GeV; 65 theMessenger = new G4MonopolePhysicsMessenger(this); 66 } 59 67 60 68 G4MonopolePhysics::~G4MonopolePhysics() 61 {} 69 { 70 delete theMessenger; 71 } 62 72 63 73 void G4MonopolePhysics::ConstructParticle() 64 74 { 65 G4Monopole::MonopoleDefinition(); 75 G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge); 76 } 77 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 79 void G4MonopolePhysics::ConstructProcess() 80 { 81 if(verboseLevel > 0) { 82 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl; 83 } 84 G4Monopole* mpl = G4Monopole::Monopole(); 85 86 G4ProcessManager* pmanager = new G4ProcessManager(mpl); 87 mpl->SetProcessManager(pmanager); 88 89 // defined monopole parameters and binning 90 91 G4double emax = 10.*TeV; 92 G4double magn = mpl->MagneticCharge(); 93 G4double emin = mpl->GetPDGMass()/20000.; 94 if(emin < keV) emin = keV; 95 96 G4int nbin = G4int(std::log10(emin/eV)); 97 emin = std::pow(10.,G4double(nbin))*eV; 98 99 nbin = G4int(std::log10(emax/emin)); 100 if(nbin < 1) nbin = 1; 101 nbin *= 10; 102 103 pmanager->AddProcess( new G4Transportation(), -1, 0, 0); 104 if(magn != 0.0) { 105 G4mplIonisation* mplioni = new G4mplIonisation(magn); 106 mplioni->SetDEDXBinning(nbin); 107 mplioni->SetMinKinEnergy(emin); 108 mplioni->SetMaxKinEnergy(emax); 109 pmanager->AddProcess(mplioni, -1, 1, 1); 110 } 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); 119 120 } 121 122 void G4MonopolePhysics::SetMagneticCharge(G4int val) 123 { 124 magCharge = val; 125 } 126 127 void G4MonopolePhysics::SetElectricCharge(G4int val) 128 { 129 elCharge = val; 130 } 131 132 void G4MonopolePhysics::SetMonopoleMass(G4double mass) 133 { 134 monopoleMass = mass; 66 135 } 67 136 68 137 69 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 70 void G4MonopolePhysics::ConstructProcess()71 {72 139 73 // Add standard EM Processes for gamma74 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;75 76 G4Monopole* mpl = G4Monopole::MonopoleDefinition();77 78 G4ProcessManager* pmanager = new G4ProcessManager(mpl);79 mpl->SetProcessManager(pmanager);80 81 pmanager->AddProcess( new G4Transportation(), -1, 0, 0);82 pmanager->AddProcess( new G4mplIonisation(mpl->MagneticCharge()), -1, 1, 1);83 pmanager->AddProcess( new G4StepLimiter(), -1, -1, 3);84 if(mpl->GetPDGCharge() != 0.0) {85 pmanager->AddProcess(new G4hhIonisation(), -1, 2, 2);86 }87 88 }89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......91 -
trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: PrimaryGeneratorAction.cc,v 1. 1 2007/08/16 10:32:04vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: PrimaryGeneratorAction.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 44 44 45 45 PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det) 46 :detector(det) 46 :detector(det) 47 47 { 48 48 particleGun = new G4ParticleGun(1); 49 G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("monopole"); 49 G4ParticleDefinition* particle = 50 G4ParticleTable::GetParticleTable()->FindParticle("monopole"); 50 51 particleGun->SetParticleDefinition(particle); 51 52 particleGun->SetParticleEnergy(100 * GeV); … … 59 60 } 60 61 61 62 62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 63 63 PrimaryGeneratorAction::~PrimaryGeneratorAction() … … 67 67 } 68 68 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 69 70 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......71 71 void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) 72 72 { -
trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: RunAction.cc,v 1. 1 2007/08/16 10:32:04vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: RunAction.cc,v 1.2 2008/06/11 14:34:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 84 84 if(!binLength) binLength = 5 * mm; 85 85 if(binLength > detector->GetMaxStepSize()) binLength = detector->GetMaxStepSize(); 86 G4int nbBins = (int)(0.5 + length / binLength);87 86 offsetX = 0.5 * length; 88 87 89 88 #ifdef G4ANALYSIS_USE 90 89 if(GetVerbose() > 0) G4cout << "\n----> Histogram Tree opened" << G4endl; 90 91 G4int nbBins = (int)(0.5 + length / binLength); 91 92 92 93 // Create the tree factory … … 143 144 void RunAction::FillHisto(G4int ih, G4double x, G4double weight) 144 145 { 146 if(GetVerbose() > 1) { 147 G4cout << "FillHisto " << ih << " x=" << x << " weight= " << weight 148 << G4endl; 149 } 145 150 #ifdef G4ANALYSIS_USE 146 151 if(histo[ih]) histo[ih]->fill(x, weight); -
trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: RunActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc
r807 r1230 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.2 2007/12/10 16:28:17 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc
r807 r1230 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.