Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
//
|
||||
|
||||
//
|
||||
// $Id: DetectorConstruction.cc,v 1.2 2003/11/25 15:19:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: DetectorConstruction.cc,v 1.3 2004/03/15 11:09:36 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.2 2003/10/08 17:55:34 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: EventAction.cc,v 1.3 2004/03/15 11:09:36 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -84,9 +84,9 @@ void EventAction::EndOfEventAction(const G4Event* evt)
|
||||
for(G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)
|
||||
((*(evt->GetTrajectoryContainer()))[i]);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(1000);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
trj->DrawTrajectory(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eBremsstrahlungCMS.cc,v 1.4 2003/10/28 10:27:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4eBremsstrahlungCMS.cc,v 1.5 2004/04/05 19:04:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -37,6 +37,7 @@
|
||||
// Modifications:
|
||||
//
|
||||
// 17-10-03 model variant (V.Ivanchenko)
|
||||
// 05-04-03 Migrate to ParticleChangeForLoss (V.Ivanchenko)
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -65,20 +66,20 @@ void G4eBremsstrahlungCMS::SecondariesPostStep( G4VEmModel* model,
|
||||
G4double& tcut,
|
||||
G4double& kinEnergy)
|
||||
{
|
||||
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
|
||||
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
|
||||
G4double gammaEnergy = gamma->GetKineticEnergy();
|
||||
kinEnergy -= gammaEnergy;
|
||||
G4int nSecond = 1;
|
||||
if(gammaEnergy > gammaThreshold) nSecond = 2;
|
||||
aParticleChange.SetNumberOfSecondaries(nSecond);
|
||||
aParticleChange.AddSecondary(gamma);
|
||||
aParticleChange.SetLocalEnergyDeposit(0.0);
|
||||
fParticleChange.SetNumberOfSecondaries(nSecond);
|
||||
fParticleChange.AddSecondary(gamma);
|
||||
fParticleChange.SetLocalEnergyDeposit(0.0);
|
||||
if(nSecond == 2) {
|
||||
aParticleChange.SetStatusChange(fStopAndKill);
|
||||
fParticleChange.SetStatusChange(fStopAndKill);
|
||||
G4DynamicParticle* el = new G4DynamicParticle(dp->GetDefinition(),
|
||||
dp->GetMomentumDirection(),
|
||||
kinEnergy);
|
||||
aParticleChange.AddSecondary(el);
|
||||
fParticleChange.AddSecondary(el);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc,v 1.5 2003/10/24 12:06:36 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: PhysListEmStandard.cc,v 1.6 2004/04/13 15:07:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -82,15 +82,15 @@ void PhysListEmStandard::ConstructProcess()
|
||||
//electron
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
||||
///pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
|
||||
///pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
||||
pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
||||
///pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
|
||||
///pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
|
||||
pmanager->AddProcess(new G4eBremsstrahlungCMS("brCMS", 10*MeV),-1,3,3);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
||||
|
||||
} else if( particleName == "mu+" ||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysListGeneral.cc,v 1.1 2003/10/06 10:02:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListGeneral.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Decay.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListGeneral::PhysListGeneral(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListGeneral::~PhysListGeneral()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListGeneral::ConstructProcess()
|
||||
{
|
||||
// Add Decay Process
|
||||
|
||||
G4Decay* fDecayProcess = new G4Decay();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fDecayProcess->IsApplicable(*particle)) {
|
||||
|
||||
pmanager ->AddProcess(fDecayProcess);
|
||||
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysListParticles.cc,v 1.1 2003/10/06 10:02:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListParticles.hh"
|
||||
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
// leptons
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
// Mesons
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4Eta.hh"
|
||||
#include "G4EtaPrime.hh"
|
||||
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4AntiKaonZero.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
|
||||
// Baryons
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
|
||||
// Nuclei
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListParticles::PhysListParticles(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListParticles::~PhysListParticles()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListParticles::ConstructParticle()
|
||||
{
|
||||
|
||||
// pseudo-particles
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
|
||||
// gamma
|
||||
G4Gamma::GammaDefinition();
|
||||
|
||||
// optical photon
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
|
||||
// leptons
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4PionZero::PionZeroDefinition();
|
||||
G4Eta::EtaDefinition();
|
||||
G4EtaPrime::EtaPrimeDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
G4KaonZero::KaonZeroDefinition();
|
||||
G4AntiKaonZero::AntiKaonZeroDefinition();
|
||||
G4KaonZeroLong::KaonZeroLongDefinition();
|
||||
G4KaonZeroShort::KaonZeroShortDefinition();
|
||||
|
||||
// barions
|
||||
G4Proton::ProtonDefinition();
|
||||
G4AntiProton::AntiProtonDefinition();
|
||||
G4Neutron::NeutronDefinition();
|
||||
G4AntiNeutron::AntiNeutronDefinition();
|
||||
|
||||
// ions
|
||||
G4Deuteron::DeuteronDefinition();
|
||||
G4Triton::TritonDefinition();
|
||||
G4He3::He3Definition();
|
||||
G4Alpha::AlphaDefinition();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.2 2003/10/24 12:06:36 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: PhysicsList.cc,v 1.3 2004/06/09 15:29:45 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "PhysicsList.hh"
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysListParticles.hh"
|
||||
#include "PhysListGeneral.hh"
|
||||
#include "PhysListEmStandard.hh"
|
||||
#include "PhysListEmG4v52.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
@@ -55,12 +53,6 @@ PhysicsList::PhysicsList(DetectorConstruction* p)
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// Particles
|
||||
particleList = new PhysListParticles("particles");
|
||||
|
||||
// General Physics
|
||||
generalPhysicsList = new PhysListGeneral("general");
|
||||
|
||||
// EM physics
|
||||
emName = G4String("standard");
|
||||
@@ -77,18 +69,136 @@ PhysicsList::~PhysicsList()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
// leptons
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
// Mesons
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4Eta.hh"
|
||||
#include "G4EtaPrime.hh"
|
||||
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4AntiKaonZero.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
|
||||
// Baryons
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
|
||||
// Nuclei
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructParticle()
|
||||
{
|
||||
particleList->ConstructParticle();
|
||||
// pseudo-particles
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
|
||||
// gamma
|
||||
G4Gamma::GammaDefinition();
|
||||
|
||||
// optical photon
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
|
||||
// leptons
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4PionZero::PionZeroDefinition();
|
||||
G4Eta::EtaDefinition();
|
||||
G4EtaPrime::EtaPrimeDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
G4KaonZero::KaonZeroDefinition();
|
||||
G4AntiKaonZero::AntiKaonZeroDefinition();
|
||||
G4KaonZeroLong::KaonZeroLongDefinition();
|
||||
G4KaonZeroShort::KaonZeroShortDefinition();
|
||||
|
||||
// barions
|
||||
G4Proton::ProtonDefinition();
|
||||
G4AntiProton::AntiProtonDefinition();
|
||||
G4Neutron::NeutronDefinition();
|
||||
G4AntiNeutron::AntiNeutronDefinition();
|
||||
|
||||
// ions
|
||||
G4Deuteron::DeuteronDefinition();
|
||||
G4Triton::TritonDefinition();
|
||||
G4He3::He3Definition();
|
||||
G4Alpha::AlphaDefinition();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Decay.hh"
|
||||
|
||||
void PhysicsList::ConstructProcess()
|
||||
{
|
||||
// Transportation
|
||||
//
|
||||
AddTransportation();
|
||||
generalPhysicsList->ConstructProcess();
|
||||
|
||||
// Electromagnetic physics list
|
||||
//
|
||||
emPhysicsList->ConstructProcess();
|
||||
|
||||
// Decay Process
|
||||
//
|
||||
G4Decay* fDecayProcess = new G4Decay();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fDecayProcess->IsApplicable(*particle)) {
|
||||
|
||||
pmanager ->AddProcess(fDecayProcess);
|
||||
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RunAction.cc,v 1.3 2003/11/07 15:38:28 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: RunAction.cc,v 1.5 2004/03/31 11:34:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -35,14 +35,12 @@
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include <iomanip>
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/AIDA.h"
|
||||
#endif
|
||||
|
||||
@@ -63,7 +61,7 @@ RunAction::~RunAction()
|
||||
|
||||
void RunAction::bookHisto()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
// Creating the analysis factory
|
||||
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
|
||||
|
||||
@@ -78,11 +76,10 @@ void RunAction::bookHisto()
|
||||
// Creating a histogram factory, whose histograms will be handled by the tree
|
||||
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
|
||||
|
||||
|
||||
// booking histograms
|
||||
histo[0] = hf->createHistogram1D("1","track length (mm) of a charged particle",
|
||||
100,0.,50*cm);
|
||||
histo[1] = hf->createHistogram1D("2","Nb of steps per track (charged particle)",
|
||||
histo[1] = hf->createHistogram1D("2","Nb steps per track (charged particle)",
|
||||
100,0.,100.);
|
||||
histo[2] = hf->createHistogram1D("3","step length (mm) charged particle",
|
||||
100,0.,10*mm);
|
||||
@@ -90,19 +87,18 @@ void RunAction::bookHisto()
|
||||
delete hf;
|
||||
delete tf;
|
||||
delete af;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::cleanHisto()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
tree->commit(); // Writing the histograms to the file
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
delete tree;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -122,9 +118,6 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
//histograms
|
||||
//
|
||||
if (aRun->GetRunID() == 0) bookHisto();
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -187,10 +180,6 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
delete aProcCount;
|
||||
}
|
||||
delete ProcCounter;
|
||||
|
||||
//draw the events
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
|
||||
|
||||
// show Rndm status
|
||||
HepRandom::showEngineStatus();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: SteppingAction.cc,v 1.3 2003/11/07 15:38:29 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: SteppingAction.cc,v 1.5 2004/03/31 11:34:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#endif
|
||||
|
||||
@@ -63,11 +63,11 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
if (process) runAction->CountProcesses(process->GetProcessName());
|
||||
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
|
||||
G4double steplen = aStep->GetStepLength();
|
||||
if (charge != 0.) runAction->GetHisto(2)->fill(steplen);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: TrackingAction.cc,v 1.5 2003/10/28 10:27:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: TrackingAction.cc,v 1.7 2004/03/31 11:35:00 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "G4Track.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#endif
|
||||
|
||||
@@ -70,11 +70,11 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
|
||||
runAction->CountTraks1(1);
|
||||
runAction->CountSteps1(nbSteps);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
G4double Trleng = aTrack->GetTrackLength();
|
||||
runAction->GetHisto(0)->fill(Trleng);
|
||||
runAction->GetHisto(1)->fill((float)nbSteps);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user