34 #include "SteppingAction.hh"
35 #include "PrimaryGeneratorAction.hh"
36 #include "RunAction.hh"
37 #include "HistoManager.hh"
46 :fPrimary(prim),fRunAction(RuAct)
88 if (target) targetName = target->
GetName();
89 nuclearChannel +=
" + " + targetName +
" --> ";
97 analysis->FillH1(ih,energy);
101 Pbalance += momentum;
103 nuclearChannel += partName +
" + ";
109 for (
size_t lp=0; lp<(*secondary).size(); lp++) {
110 particle = (*secondary)[lp]->GetDefinition();
114 G4double energy = (*secondary)[lp]->GetKineticEnergy();
117 if (charge > 3.) ih = 2;
123 else if (type ==
"nucleus") ih = 8;
124 else if (type ==
"meson") ih = 9;
125 else if (type ==
"baryon") ih = 10;
126 analysis->FillH1(ih,energy);
130 Pbalance += momentum;
132 fParticleFlag[particle]++;
139 analysis->FillH1(ih,Q);
141 analysis->FillH1(ih,Pbal);
144 const G4int kMax = 16;
145 const G4String conver[] = {
"0",
"",
"2 ",
"3 ",
"4 ",
"5 ",
"6 ",
"7 ",
"8 ",
"9 ",
146 "10 ",
"11 ",
"12 ",
"13 ",
"14 ",
"15 ",
"16 "};
147 std::map<G4ParticleDefinition*,G4int>::iterator ip;
148 for (ip = fParticleFlag.begin(); ip != fParticleFlag.end(); ip++) {
149 particle = ip->first;
151 G4int nb = ip->second;
152 if (nb > kMax) nb = kMax;
158 if (ip != fParticleFlag.begin()) nuclearChannel +=
" + ";
159 nuclearChannel += Nb +
name;
165 fParticleFlag.clear();