Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

Location:
trunk/examples/extended/electromagnetic/TestEm13/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/electromagnetic/TestEm13/src/DetectorConstruction.cc

    r1230 r1337  
    2525//
    2626// $Id: DetectorConstruction.cc,v 1.5 2006/06/29 16:44:24 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm13/src/DetectorMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: DetectorMessenger.cc,v 1.2 2006/06/29 16:44:27 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm13/src/EventAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: EventAction.cc,v 1.2 2006/06/29 16:44:30 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: EventAction.cc,v 1.5 2010/06/07 05:40:46 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3535
    3636#include "G4Event.hh"
    37 #include "G4TrajectoryContainer.hh"
    38 #include "G4Trajectory.hh"
    39 #include "G4VVisManager.hh"
    4037#include "G4UnitsTable.hh"
    4138
     
    4340
    4441EventAction::EventAction()
    45 :printModulo(10000),eventMessenger(0)
     42:printModulo(100000),eventMessenger(0)
    4643{
    4744  eventMessenger = new EventActionMessenger(this);
     
    6865//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6966
    70 void EventAction::EndOfEventAction(const G4Event* evt)
     67void EventAction::EndOfEventAction(const G4Event*)
    7168{
    72   if (G4VVisManager::GetConcreteInstance())
    73   {
    74     G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
    75     G4int n_trajectories = 0;
    76     if (trajectoryContainer) n_trajectories = trajectoryContainer->entries(); 
    77     for (G4int i=0; i<n_trajectories; i++) {
    78        G4Trajectory* trj = (G4Trajectory*)
    79                                        ((*(evt->GetTrajectoryContainer()))[i]);
    80        trj->DrawTrajectory(1000);
    81     }
    82   }
    8369}
    8470
  • trunk/examples/extended/electromagnetic/TestEm13/src/EventActionMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.2 2006/06/29 16:44:32 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm13/src/PhysListEmLivermore.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: PhysListEmLivermore.cc,v 1.5 2009/11/19 17:30:25 maire Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: PhysListEmLivermore.cc,v 1.6 2010/04/02 15:46:31 maire Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    140140      eIoniModel->SetHighEnergyLimit(highEnergyLimit);
    141141      eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
    142       pmanager->AddProcess(eIoni,                   -1, 1, 1);
     142      pmanager->AddProcess(eIoni,                   -1,-1, 1);
    143143     
    144144      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
     
    147147      eBremModel->SetHighEnergyLimit(highEnergyLimit);
    148148      eBrem->AddEmModel(0, eBremModel);
    149       pmanager->AddProcess(eBrem,                   -1, 2, 2);
     149      pmanager->AddProcess(eBrem,                   -1,-1, 2);
    150150           
    151151    } else if (particleName == "e+") {
    152152      //positron
    153       pmanager->AddProcess(new G4eIonisation,       -1, 1, 1);
    154       pmanager->AddProcess(new G4eBremsstrahlung,   -1, 2, 2);
     153      pmanager->AddProcess(new G4eIonisation,       -1,-1, 1);
     154      pmanager->AddProcess(new G4eBremsstrahlung,   -1,-1, 2);
    155155      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1, 3);
    156156     
     
    158158               particleName == "mu-"    ) {
    159159      //muon 
    160       pmanager->AddProcess(new G4MuIonisation,      -1, 1, 1);
    161       pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 2, 2);
    162       pmanager->AddProcess(new G4MuPairProduction,  -1, 3, 3);       
     160      pmanager->AddProcess(new G4MuIonisation,      -1,-1, 1);
     161      pmanager->AddProcess(new G4MuBremsstrahlung,  -1,-1, 2);
     162      pmanager->AddProcess(new G4MuPairProduction,  -1,-1, 3);       
    163163     
    164164    } else if( particleName == "alpha" || particleName == "GenericIon" ) {
    165       pmanager->AddProcess(new G4ionIonisation,     -1, 1, 1);
     165      pmanager->AddProcess(new G4ionIonisation,     -1,-1, 1);
    166166
    167167    } else if ((!particle->IsShortLived()) &&
     
    169169               (particle->GetParticleName() != "chargedgeantino")) {
    170170      //all others charged particles except geantino
    171       pmanager->AddProcess(new G4hIonisation,       -1, 1, 1);
     171      pmanager->AddProcess(new G4hIonisation,       -1,-1, 1);
    172172    }
    173173  }
  • trunk/examples/extended/electromagnetic/TestEm13/src/PhysListEmPenelope.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: PhysListEmPenelope.cc,v 1.6 2009/11/19 17:30:25 maire Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: PhysListEmPenelope.cc,v 1.7 2010/04/02 15:46:31 maire Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    141141      eIoniModel->SetHighEnergyLimit(highEnergyLimit);
    142142      eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
    143       pmanager->AddProcess(eIoni,                   -1, 1, 1);
     143      pmanager->AddProcess(eIoni,                   -1,-1, 1);
    144144     
    145145      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
     
    148148      eBremModel->SetHighEnergyLimit(highEnergyLimit);
    149149      eBrem->AddEmModel(0, eBremModel);
    150       pmanager->AddProcess(eBrem,                   -1, 2, 2);
     150      pmanager->AddProcess(eBrem,                   -1,-1, 2);
    151151           
    152152    } else if (particleName == "e+") {
     
    157157      eIoniModel->SetHighEnergyLimit(highEnergyLimit);
    158158      eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
    159       pmanager->AddProcess(eIoni,                   -1, 1, 1);
     159      pmanager->AddProcess(eIoni,                   -1,-1, 1);
    160160     
    161161      G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
     
    164164      eBremModel->SetHighEnergyLimit(highEnergyLimit);
    165165      eBrem->AddEmModel(0, eBremModel);
    166       pmanager->AddProcess(eBrem,                   -1, 2, 2);     
     166      pmanager->AddProcess(eBrem,                   -1,-1, 2);     
    167167
    168168      G4eplusAnnihilation* eAnni = new G4eplusAnnihilation();
     
    176176               particleName == "mu-"    ) {
    177177      //muon 
    178       pmanager->AddProcess(new G4MuIonisation,      -1, 1, 1);
    179       pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 2, 2);
    180       pmanager->AddProcess(new G4MuPairProduction,  -1, 3, 3);       
     178      pmanager->AddProcess(new G4MuIonisation,      -1,-1, 1);
     179      pmanager->AddProcess(new G4MuBremsstrahlung,  -1,-1, 2);
     180      pmanager->AddProcess(new G4MuPairProduction,  -1,-1, 3);       
    181181     
    182182    } else if( particleName == "alpha" || particleName == "GenericIon" ) {
    183       pmanager->AddProcess(new G4ionIonisation,     -1, 1, 1);
     183      pmanager->AddProcess(new G4ionIonisation,     -1,-1, 1);
    184184
    185185    } else if ((!particle->IsShortLived()) &&
     
    187187               (particle->GetParticleName() != "chargedgeantino")) {
    188188      //all others charged particles except geantino
    189       pmanager->AddProcess(new G4hIonisation,       -1, 1, 1);
     189      pmanager->AddProcess(new G4hIonisation,       -1,-1, 1);
    190190    }
    191191  }
  • trunk/examples/extended/electromagnetic/TestEm13/src/PhysListEmStandard.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: PhysListEmStandard.cc,v 1.3 2006/06/29 16:44:38 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: PhysListEmStandard.cc,v 1.4 2010/04/02 15:46:31 maire Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    8181    } else if (particleName == "e-") {
    8282      //electron
    83       pmanager->AddProcess(new G4eIonisation,        -1, 1,1);
    84       pmanager->AddProcess(new G4eBremsstrahlung,    -1, 2,2);
     83      pmanager->AddProcess(new G4eIonisation,        -1,-1,1);
     84      pmanager->AddProcess(new G4eBremsstrahlung,    -1,-1,2);
    8585           
    8686    } else if (particleName == "e+") {
    8787      //positron
    88       pmanager->AddProcess(new G4eIonisation,        -1, 1,1);
    89       pmanager->AddProcess(new G4eBremsstrahlung,    -1, 2,2);
     88      pmanager->AddProcess(new G4eIonisation,        -1,-1,1);
     89      pmanager->AddProcess(new G4eBremsstrahlung,    -1,-1,2);
    9090      pmanager->AddProcess(new G4eplusAnnihilation,   0,-1,3);
    9191     
     
    9393               particleName == "mu-"    ) {
    9494      //muon 
    95       pmanager->AddProcess(new G4MuIonisation,      -1, 1,1);
    96       pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 2,2);
    97       pmanager->AddProcess(new G4MuPairProduction,  -1, 3,3);       
     95      pmanager->AddProcess(new G4MuIonisation,      -1,-1,1);
     96      pmanager->AddProcess(new G4MuBremsstrahlung,  -1,-1,2);
     97      pmanager->AddProcess(new G4MuPairProduction,  -1,-1,3);       
    9898     
    9999    } else if( particleName == "alpha" || particleName == "GenericIon" ) {
    100       pmanager->AddProcess(new G4ionIonisation,     -1, 1,1);
     100      pmanager->AddProcess(new G4ionIonisation,     -1,-1,1);
    101101
    102102    } else if ((!particle->IsShortLived()) &&
     
    104104               (particle->GetParticleName() != "chargedgeantino")) {
    105105      //all others charged particles except geantino
    106       pmanager->AddProcess(new G4hIonisation,       -1,1,1);
     106      pmanager->AddProcess(new G4hIonisation,       -1,-1,1);
    107107    }
    108108  }
  • trunk/examples/extended/electromagnetic/TestEm13/src/PhysicsList.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: PhysicsList.cc,v 1.7 2009/11/19 17:30:25 maire Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: PhysicsList.cc,v 1.9 2010/04/05 13:45:17 maire Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    183183  //
    184184  G4EmProcessOptions emOptions;
    185   emOptions.SetStepFunction(1., 1*mm); 
    186185  emOptions.SetIntegral(false);
    187   emOptions.SetLossFluctuations(false);   
    188186}
    189187
     
    227225
    228226void PhysicsList::SetCuts()
    229 {   
     227{
     228  // fixe lower limit for cut
     229  G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100*eV, 1*GeV);
     230 
    230231  // set cut values for gamma at first and for e- second and next for e+,
    231232  // because some processes for e+/e- need cut values for gamma
  • trunk/examples/extended/electromagnetic/TestEm13/src/PhysicsListMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 16:44:43 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm13/src/PrimaryGeneratorAction.cc

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorAction.cc,v 1.2 2006/06/29 16:44:45 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm13/src/RunAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: RunAction.cc,v 1.6 2006/06/29 16:44:47 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: RunAction.cc,v 1.8 2010/04/05 13:45:17 maire Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4747
    4848RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* prim)
    49   : detector(det), primary(prim), ProcCounter(0)
     49  : detector(det), primary(prim)
    5050{ }
    5151
     
    6464  G4RunManager::GetRunManager()->SetRandomNumberStore(false);
    6565  CLHEP::HepRandom::showEngineStatus();
    66  
    67   ProcCounter = new ProcessesCount;
    68 }
    69 
    70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    71 
    72 void RunAction::CountProcesses(G4String procName)
    73 {
    74    //does the process  already encounted ?
    75    size_t nbProc = ProcCounter->size();
    76    size_t i = 0;
    77    while ((i<nbProc)&&((*ProcCounter)[i]->GetName()!=procName)) i++;
    78    if (i == nbProc) ProcCounter->push_back( new OneProcessCount(procName));
    79 
    80    (*ProcCounter)[i]->Count();
    8166}
    8267
     
    10893  G4int survive = 0; 
    10994  G4cout << "\n Process calls frequency --->";
    110   for (size_t i=0; i< ProcCounter->size();i++) {
    111      G4String procName = (*ProcCounter)[i]->GetName();
    112      G4int    count    = (*ProcCounter)[i]->GetCounter();
     95  std::map<G4String,G4int>::iterator it; 
     96  for (it = procCounter.begin(); it != procCounter.end(); it++) {
     97     G4String procName = it->first;
     98     G4int    count    = it->second;
    11399     totalCount += count;
    114100     G4cout << "\t" << procName << " = " << count;
    115101     if (procName == "Transportation") survive = count;
    116   }
     102  } 
    117103  G4cout << G4endl;
    118104  if (totalCount == 0) return;
     
    130116  //compute cross section and related quantities
    131117  //
    132   G4double CrossSection = std::log(1./ratio)/tickness;     
     118  G4double CrossSection = - std::log(ratio)/tickness;     
    133119  G4double massicCS  = CrossSection/density;
    134120   
     
    142128  G4EmCalculator emCalculator;
    143129  G4double sumc = 0.0; 
    144   for (size_t i=0; i< ProcCounter->size();i++) {
    145     G4String procName = (*ProcCounter)[i]->GetName();
     130  for (it = procCounter.begin(); it != procCounter.end(); it++) {
     131    G4String procName = it->first; 
    146132    G4double massSigma =
    147133    emCalculator.GetCrossSectionPerVolume(energy,particle,
     
    167153  G4cout.precision(prec);         
    168154
    169   // delete and remove all contents in ProcCounter
    170   while (ProcCounter->size()>0){
    171     OneProcessCount* aProcCount=ProcCounter->back();
    172     ProcCounter->pop_back();
    173     delete aProcCount;
    174   }
    175   delete ProcCounter;
     155  // remove all contents in procCounter
     156  procCounter.clear();
    176157
    177158  // show Rndm status
  • trunk/examples/extended/electromagnetic/TestEm13/src/SteppingAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: SteppingAction.cc,v 1.7 2009/09/25 11:27:13 maire Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: SteppingAction.cc,v 1.8 2010/04/02 15:46:31 maire Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5353  G4String procName = endPoint->GetProcessDefinedStep()->GetProcessName();
    5454
    55   //count real interaction or transmitted beam
    56   //
    57   G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge(); 
    58   G4TrackVector* secondary = fpSteppingManager->GetSecondary();
    59   G4bool interaction = ((charge == 0.) || ((*secondary).size() > 0));
    60   G4bool transmit = (endPoint->GetStepStatus() <= fGeomBoundary);
    61  
    62   if (interaction || transmit) {
    63     runAction->CountProcesses(procName); 
    64   }
     55  runAction->CountProcesses(procName); 
    6556           
    6657  // kill event after first interaction
  • trunk/examples/extended/electromagnetic/TestEm13/src/SteppingVerbose.cc

    r1230 r1337  
    2525//
    2626// $Id: SteppingVerbose.cc,v 1.2 2006/06/29 16:44:51 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset for help on using the changeset viewer.