48 current_zone(-1), current_path(-1.), movingIn(false),
49 reflectionCounter(0), reflected(false), generation(-1), historyId(-1) {
50 if (verboseLevel > 3) {
51 G4cout <<
" >>> G4CascadParticle::G4CascadParticle" <<
G4endl;
60 theParticle(particle),
position(pos),
61 current_zone(izone), current_path(cpath), movingIn(true),
62 reflectionCounter(0), reflected(false), generation(gen), historyId(-1) {
63 if (verboseLevel > 3) {
64 G4cout <<
" >>> G4CascadParticle::G4CascadParticle "
74 verboseLevel = cpart.verboseLevel;
75 theParticle = cpart.theParticle;
77 current_zone = cpart.current_zone;
78 current_path = cpart.current_path;
79 movingIn = cpart.movingIn;
80 reflectionCounter = cpart.reflectionCounter;
81 reflected = cpart.reflected;
82 generation = cpart.generation;
83 historyId = cpart.historyId;
94 if (verboseLevel > 3)
G4cout <<
" >>> G4CascadParticle::fill" <<
G4endl;
96 theParticle = particle;
101 reflectionCounter = 0;
110 if (verboseLevel > 3) {
111 G4cout <<
" >>> G4CascadParticle::getPathToTheNextZone rz_in " << rz_in
112 <<
" rz_out " << rz_out <<
G4endl;
122 if (std::abs(pp) < 1e-9) {
123 if (verboseLevel > 3)
G4cout <<
" at rest; path length is zero" <<
G4endl;
125 if (current_zone == 0) movingIn =
false;
134 if (verboseLevel > 3) {
135 G4cout <<
" current_zone " << current_zone <<
" rr " << rr
136 <<
" rp " << rp <<
" pp " << pp <<
" ra " << ra <<
G4endl;
139 if (current_zone == 0 || rp > 0.0) {
140 d2 = rz_out * rz_out - ra;
145 d2 = rz_in * rz_in - ra;
150 d2 = rz_in * rz_in - ra;
155 d2 = rz_out * rz_out - ra;
161 if (verboseLevel > 3)
G4cout <<
" ds " << ds <<
" d2 " << d2 <<
G4endl;
163 if (d2 < 0.0 && d2 > -1e-6) d2 = 0.;
165 if (d2 > 0.0) path = ds * std::sqrt(d2) - rp / pp;
171 if (verboseLevel > 3) {
172 G4cout <<
" >>> G4CascadParticle::propagateAlongThePath" <<
G4endl;
187 os <<
" pos " <<
position <<
" zone " << current_zone
188 <<
" current_path " << current_path
189 <<
" reflectionCounter " << reflectionCounter <<
G4endl
std::ostream & operator<<(std::ostream &os, const G4CascadParticle &part)
G4GLOB_DLL std::ostream G4cout
double dot(const Hep3Vector &) const
void fill(const G4InuclElementaryParticle &particle, const G4ThreeVector &pos, G4int izone, G4double cpath, G4int gen)
void print(std::ostream &os) const
G4CascadParticle & operator=(const G4CascadParticle &cpart)
void propagateAlongThePath(G4double path)
G4LorentzVector getMomentum() const
G4double getPathToTheNextZone(G4double rz_in, G4double rz_out)
const G4ParticleDefinition * getDefinition() const
const G4String & GetParticleName() const