Ignore:
Timestamp:
Jan 8, 2010, 3:02:48 PM (14 years ago)
Author:
garnier
Message:

update to geant4.9.3

Location:
trunk/examples/extended/exoticphysics/monopole/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc

    r807 r1230  
    103103
    104104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     105
    105106G4Monopole* G4Monopole::Monopole()
    106107{   
  • trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: G4MonopolePhysics.cc,v 1.1 2007/08/16 10:32:04 vnivanch 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 $
    2929//
    3030//---------------------------------------------------------------------------
     
    4242//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    4343
     44#include "G4MonopolePhysics.hh"
     45#include "G4MonopolePhysicsMessenger.hh"
     46
    4447#include "G4Monopole.hh"
    45 #include "G4MonopolePhysics.hh"
    4648#include "G4ParticleDefinition.hh"
    4749#include "G4ProcessManager.hh"
     
    5557//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5658
    57 G4MonopolePhysics::G4MonopolePhysics(const G4String& name):  G4VPhysicsConstructor(name)
    58 {}
     59G4MonopolePhysics::G4MonopolePhysics(const G4String& nam)
     60  : G4VPhysicsConstructor(nam)
     61{
     62  magCharge = 1;
     63  elCharge  = 0;
     64  monopoleMass = 100.*GeV;
     65  theMessenger = new G4MonopolePhysicsMessenger(this);
     66}
    5967
    6068G4MonopolePhysics::~G4MonopolePhysics()
    61 {}
     69{
     70  delete theMessenger;
     71}
    6272
    6373void G4MonopolePhysics::ConstructParticle()
    6474{
    65   G4Monopole::MonopoleDefinition();
     75  G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
     76}
     77
     78//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     79void 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
     122void G4MonopolePhysics::SetMagneticCharge(G4int val)
     123{
     124  magCharge = val;
     125}
     126
     127void G4MonopolePhysics::SetElectricCharge(G4int val)
     128{
     129  elCharge = val;
     130}
     131
     132void G4MonopolePhysics::SetMonopoleMass(G4double mass)
     133{
     134  monopoleMass = mass;
    66135}
    67136
    68137
    69138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    70 void G4MonopolePhysics::ConstructProcess()
    71 {
    72139
    73   // Add standard EM Processes for gamma
    74   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  
    2424// ********************************************************************
    2525//
    26 // $Id: PrimaryGeneratorAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch 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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4444
    4545PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
    46 :detector(det)                                         
     46  :detector(det)
    4747{
    4848  particleGun  = new G4ParticleGun(1);
    49   G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("monopole");
     49  G4ParticleDefinition* particle =
     50    G4ParticleTable::GetParticleTable()->FindParticle("monopole");
    5051  particleGun->SetParticleDefinition(particle);
    5152  particleGun->SetParticleEnergy(100 * GeV);
     
    5960}
    6061
    61 
    6262//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6363PrimaryGeneratorAction::~PrimaryGeneratorAction()
     
    6767}
    6868
     69//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6970
    70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7171void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
    7272{
  • trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc

    r807 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: RunAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch 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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    8484  if(!binLength) binLength = 5 * mm;
    8585        if(binLength > detector->GetMaxStepSize()) binLength = detector->GetMaxStepSize();
    86   G4int nbBins = (int)(0.5 + length / binLength);
    8786  offsetX   = 0.5 * length;
    8887 
    8988#ifdef G4ANALYSIS_USE
    9089  if(GetVerbose() > 0) G4cout << "\n----> Histogram Tree opened" << G4endl;
     90
     91  G4int nbBins = (int)(0.5 + length / binLength);
    9192
    9293  // Create the tree factory
     
    143144void RunAction::FillHisto(G4int ih, G4double x, G4double weight)
    144145{
     146  if(GetVerbose() > 1) {
     147    G4cout << "FillHisto " << ih << "  x=" << x << " weight= " << weight
     148           << G4endl;
     149  }
    145150#ifdef G4ANALYSIS_USE
    146151  if(histo[ih]) histo[ih]->fill(x, weight);
  • trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc

    r807 r1230  
    2525//
    2626// $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 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset for help on using the changeset viewer.