30 #include "RunAction.hh"
32 #include "TrackingAction.hh"
35 #include "Analysis.hh"
38 void PrintNParticles(std::map<const G4ParticleDefinition*, int>& container);
89 G4cout <<
"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°" <<
G4endl;
91 G4cout <<
"°°°°°°°°°°°°°°°° RunAction::BeginMaster" <<
G4endl;
93 G4cout <<
"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°" <<
G4endl;
112 G4cout <<
"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°" <<
G4endl;
113 G4cout <<
"°°°°°°°°°°°°°°°° RunAction::BeginWorker" <<
G4endl;
115 G4cout <<
"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°" <<
G4endl;
143 if ( nofEvents == 0 )
147 G4cout <<
"°°°°°°°°°°°°°°°° NO EVENTS TREATED IN THIS RUN ==> LEAVING RunAction::EndOfRunAction "<<
G4endl;
160 delete G4AnalysisManager::Instance();
165 std::map<const G4ParticleDefinition*, int>&
168 G4cout <<
"Number and type of particles created outside region \"Target\" :" <<
G4endl;
174 std::map<const G4ParticleDefinition*, int>&
177 G4cout <<
"Number and type of particles created in region \"Target\" :" <<
G4endl;
194 exDescrption <<
"fpTrackingAction is a null pointer. Has it been correctly initialized ?";
212 G4cout <<
"##### Create analysis manager " <<
" " <<
this <<
G4endl;
215 G4cout <<
"Using " << analysisManager->GetType() <<
" analysis manager" <<
G4endl;
221 analysisManager->SetVerboseLevel(1);
225 G4String fileName =
"microelectronics";
226 analysisManager->OpenFile(fileName);
230 analysisManager->CreateNtuple(
"microelectronics",
"physics");
231 analysisManager->CreateNtupleDColumn(
"flagParticle");
232 analysisManager->CreateNtupleDColumn(
"flagProcess");
233 analysisManager->CreateNtupleDColumn(
"x");
234 analysisManager->CreateNtupleDColumn(
"y");
235 analysisManager->CreateNtupleDColumn(
"z");
236 analysisManager->CreateNtupleDColumn(
"totalEnergyDeposit");
237 analysisManager->CreateNtupleDColumn(
"stepLength");
238 analysisManager->CreateNtupleDColumn(
"kineticEnergyDifference");
239 analysisManager->FinishNtuple();
252 analysisManager->Write();
253 analysisManager->CloseFile();
269 std::map<const G4ParticleDefinition*, int>::iterator it;
270 for(it = container.begin() ;
271 it != container.end(); it ++)
273 G4cout <<
"N " << it->first->GetParticleName() <<
" : " << it->second <<
G4endl;
static G4RunManager * GetRunManager()
TrackingAction * fpTrackingAction
std::ostringstream G4ExceptionDescription
void EndOfRunAction(const G4Run *)
void EndMaster(const G4Run *)
void PrintRunInfo(const G4Run *run)
const G4UserTrackingAction * GetUserTrackingAction() const
std::map< const G4ParticleDefinition *, int > & GetNParticlesCreatedInWorld()
std::map< const G4ParticleDefinition *, int > & GetNParticlesCreatedInTarget()
void BeginOfRunAction(const G4Run *)
G4int GetNumberOfEvent() const
void BeginWorker(const G4Run *)
void BeginMaster(const G4Run *)
void PrintNParticles(std::map< const G4ParticleDefinition *, int > &container)
G4CsvAnalysisManager G4AnalysisManager
G4int GetNumberOfEventToBeProcessed() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
void EndWorker(const G4Run *)
RMType GetRunManagerType() const
void InitializeWorker(const G4Run *)