Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -56,9 +56,6 @@ void EventAction::BeginOfEventAction(const G4Event* /*event*/)
|
||||
|
||||
void EventAction::EndOfEventAction(const G4Event* event)
|
||||
{
|
||||
// Accumulate statistics
|
||||
//
|
||||
|
||||
// get analysis manager
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
@@ -80,8 +77,6 @@ void EventAction::EndOfEventAction(const G4Event* event)
|
||||
auto eventID = event->GetEventID();
|
||||
auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
|
||||
if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
G4cout
|
||||
<< " Absorber: total energy: " << std::setw(7)
|
||||
<< G4BestUnit(fEnergyAbs,"Energy")
|
||||
@@ -93,9 +88,11 @@ void EventAction::EndOfEventAction(const G4Event* event)
|
||||
<< " total track length: " << std::setw(7)
|
||||
<< G4BestUnit(fTrackLGap,"Length")
|
||||
<< G4endl;
|
||||
|
||||
G4cout << "--> End of event " << eventID << "\n" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ PrimaryGeneratorAction::PrimaryGeneratorAction()
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
|
||||
fParticleGun->SetParticleDefinition(particleDefinition);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
fParticleGun->SetParticleEnergy(50.*MeV);
|
||||
fParticleGun->SetParticleEnergy(300.*MeV);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -61,11 +61,11 @@ RunAction::RunAction()
|
||||
//
|
||||
|
||||
// Creating histograms
|
||||
analysisManager->CreateH1("Eabs","Edep in absorber", 100, 0., 800*MeV);
|
||||
analysisManager->CreateH1("Egap","Edep in gap", 100, 0., 100*MeV);
|
||||
analysisManager->CreateH1("Labs","trackL in absorber", 100, 0., 1*m);
|
||||
analysisManager->CreateH1("Lgap","trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
analysisManager->CreateH1("Eabs" ,"Edep in absorber", 110, 0., 330*MeV);
|
||||
analysisManager->CreateH1("Egap" ,"Edep in gap", 100, 0., 30*MeV);
|
||||
analysisManager->CreateH1("Labs" ,"trackL in absorber", 100, 0., 50*cm);
|
||||
analysisManager->CreateH1("Lgap" ,"trackL in gap", 100, 0., 50*cm);
|
||||
|
||||
// Creating ntuple
|
||||
//
|
||||
analysisManager->CreateNtuple("B4", "Edep and TrackL");
|
||||
@@ -131,7 +131,7 @@ void RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
G4cout << " LGap : mean = "
|
||||
<< G4BestUnit(analysisManager->GetH1(3)->mean(), "Length")
|
||||
<< " rms = "
|
||||
<< G4BestUnit(analysisManager->GetH1(3)->rms(), "Length") << G4endl;
|
||||
<< G4BestUnit(analysisManager->GetH1(3)->rms(), "Length") << G4endl;
|
||||
}
|
||||
|
||||
// save histograms & ntuple
|
||||
|
||||
Reference in New Issue
Block a user