Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -45,7 +45,7 @@ namespace B4b
|
||||
void EventAction::PrintEventStatistics(
|
||||
G4double absoEdep, G4double absoTrackLength,
|
||||
G4double gapEdep, G4double gapTrackLength) const
|
||||
{
|
||||
{
|
||||
// print event statistics
|
||||
G4cout
|
||||
<< " Absorber: total energy: "
|
||||
@@ -84,13 +84,12 @@ 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;
|
||||
|
||||
PrintEventStatistics(
|
||||
runData->GetEdep(kAbs),
|
||||
runData->GetTrackLength(kAbs),
|
||||
runData->GetEdep(kGap),
|
||||
runData->GetTrackLength(kGap));
|
||||
G4cout << "--> End of event " << eventID << "\n" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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......
|
||||
|
||||
@@ -62,11 +62,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");
|
||||
|
||||
@@ -44,7 +44,7 @@ void RunData::FillPerEvent()
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// accumulate statistic
|
||||
// in the order od the histograms, ntuple columns declarations
|
||||
// in the order of the histograms, ntuple columns declarations
|
||||
G4int counter = 0;
|
||||
for ( auto edep : fEdep ) {
|
||||
analysisManager->FillH1(counter, edep);
|
||||
@@ -54,6 +54,7 @@ void RunData::FillPerEvent()
|
||||
analysisManager->FillH1(counter, trackLength);
|
||||
analysisManager->FillNtupleDColumn(counter++, trackLength);
|
||||
}
|
||||
|
||||
analysisManager->AddNtupleRow();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user