CMS 3D CMS Logo

Trajectory.h
Go to the documentation of this file.
1 #ifndef FASTSIM_TRAJECTORY_H
2 #define FASTSIM_TRAJECTORY_H
3 
4 #include <memory>
5 
7 
8 
10 // Author: L. Vanelderen, S. Kurz
11 // Date: 29 May 2017
13 
14 
15 namespace fastsim
16 {
17  class SimplifiedGeometry;
18  class BarrelSimplifiedGeometry;
19  class ForwardSimplifiedGeometry;
20  class Particle;
21 
23 
29  class Trajectory
30  {
31  public:
33 
39  static std::unique_ptr<Trajectory> createTrajectory(const fastsim::Particle & particle, const double magneticFieldZ);
40 
42 
46  virtual bool crosses(const BarrelSimplifiedGeometry & layer) const = 0;
47 
50 
53 
55 
61  double nextCrossingTimeC(const SimplifiedGeometry & layer, bool onLayer = false) const;
62 
64 
70  double nextCrossingTimeC(const ForwardSimplifiedGeometry & layer, bool onLayer = false) const;
71 
73 
79  virtual double nextCrossingTimeC(const BarrelSimplifiedGeometry & layer, bool onLayer = false) const = 0;
80 
82 
85  virtual void move(double deltaTimeC) = 0;
86  virtual ~Trajectory();
87 
88  protected:
90 
93  Trajectory(const fastsim::Particle & particle);
94 
97  };
98 }
99 
100 #endif
Implementation of a forward detector layer (disk).
Implementation of a generic detector layer (base class for forward/barrel layers).
double nextCrossingTimeC(const SimplifiedGeometry &layer, bool onLayer=false) const
Return delta time (t*c) of the next intersection of trajectory and generic layer. ...
Definition: Trajectory.cc:35
virtual void move(double deltaTimeC)=0
Move the particle along the trajectory for a given time.
Implementation of a barrel detector layer (cylindrical).
const math::XYZTLorentzVector & getPosition()
Simple getter: return position of the particle that was used to create trajectory.
Definition: Trajectory.h:49
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const math::XYZTLorentzVector & getMomentum()
Simple getter: return momentum of the particle that was used to create trajectory.
Definition: Trajectory.h:52
math::XYZTLorentzVector position_
position of the particle that was used to create trajectory
Definition: Trajectory.h:95
Trajectory(const fastsim::Particle &particle)
Constructor of base class.
Definition: Trajectory.cc:12
virtual ~Trajectory()
Definition: Trajectory.cc:10
virtual bool crosses(const BarrelSimplifiedGeometry &layer) const =0
Check if trajectory crosses a barrel layer.
Definition the generic trajectory of a particle (base class for helix/straight trajectories).
Definition: Trajectory.h:29
static std::unique_ptr< Trajectory > createTrajectory(const fastsim::Particle &particle, const double magneticFieldZ)
Calls constructor of derived classes.
Definition: Trajectory.cc:18
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
Definition: Particle.h:19
math::XYZTLorentzVector momentum_
momentum of the particle that was used to create trajectory
Definition: Trajectory.h:96