CMS 3D CMS Logo

TrackTransientTrack.h
Go to the documentation of this file.
1 #ifndef TrackingTools_TransientTrack_TrackingTransientTrack_h
2 #define TrackingTools_TransientTrack_TrackingTransientTrack_h
3 
4 #include <atomic>
5 
15 
16 namespace reco {
17 
19  public:
20 
21  // constructor from persistent track
23  TrackTransientTrack( const Track & tk , const MagneticField* field);
24  TrackTransientTrack( const Track & tk , const double time, const double dtime, const MagneticField* field);
25 
26  TrackTransientTrack( const TrackRef & tk , const MagneticField* field);
27  TrackTransientTrack( const TrackRef & tk , const double time, const double dtime, const MagneticField* field);
28 
29  TrackTransientTrack( const TrackRef & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
30  TrackTransientTrack( const TrackRef & tk , const double time, const double dtime, const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
31 
32  TrackTransientTrack( const Track & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
33  TrackTransientTrack( const Track & tk , const double time, const double dtime, const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
34 
36 
38 
39  void setES(const edm::EventSetup& );
40 
42 
43  void setBeamSpot(const reco::BeamSpot& beamSpot);
44 
46 
48 
50 
53  {return builder(initialFTS, point);}
54 
59 
61 
63 
64  bool impactPointStateAvailable() const {return (m_TSOS.load()==kSet ? true : false); }
65 
69  TrackRef persistentTrackRef() const { return tkr_; }
70 
72 
73  TrackCharge charge() const {return Track::charge();}
74 
75  const MagneticField* field() const {return theField;}
76 
77  const Track & track() const {return *this;}
78 
80 
81  double timeExt() const { return ( hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN() ); }
82  double dtErrorExt() const { return ( hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN() ); }
83 
84  private:
85 
87  bool hasTime;
90 
92 
93  // mutable member data, those should be treated very carefully to guarantee
94  // thread safeness of the code by using atomic thread-safe helpers, see below
98  // thread-safe helpers to guarantee proper update of mutable member data
99  mutable std::atomic<char> m_TSOS;
100  mutable std::atomic<char> m_TSCP;
101  mutable std::atomic<char> m_SCTBL;
102 
106 
107  // to be used to setup thread states of class mutables
109 
110  };
111 
112 }
113 
114 #endif
const MagneticField * field() const
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &)
TrajectoryStateOnSurface impactPointState() const
TrajectoryStateClosestToPoint impactPointTSCP() const
TrajectoryStateOnSurface initialTSOS
bool impactPointStateAvailable() const
TrajectoryStateOnSurface outermostMeasurementState() const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
void setES(const edm::EventSetup &)
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TrajectoryStateOnSurface innermostMeasurementState() const
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
const Track & track() const
std::atomic< char > m_TSOS
TrackBaseRef trackBaseRef() const
TrackRef persistentTrackRef() const
int TrackCharge
Definition: TrackCharge.h:4
TrackCharge charge() const
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:32
FreeTrajectoryState initialFreeState() const
TSCPBuilderNoMaterial builder
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
TrajectoryStateClosestToBeamLine stateAtBeamLine() const
const MagneticField * theField
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
TrackTransientTrack & operator=(const TrackTransientTrack &tt)
fixed size matrix
void setBeamSpot(const reco::BeamSpot &beamSpot)
TrajectoryStateClosestToPoint initialTSCP
int charge() const
track electric charge
Definition: TrackBase.h:567
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
FreeTrajectoryState initialFTS