8 #include "G4ParticleTable.hh"
9 #include "G4ProcessManager.hh"
15 : fDEBUG(p.getUntrackedParameter<bool>(
"DEBUG",
false)) {}
20 G4ParticleTable *partTable = G4ParticleTable::GetParticleTable();
21 int siz = partTable->size();
22 for (
int ii = 0;
ii < siz;
ii++) {
23 G4ParticleDefinition *particle = partTable->GetParticle(
ii);
24 std::string particleName = particle->GetParticleName();
26 std::cout <<
ii <<
" PCA " << particleName <<
" " << particle->GetPDGStable() <<
" " << particle->IsShortLived()
31 G4ProcessManager *pmanager = particle->GetProcessManager();
32 G4ProcessVector *pvect = pmanager->GetProcessList();
33 int sizproc = pvect->size();
34 for (
int jj = 0;
jj < sizproc;
jj++) {
37 std::cout <<
jj <<
" PCR " << processName << std::endl;
46 const G4Track *aTrack = (*trk)();
47 std::string particleName = aTrack->GetDefinition()->GetParticleName();
51 const G4VProcess *
proc = aTrack->GetCreatorProcess();
54 processName = proc->GetProcessName();
56 processName =
"Primary";
57 pss parproc(particleName, processName);
62 (*ite).second = (*ite).second + 1;
69 if (aStep->GetPostStepPoint()->GetProcessDefinedStep() !=
nullptr)
70 processName = aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
72 processName =
"User Limit";
73 std::string particleName = aStep->GetTrack()->GetDefinition()->GetParticleName();
87 out <<
"PROC_LIST " << (*ite).first.first <<
" : " << (*ite).first.second << std::endl;
88 else if ((*ite).second != 0)
89 out <<
"PROC_COUNT " << (*ite).first.first <<
" : " << (*ite).first.second <<
" = " << (*ite).second << std::endl;
97 out <<
"PROC-CREATOR_LIST " << (*ite).first.first <<
" : " << (*ite).first.second << std::endl;
98 else if ((*ite).second != 0)
99 out <<
"PROC_CREATOR_COUNT " << (*ite).first.first <<
" : " << (*ite).first.second <<
" = " << (*ite).second
107 if ((*ite).second != 0)
108 out <<
"PART_LIST: " << (*ite).first <<
" = " << (*ite).second << std::endl;
void DumpProcessList(bool printNsteps, std::ostream &out=std::cout)
std::pair< ALIstring, ALIstring > pss
void DumpParticleList(std::ostream &out=std::cout)
void DumpCreatorProcessList(bool printNsteps, std::ostream &out=std::cout)
~CountProcessesAction() override
if(conf_.getParameter< bool >("UseStripCablingDB"))
CountProcessesAction(edm::ParameterSet const &p)
mpssi theCreatorProcessList
void update(const BeginOfRun *run) override
This routine will be called when the appropriate signal arrives.