42 for (
G4int i=0; i<10; i++)
dId[i] = -1;
50 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::Clear" <<
G4endl;
59 std::vector<G4CascadParticle>& daug) {
60 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::AddVertex" <<
G4endl;
67 G4cout <<
" entry " <<
id <<
" " << &theHistory[id] <<
" got "
68 << theHistory[id].n <<
" daughters:";
69 for (
G4int i=0; i<theHistory[id].n; i++) {
70 G4cout <<
" " << theHistory[id].dId[i];
83 G4cout <<
" >>> G4CascadeHistory::FillDaughters " << iEntry <<
G4endl;
86 theHistory[iEntry].clear();
88 theHistory[iEntry].n = nDaug;
89 for (
G4int i=0; i<nDaug; i++) {
91 theHistory[iEntry].dId[i] = id;
95 G4cout <<
" got " << theHistory[iEntry].n <<
" daughters:";
96 for (
G4int i=0; i<theHistory[iEntry].n; i++) {
97 G4cout <<
" " << theHistory[iEntry].dId[i];
111 G4cout <<
" AddEntry updating " <<
id <<
" " << &theHistory[id] <<
G4endl;
112 theHistory[id].cpart = cpart;
116 G4cout <<
" AddEntry creating " <<
id <<
" " << &theHistory.back() <<
G4endl;
119 if (verboseLevel>3)
G4cout << theHistory[id].cpart <<
G4endl;
127 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::DropEntry" <<
G4endl;
131 if (
id>=0) theHistory[id].n = -1;
139 if (verboseLevel>2) {
140 G4cout <<
" >>> G4CascadeHistory::NewHistoryID assigning ID "
156 if (verboseLevel) os <<
" >>> G4CascadeHistory::Print" << std::endl;
158 os <<
" Cascade structure: vertices, (-O-) exciton, (***) outgoing"
169 if (iEntry >=
size())
return;
172 entryPrinted.insert(iEntry);
180 std::ios::fmtflags osFlags = os.flags();
181 os.setf(std::ios::left);
182 os <<
"#" << std::setw(3+indent) << iEntry;
194 os <<
" -> N=" << entry.
n << std::endl;
195 for (
G4int i=0; i<entry.
n; i++) {
198 }
else os << std::endl;
205 if (verboseLevel>2)
G4cout <<
" >>> G4CascadeHistory::GuessTarget" <<
G4endl;
207 if (entry.
n < 0)
return "-O-";
208 if (entry.
n == 0)
return "***";
211 if (verboseLevel>3)
G4cout <<
"cpart: " << cpart;
217 for (
G4int i=0; i<entry.
n; i++) {
220 G4cout <<
"cdaug " << i <<
" ID " << entry.
dId[i] <<
": " << cdaug;
227 if (targetB==1 && targetQ==0)
return "n";
228 if (targetB==1 && targetQ==1)
return "p";
229 if (targetB==2 && targetQ==0)
return "nn";
230 if (targetB==2 && targetQ==1)
return "pn";
231 if (targetB==2 && targetQ==2)
return "pp";
233 if (verboseLevel>2) {
234 G4cout <<
" ERROR identifying target: deltaB " << targetB
235 <<
" deltaQ " << targetQ <<
" from\n" << cpart <<
" to" <<
G4endl;
236 for (
G4int j=0; j<entry.
n; j++) {
237 G4cout << theHistory[entry.
dId[j]].cpart;
std::ostream & operator<<(std::ostream &os, const G4CascadeHistory &history)
G4GLOB_DLL std::ostream G4cout
G4int getHistoryId() const
G4int getGeneration() const
const G4InuclElementaryParticle & getParticle() const
void setHistoryId(G4int id)
G4LorentzVector getMomentum() const
G4int getCurrentZone() const
const G4ThreeVector & getPosition() const
void PrintEntry(std::ostream &os, G4int iEntry) const
void FillDaughters(G4int iEntry, std::vector< G4CascadParticle > &daug)
void Print(std::ostream &os) const
G4int AddVertex(G4CascadParticle &cpart, std::vector< G4CascadParticle > &daug)
void DropEntry(const G4CascadParticle &cpart)
G4int AddEntry(G4CascadParticle &cpart)
void AssignHistoryID(G4CascadParticle &cpart)
G4bool PrintingDone(G4int iEntry) const
const char * GuessTarget(const HistoryEntry &entry) const
const G4ParticleDefinition * getDefinition() const
G4double getCharge() const
const G4String & GetParticleName() const