43 for (
G4int i=0; i<10; i++)
dId[i] = -1;
51 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::Clear" <<
G4endl;
60 std::vector<G4CascadParticle>& daug) {
61 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::AddVertex" <<
G4endl;
68 G4cout <<
" entry " <<
id <<
" " << &theHistory[id] <<
" got "
69 << theHistory[id].n <<
" daughters:";
70 for (
G4int i=0; i<theHistory[id].n; i++) {
71 G4cout <<
" " << theHistory[id].dId[i];
84 G4cout <<
" >>> G4CascadeHistory::FillDaughters " << iEntry <<
G4endl;
87 theHistory[iEntry].clear();
89 theHistory[iEntry].n = nDaug;
90 for (
G4int i=0; i<nDaug; i++) {
92 theHistory[iEntry].dId[i] = id;
96 G4cout <<
" got " << theHistory[iEntry].n <<
" daughters:";
97 for (
G4int i=0; i<theHistory[iEntry].n; i++) {
98 G4cout <<
" " << theHistory[iEntry].dId[i];
112 G4cout <<
" AddEntry updating " <<
id <<
" " << &theHistory[id] <<
G4endl;
113 theHistory[id].cpart = cpart;
117 G4cout <<
" AddEntry creating " <<
id <<
" " << &theHistory.back() <<
G4endl;
120 if (verboseLevel>3)
G4cout << theHistory[id].cpart <<
G4endl;
128 if (verboseLevel>1)
G4cout <<
" >>> G4CascadeHistory::DropEntry" <<
G4endl;
132 if (
id>=0) theHistory[id].n = -1;
140 if (verboseLevel>2) {
141 G4cout <<
" >>> G4CascadeHistory::NewHistoryID assigning ID "
157 if (verboseLevel) os <<
" >>> G4CascadeHistory::Print" << std::endl;
159 os <<
" Cascade structure: vertices, (-O-) exciton, (***) outgoing"
170 if (iEntry >=
size())
return;
173 entryPrinted.insert(iEntry);
181 std::ios::fmtflags osFlags = os.flags();
183 os <<
"#" << std::setw(3+indent) << iEntry;
195 os <<
" -> N=" << entry.
n << std::endl;
196 for (
G4int i=0; i<entry.
n; i++) {
199 }
else os << std::endl;
206 if (verboseLevel>2)
G4cout <<
" >>> G4CascadeHistory::GuessTarget" <<
G4endl;
208 if (entry.
n < 0)
return "-O-";
209 if (entry.
n == 0)
return "***";
212 if (verboseLevel>3)
G4cout <<
"cpart: " << cpart;
216 G4int targetQ = (
G4int)-cpart.getParticle().getCharge();
218 for (
G4int i=0; i<entry.
n; i++) {
221 G4cout <<
"cdaug " << i <<
" ID " << entry.
dId[i] <<
": " << cdaug;
228 if (targetB==1 && targetQ==0)
return "n";
229 if (targetB==1 && targetQ==1)
return "p";
230 if (targetB==2 && targetQ==0)
return "nn";
231 if (targetB==2 && targetQ==1)
return "pn";
232 if (targetB==2 && targetQ==2)
return "pp";
234 if (verboseLevel>2) {
235 G4cout <<
" ERROR identifying target: deltaB " << targetB
236 <<
" deltaQ " << targetQ <<
" from\n" << cpart <<
" to" <<
G4endl;
237 for (
G4int j=0; j<entry.
n; j++) {
238 G4cout << theHistory[entry.
dId[j]].cpart;
G4LorentzVector getMomentum() const
G4bool PrintingDone(G4int iEntry) const
G4int getGeneration() const
void setHistoryId(G4int id)
void Print(std::ostream &os) const
void AssignHistoryID(G4CascadParticle &cpart)
const G4InuclElementaryParticle & getParticle() const
const G4String & GetParticleName() const
void PrintEntry(std::ostream &os, G4int iEntry) const
G4GLOB_DLL std::ostream G4cout
void DropEntry(const G4CascadParticle &cpart)
std::ostream & operator<<(std::ostream &ostr, const G4String &astr)
G4int AddEntry(G4CascadParticle &cpart)
G4int getCurrentZone() const
G4double getCharge() const
G4int getHistoryId() const
const G4ThreeVector & getPosition() const
const char * GuessTarget(const HistoryEntry &entry) const
G4int AddVertex(G4CascadParticle &cpart, std::vector< G4CascadParticle > &daug)
G4ParticleDefinition * getDefinition() const
void FillDaughters(G4int iEntry, std::vector< G4CascadParticle > &daug)