49 current_zone(-1), current_path(-1.), movingIn(false),
50 reflectionCounter(0), reflected(false), generation(-1), historyId(-1) {
51 if (verboseLevel > 3) {
52 G4cout <<
" >>> G4CascadParticle::G4CascadParticle" <<
G4endl;
61 theParticle(particle),
position(pos),
62 current_zone(izone), current_path(cpath), movingIn(true),
63 reflectionCounter(0), reflected(false), generation(gen), historyId(-1) {
64 if (verboseLevel > 3) {
65 G4cout <<
" >>> G4CascadParticle::G4CascadParticle "
75 verboseLevel = cpart.verboseLevel;
76 theParticle = cpart.theParticle;
78 current_zone = cpart.current_zone;
79 current_path = cpart.current_path;
80 movingIn = cpart.movingIn;
81 reflectionCounter = cpart.reflectionCounter;
82 reflected = cpart.reflected;
83 generation = cpart.generation;
84 historyId = cpart.historyId;
95 if (verboseLevel > 3)
G4cout <<
" >>> G4CascadParticle::fill" <<
G4endl;
97 theParticle = particle;
100 current_path = cpath;
102 reflectionCounter = 0;
111 if (verboseLevel > 3) {
112 G4cout <<
" >>> G4CascadParticle::getPathToTheNextZone rz_in " << rz_in
113 <<
" rz_out " << rz_out <<
G4endl;
123 if (std::abs(pp) < 1e-9) {
124 if (verboseLevel > 3)
G4cout <<
" at rest; path length is zero" <<
G4endl;
133 if (verboseLevel > 3) {
134 G4cout <<
" current_zone " << current_zone <<
" rr " << rr
135 <<
" rp " << rp <<
" pp " << pp <<
" ra " << ra <<
G4endl;
138 if (current_zone == 0 || rp > 0.0) {
139 d2 = rz_out * rz_out - ra;
144 d2 = rz_in * rz_in - ra;
149 d2 = rz_in * rz_in - ra;
154 d2 = rz_out * rz_out - ra;
160 if (verboseLevel > 3)
G4cout <<
" ds " << ds <<
" d2 " << d2 <<
G4endl;
162 if (d2 < 0.0 && d2 > -1e-6) d2 = 0.;
164 if (d2 > 0.0) path = ds * std::sqrt(d2) - rp /
pp;
170 if (verboseLevel > 3) {
171 G4cout <<
" >>> G4CascadParticle::propagateAlongThePath" <<
G4endl;
186 os <<
" pos " <<
position <<
" zone " << current_zone
187 <<
" current_path " << current_path
188 <<
" reflectionCounter " << reflectionCounter <<
G4endl
void print(std::ostream &os) const
G4LorentzVector getMomentum() const
double dot(const Hep3Vector &) const
void fill(const G4InuclElementaryParticle &particle, const G4ThreeVector &pos, G4int izone, G4double cpath, G4int gen)
void propagateAlongThePath(G4double path)
G4double getPathToTheNextZone(G4double rz_in, G4double rz_out)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
G4CascadParticle & operator=(const G4CascadParticle &cpart)
G4ParticleDefinition * getDefinition() const