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& ) override;
40 
42 
43  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
44 
45  FreeTrajectoryState initialFreeState() const override {return initialFTS;}
46 
48 
50 
53  {return builder(initialFTS, point);}
54 
59 
61 
63 
64  bool impactPointStateAvailable() const override {return (m_TSOS.load()==kSet ? true : false); }
65 
69  TrackRef persistentTrackRef() const { return tkr_; }
70 
71  TrackBaseRef trackBaseRef() const override {return TrackBaseRef(tkr_);}
72 
73  TrackCharge charge() const override {return Track::charge();}
74 
75  const MagneticField* field() const override {return theField;}
76 
77  const Track & track() const override {return *this;}
78 
80 
81  double timeExt() const override { return ( hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN() ); }
82  double dtErrorExt() const override { 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 Track & track() const override
TrajectoryStateOnSurface initialTSOS
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
TrackCharge charge() const override
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
const MagneticField * field() const override
double dtErrorExt() const override
bool impactPointStateAvailable() const override
FreeTrajectoryState initialFreeState() const override
void setES(const edm::EventSetup &) override
std::atomic< char > m_TSOS
TrackRef persistentTrackRef() const
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:36
TrackBaseRef trackBaseRef() const override
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
TSCPBuilderNoMaterial builder
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
double timeExt() const override
const MagneticField * theField
TrajectoryStateOnSurface impactPointState() const override
TrajectoryStateOnSurface innermostMeasurementState() const override
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
TrajectoryStateClosestToPoint initialTSCP
int charge() const
track electric charge
Definition: TrackBase.h:600
TrajectoryStateOnSurface outermostMeasurementState() const override
TrajectoryStateClosestToPoint impactPointTSCP() const override
*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
void setBeamSpot(const reco::BeamSpot &beamSpot) override
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override