11 #include "G4ProcessManager.hh"
12 #include "G4ParticleTable.hh"
15 : fDEBUG(p.getUntrackedParameter<bool>(
"DEBUG",
false))
22 G4ParticleTable * partTable = G4ParticleTable::GetParticleTable();
23 int siz = partTable->size();
24 for (
int ii= 0; ii < siz; ii++)
26 G4ParticleDefinition * particle = partTable->GetParticle(ii);
27 std::string particleName = particle->GetParticleName();
29 std::cout << ii <<
" PCA " << particleName<<
" " << particle->GetPDGStable()
30 <<
" " << particle->IsShortLived() << std::endl;
34 G4ProcessManager * pmanager = particle->GetProcessManager();
35 G4ProcessVector * pvect = pmanager->GetProcessList();
36 int sizproc = pvect->size();
37 for (
int jj = 0;
jj < sizproc;
jj++)
39 std::string processName = (*pvect)[
jj]->GetProcessName();
41 std::cout <<
jj <<
" PCR " << processName<< std::endl;
51 const G4Track * aTrack = (*trk)();
52 std::string particleName = aTrack->GetDefinition()->GetParticleName();
56 const G4VProcess *
proc = aTrack->GetCreatorProcess();
57 std::string processName;
58 if (proc != 0) processName = proc->GetProcessName();
59 else processName =
"Primary";
60 pss parproc(particleName,processName);
63 else (*ite).second = (*ite).second +1;
65 std::cout <<
" creator " << particleName <<
" " << processName
71 std::string processName;
72 if(aStep->GetPostStepPoint()->GetProcessDefinedStep() != 0)
73 processName = aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
74 else processName =
"User Limit";
75 std::string particleName = aStep->GetTrack()->GetDefinition()->GetParticleName();
92 out <<
"PROC_LIST " << (*ite).first.first <<
" : "
93 << (*ite) .first.second << std::endl;
94 else if ((*ite).second != 0)
95 out <<
"PROC_COUNT " << (*ite).first.first <<
" : "
96 << (*ite) .first.second <<
" = " << (*ite).second << std::endl;
106 out <<
"PROC-CREATOR_LIST " << (*ite).first.first <<
" : "
107 <<(*ite) .first.second << std::endl;
108 else if ((*ite).second != 0)
109 out <<
"PROC_CREATOR_COUNT " << (*ite).first.first <<
" : "
110 <<(*ite) .first.second <<
" = " << (*ite).second << std::endl;
119 if ((*ite).second != 0)
120 out <<
"PART_LIST: " << (*ite).first <<
" = " << (*ite).second << std::endl;
void DumpProcessList(bool printNsteps, std::ostream &out=std::cout)
std::pair< ALIstring, ALIstring > pss
TrainProcessor *const proc
void DumpParticleList(std::ostream &out=std::cout)
void DumpCreatorProcessList(bool printNsteps, std::ostream &out=std::cout)
CountProcessesAction(edm::ParameterSet const &p)
void update(const BeginOfRun *run)
This routine will be called when the appropriate signal arrives.
perl if(1 lt scalar(@::datatypes))
mpssi theCreatorProcessList