89 if (pstv.
speed == 0) {
120 if (pstv.
speed == 0) {
136 void print(std::ostream& file,
int l)
const;
155 virtual void fly(std::vector<gparticle*>& secondaries) {
156 mfunname(
"virtual void gparticle::fly()");
163 virtual void fly(std::vector<gparticle*>& secondaries,
const bool one_step) {
164 mfunname(
"virtual void gparticle::fly()");
170 if (one_step && nstep >= 2)
break;
176 const vfloat frad_for_straight,
177 const vfloat fmax_straight_arange,
178 const vfloat fmax_circ_arange) {
179 m_max_range = fmax_range;
180 m_rad_for_straight = frad_for_straight;
181 m_max_straight_arange = fmax_straight_arange;
182 m_max_circ_arange = fmax_circ_arange;
195 virtual void print(std::ostream& file,
int l)
const;
208 virtual void step(std::vector<gparticle*>& secondaries);
232 virtual void physics(std::vector<gparticle*>& ) {}
270 vfloat m_max_range = 100. * CLHEP::cm;
272 vfloat m_rad_for_straight = 1000. * CLHEP::cm;
274 vfloat m_max_straight_arange = 0.1 * CLHEP::rad;
276 vfloat m_max_circ_arange = 0.2 * CLHEP::rad;
virtual void income(gparticle *)
virtual void print(std::ostream &file, int l) const
Print-out.
virtual ~gparticle()
Destructor.
virtual void physics_mrange(double &fmrange)
virtual void physics_after_new_speed(std::vector< gparticle * > &)
Apply any other processes (turn the trajectory, kill the particle, ...).
virtual void fly(std::vector< gparticle * > &secondaries, const bool one_step)
stvpoint m_nextpos
Next point.
double m_total_range_from_origin
Range from origin to current position.
virtual stvpoint calc_step_to_bord()
Determine next position.
stvpoint m_prevpos
Previous point.
static constexpr long m_max_qzero_step
Max. number of zero-steps allowed.
virtual void step(std::vector< gparticle * > &secondaries)
vfloat time() const
Get the current time of the particle.
gparticle()=default
Default constructor.
const vec & position() const
Get the current position of the particle.
stvpoint m_currpos
Current point.
virtual void change_vol()
Move from one volume to another.
stvpoint switch_new_vol()
Generate next position in new volume.
virtual void physics(std::vector< gparticle * > &)
Apply any other processes (turn the trajectory, kill the particle, ...).
virtual gparticle * copy() const
Clone the particle.
long m_nzero_step
Number of previous steps with zero range (including this step).
stvpoint m_origin
Original point.
bool m_alive
Status flag whether the particle is active.
const vec & direction() const
Get the current direction of the particle.
virtual void fly(std::vector< gparticle * > &secondaries)
Transport the particle.
void set_step_limits(const vfloat fmax_range, const vfloat frad_for_straight, const vfloat fmax_straight_arange, const vfloat fmax_circ_arange)
Set limits/parameters for trajectory steps.
virtual void curvature(bool &curved, vec &frelcen, vfloat &fmrange, vfloat prec)
Service class (array of manip_absvol).
void down_absref(absref *f)
void up_absref(absref *f)
absvol * G_lavol() const
Get last address of volume.
Abstract base classs for volume "manipulators".
Point in space, time and velocity.
void print(std::ostream &file, int l) const
stvpoint(const stvpoint &fp)=default
Copy constructor.
vec dirloc
Unit vector, in the local system (last system in the tree).
stvpoint(const point &fpt, const vec &fdir, vfloat fspeed, manip_absvol_treeid &ftid, vfloat fprange, vfloat ftime, int fsb, int fs_ent, manip_absvol *faeid)
Constructor.
stvpoint(const stvpoint &pstv, const trajestep &ts, int fsb, int fs_ent, manip_absvol *faeid)
vec dir
Unit vector, in the first system in the tree.
vfloat prange
Range from previous point.
vfloat speed
Longitudinal velocity.
stvpoint(const stvpoint &pstv, const trajestep &ts, vfloat mrange, int fsb, int fs_ent, manip_absvol *faeid)
point pt
Coordinates in the first system in the tree.
stvpoint()=default
Default constructor.
point ptloc
Coordinates in the local system (last system in the tree).
vfloat mrange
Maximal possible range.
void Gnextpoint(vfloat frange, point &fpos, vec &fdir) const
Move to the next point.