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  // constructor from persistent track
22  TrackTransientTrack(const Track& tk, const MagneticField* field);
23  TrackTransientTrack(const Track& tk, const double time, const double dtime, const MagneticField* field);
24 
25  TrackTransientTrack(const TrackRef& tk, const MagneticField* field);
26  TrackTransientTrack(const TrackRef& tk, const double time, const double dtime, const MagneticField* field);
27 
28  TrackTransientTrack(const TrackRef& tk,
29  const MagneticField* field,
30  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
31  TrackTransientTrack(const TrackRef& tk,
32  const double time,
33  const double dtime,
34  const MagneticField* field,
35  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
36 
37  TrackTransientTrack(const Track& tk,
38  const MagneticField* field,
39  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
40  TrackTransientTrack(const Track& tk,
41  const double time,
42  const double dtime,
43  const MagneticField* field,
44  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
45 
47 
49 
50  void setES(const edm::EventSetup&) override;
51 
53 
54  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
55 
56  FreeTrajectoryState initialFreeState() const override { return initialFTS; }
57 
59 
61 
63  return builder(initialFTS, point);
64  }
65 
70 
72 
74 
75  bool impactPointStateAvailable() const override { return (m_TSOS.load() == kSet ? true : false); }
76 
80  TrackRef persistentTrackRef() const { return tkr_; }
81 
82  TrackBaseRef trackBaseRef() const override { return TrackBaseRef(tkr_); }
83 
84  TrackCharge charge() const override { return Track::charge(); }
85 
86  const MagneticField* field() const override { return theField; }
87 
88  const Track& track() const override { return *this; }
89 
91 
92  double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
93  double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
94 
95  private:
97  bool hasTime;
100 
102 
103  // mutable member data, those should be treated very carefully to guarantee
104  // thread safeness of the code by using atomic thread-safe helpers, see below
108  // thread-safe helpers to guarantee proper update of mutable member data
109  mutable std::atomic<char> m_TSOS;
110  mutable std::atomic<char> m_TSCP;
111  mutable std::atomic<char> m_SCTBL;
112 
116 
117  // to be used to setup thread states of class mutables
119  };
120 
121 } // namespace reco
122 
123 #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
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:35
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:18
TrackTransientTrack & operator=(const TrackTransientTrack &tt)
fixed size matrix
TrajectoryStateClosestToPoint initialTSCP
int charge() const
track electric charge
Definition: TrackBase.h:575
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