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/TestEm6/src
Files:
11 edited

Legend:

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

    r1230 r1337  
    2525//
    2626// $Id: DetectorConstruction.cc,v 1.10 2006/06/29 16:57:00 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/TestEm6/src/DetectorMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: DetectorMessenger.cc,v 1.5 2006/06/29 16:57:02 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/TestEm6/src/EventAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: EventAction.cc,v 1.6 2006/06/29 16:57:04 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: EventAction.cc,v 1.8 2010/06/07 05:40:46 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    6767//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6868
    69 void EventAction::EndOfEventAction(const G4Event* evt)
     69void EventAction::EndOfEventAction(const G4Event*)
    7070{
    71   if (G4VVisManager::GetConcreteInstance())
    72   {
    73    G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
    74    G4int n_trajectories = 0;
    75    if (trajectoryContainer) n_trajectories = trajectoryContainer->entries(); 
    76    for(G4int i=0; i<n_trajectories; i++)
    77       { G4Trajectory* trj = (G4Trajectory*)
    78                                        ((*(evt->GetTrajectoryContainer()))[i]);
    79         if (drawFlag == "all") trj->DrawTrajectory(100);
    80         else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
    81                                trj->DrawTrajectory(100);
    82       }
    83   }
    8471}
    8572
  • trunk/examples/extended/electromagnetic/TestEm6/src/EventActionMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.6 2006/06/29 16:57:07 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/TestEm6/src/PhysicsList.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsList.cc,v 1.13 2009/05/13 17:25:33 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: PhysicsList.cc,v 1.15 2010/03/31 09:26:09 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4242#include "G4Neutron.hh"
    4343#include "G4AntiNeutron.hh"
    44 //#include "G4GenericIon.hh"
    4544
    4645#include "G4GammaConversionToMuons.hh"
    4746
    48 #include "G4MultipleScattering.hh"
     47#include "G4eMultipleScattering.hh"
     48#include "G4MuMultipleScattering.hh"
     49#include "G4hMultipleScattering.hh"
    4950
    5051#include "G4eIonisation.hh"
     
    6768#include "G4StepLimiter.hh"
    6869
     70#include "G4ProcessTable.hh"
     71
     72#include "G4ComptonScattering.hh"
     73#include "G4GammaConversion.hh"
     74#include "G4PhotoElectricEffect.hh"
     75
     76
    6977//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7078
     
    7482  defaultCutValue = 1.*km;
    7583  pMes = new PhysicsListMessenger(this);
    76   theGammaToMuPairProcess = 0;
    77   theAnnihiToMuPairProcess = 0;
    78   eehadProcess = 0;
    7984  SetVerboseLevel(1);
    8085}
     
    8590{
    8691  delete pMes;
    87   delete theAnnihiToMuPairProcess;
    88   delete theGammaToMuPairProcess;
    89   delete eehadProcess;
    9092}
    9193
     
    176178    if (particleName == "gamma") {
    177179      // gamma    allow  only   gamma -> mu+mu-
    178       theGammaToMuPairProcess=new G4GammaConversionToMuons();
    179       pmanager->AddDiscreteProcess(theGammaToMuPairProcess);
    180 
     180      pmanager->AddDiscreteProcess(new G4GammaConversionToMuons);
     181      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
     182      pmanager->AddDiscreteProcess(new G4ComptonScattering);
     183      pmanager->AddDiscreteProcess(new G4GammaConversion);
     184         
    181185    } else if (particleName == "e-") {
    182186      //electron
    183       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
     187      pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
    184188      pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
    185189      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
     
    190194      // to make the process of e+e- annihilation more visible,
    191195      // do not enable the other standard processes:
    192       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
    193       pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
    194       pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
    195       pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
    196      
    197       theAnnihiToMuPairProcess = new G4AnnihiToMuPair();
    198       eehadProcess             = new G4eeToHadrons();
    199       pmanager->AddDiscreteProcess(theAnnihiToMuPairProcess);
    200       pmanager->AddDiscreteProcess(eehadProcess);
     196      //pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
     197      //pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
     198      //pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
     199      //pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
     200
     201      pmanager->AddDiscreteProcess(new G4AnnihiToMuPair);
     202      pmanager->AddDiscreteProcess(new G4eeToHadrons);
    201203      pmanager->AddDiscreteProcess(new G4StepLimiter);
    202204       
     
    204206               particleName == "mu-"    ) {
    205207      //muon
    206       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
     208      pmanager->AddProcess(new G4MuMultipleScattering,-1, 1,1);
    207209      pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
    208210      pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
     
    211213     
    212214    } else if( particleName == "anti_proton") {
    213       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
     215      pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
    214216      pmanager->AddProcess(new G4hhIonisation,      -1, 2,2);
    215217      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);       
    216218
    217219    } else if( particleName == "GenericIon") {
    218       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
     220      pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
    219221      pmanager->AddProcess(new G4ionIonisation,     -1, 2,2);
    220222      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);       
     
    222224    } else if( particle->GetPDGCharge() != 0.0 && !particle->IsShortLived()
    223225            && particleName != "chargedgeantino") {
    224       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
     226      pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
    225227      pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
    226228      pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);       
     
    277279void PhysicsList::SetGammaToMuPairFac(G4double fac)
    278280{
     281  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
     282  G4GammaConversionToMuons* theGammaToMuPairProcess = (G4GammaConversionToMuons*) theProcessTable->FindProcess("GammaToMuPair","gamma");
    279283  if(theGammaToMuPairProcess) theGammaToMuPairProcess->SetCrossSecFactor(fac);
     284  else G4cout << "Warning. No process GammaToMuPair found, SetGammaToMuPairFac was ignored" << G4endl;
    280285}
    281286
     
    284289void PhysicsList::SetAnnihiToMuPairFac(G4double fac)
    285290{
     291  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
     292  G4AnnihiToMuPair* theAnnihiToMuPairProcess = (G4AnnihiToMuPair*) theProcessTable->FindProcess("AnnihiToMuPair","e+");
    286293  if(theAnnihiToMuPairProcess) theAnnihiToMuPairProcess->SetCrossSecFactor(fac);
     294  else G4cout << "Warning. No process AnnihiToMuPair found, SetAnnihiToMuPairFac was ignored" << G4endl;
    287295}
    288296
     
    291299void PhysicsList::SetAnnihiToHadronFac(G4double fac)
    292300{
     301  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
     302  G4eeToHadrons* eehadProcess = (G4eeToHadrons*) theProcessTable->FindProcess("ee2hadr","e+");
    293303  if(eehadProcess) eehadProcess->SetCrossSecFactor(fac);
    294 }
    295 
    296 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     304  else G4cout << "Warning. No process ee2hadr found, SetAnnihiToHadronFac was ignored" << G4endl;
     305}
     306
     307//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm6/src/PhysicsListMessenger.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsListMessenger.cc,v 1.8 2006/06/29 16:57:11 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: PhysicsListMessenger.cc,v 1.9 2009/11/27 14:54:58 hbu Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4444  physDir->SetGuidance("physics list commands");
    4545 
    46   GammaToMuPairFac=new G4UIcmdWithADouble
     46  GammaToMuPairFacCmd=new G4UIcmdWithADouble
    4747                                      ("/testem/phys/SetGammaToMuPairFac",this);
    48   GammaToMuPairFac->SetGuidance(
     48  GammaToMuPairFacCmd->SetGuidance(
    4949         "Set factor to artificially increase the GammaToMuPair cross section");
    50   GammaToMuPairFac->SetParameterName("GammaToMuPairFac",false);
    51   GammaToMuPairFac->SetRange("GammaToMuPairFac>0.0");
    52   GammaToMuPairFac->AvailableForStates(G4State_PreInit,G4State_Idle);
     50  GammaToMuPairFacCmd->SetParameterName("GammaToMuPairFac",false);
     51  GammaToMuPairFacCmd->SetRange("GammaToMuPairFac>0.0");
     52  GammaToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    5353
    54   AnnihiToMuPairFac=new G4UIcmdWithADouble
     54  AnnihiToMuPairFacCmd=new G4UIcmdWithADouble
    5555                                     ("/testem/phys/SetAnnihiToMuPairFac",this);
    56   AnnihiToMuPairFac->SetGuidance(
     56  AnnihiToMuPairFacCmd->SetGuidance(
    5757        "Set factor to artificially increase the AnnihiToMuPair cross section");
    58   AnnihiToMuPairFac->SetParameterName("AnnihiToMuPairFac",false);
    59   AnnihiToMuPairFac->SetRange("AnnihiToMuPairFac>0.0");
    60   AnnihiToMuPairFac->AvailableForStates(G4State_PreInit,G4State_Idle);
     58  AnnihiToMuPairFacCmd->SetParameterName("AnnihiToMuPairFac",false);
     59  AnnihiToMuPairFacCmd->SetRange("AnnihiToMuPairFac>0.0");
     60  AnnihiToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
    6161 
    62   AnnihiToHadronFac=new G4UIcmdWithADouble
     62  AnnihiToHadronFacCmd=new G4UIcmdWithADouble
    6363                                      ("/testem/phys/SetAnnihiToHadronFac",this);
    64   AnnihiToHadronFac->SetGuidance(
     64  AnnihiToHadronFacCmd->SetGuidance(
    6565       "Set factor to artificially increase the AnnihiToHadrons cross section");
    66   AnnihiToHadronFac->SetParameterName("AnnihiToHadFac",false);
    67   AnnihiToHadronFac->SetRange("AnnihiToHadFac>0.0");
    68   AnnihiToHadronFac->AvailableForStates(G4State_PreInit,G4State_Idle); 
     66  AnnihiToHadronFacCmd->SetParameterName("AnnihiToHadFac",false);
     67  AnnihiToHadronFacCmd->SetRange("AnnihiToHadFac>0.0");
     68  AnnihiToHadronFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 
    6969}
    7070
     
    7373PhysicsListMessenger::~PhysicsListMessenger()
    7474{
    75   delete GammaToMuPairFac;
    76   delete AnnihiToMuPairFac;
    77   delete AnnihiToHadronFac
     75  delete GammaToMuPairFacCmd;
     76  delete AnnihiToMuPairFacCmd;
     77  delete AnnihiToHadronFacCmd
    7878  delete physDir; 
    7979}
     
    8484                                          G4String newValue)
    8585{
    86   if(command == GammaToMuPairFac)
     86  if(command == GammaToMuPairFacCmd)
    8787   { physList->SetGammaToMuPairFac(
    88                            GammaToMuPairFac->GetNewDoubleValue(newValue));}   
     88                           GammaToMuPairFacCmd->GetNewDoubleValue(newValue));}   
    8989
    90   if( command == AnnihiToMuPairFac)
     90  if( command == AnnihiToMuPairFacCmd)
    9191   { physList->SetAnnihiToMuPairFac(
    92                           AnnihiToMuPairFac->GetNewDoubleValue(newValue));}
     92                          AnnihiToMuPairFacCmd->GetNewDoubleValue(newValue));}
    9393                         
    94   if( command == AnnihiToHadronFac)
     94  if( command == AnnihiToHadronFacCmd)
    9595   { physList->SetAnnihiToHadronFac(
    96                           AnnihiToHadronFac->GetNewDoubleValue(newValue));}                         
     96                          AnnihiToHadronFacCmd->GetNewDoubleValue(newValue));}                       
    9797}
    9898
  • trunk/examples/extended/electromagnetic/TestEm6/src/PrimaryGeneratorAction.cc

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorAction.cc,v 1.3 2006/06/29 16:57:14 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/TestEm6/src/PrimaryGeneratorMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorMessenger.cc,v 1.5 2006/06/29 16:57:17 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/TestEm6/src/RunAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: RunAction.cc,v 1.13 2008/09/18 16:42:07 maire Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: RunAction.cc,v 1.14 2009/11/27 14:54:58 hbu Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    108108  G4RunManager::GetRunManager()->SetRandomNumberStore(true);
    109109  CLHEP::HepRandom::showEngineStatus();
     110  ProcCounter = new ProcessesCount;
     111}
     112
     113//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     114
     115void RunAction::CountProcesses(G4String procName)
     116{
     117  //does the process  already encounted ?
     118  size_t nbProc = ProcCounter->size();
     119  size_t i = 0;
     120  while ((i<nbProc)&&((*ProcCounter)[i]->GetName()!=procName)) i++;
     121  if (i == nbProc) ProcCounter->push_back( new OneProcessCount(procName));
     122 
     123  (*ProcCounter)[i]->Count();
    110124}
    111125
     
    116130  // show Rndm status
    117131  CLHEP::HepRandom::showEngineStatus();
     132  //total number of process calls
     133  G4double countTot = 0.;
     134  G4cout << "\n Number of process calls --->";
     135  for (size_t i=0; i< ProcCounter->size();i++) {
     136        G4String procName = (*ProcCounter)[i]->GetName();
     137        if (procName != "Transportation") {
     138          G4int count    = (*ProcCounter)[i]->GetCounter();
     139          G4cout << "\t" << procName << " : " << count;
     140          countTot += count;
     141        }
     142  }
     143  G4cout << G4endl;
     144 
    118145}
    119146
  • trunk/examples/extended/electromagnetic/TestEm6/src/SteppingAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: SteppingAction.cc,v 1.9 2006/06/29 16:57:23 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: SteppingAction.cc,v 1.10 2009/11/27 14:54:58 hbu Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    6060 if (process == 0) return; 
    6161 G4String processName = process->GetProcessName();
     62 runAction->CountProcesses(processName); //count processes
     63 
    6264 if (processName != "GammaToMuPair") return;
    6365 
  • trunk/examples/extended/electromagnetic/TestEm6/src/SteppingVerbose.cc

    r1230 r1337  
    2525//
    2626// $Id: SteppingVerbose.cc,v 1.5 2006/06/29 16:57:25 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.