CMS 3D CMS Logo

CandidatePtrTransientTrack.h
Go to the documentation of this file.
1 #ifndef TrackingTools_TransientTrack_CandTransientTrack_h
2 #define TrackingTools_TransientTrack_CandTransientTrack_h
3 
4 #include <atomic>
5 
15 
17 namespace reco {
18 
20  public:
21 
22  // constructor from persistent track
24 
26  CandidatePtrTransientTrack( const CandidatePtr & tk, const double time, const double dtime, const MagneticField* field);
27 
28  CandidatePtrTransientTrack( const CandidatePtr & tk, const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
29  CandidatePtrTransientTrack( const CandidatePtr & tk, const double time, const double dtime, const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
30 
32 
34 
35  void setES(const edm::EventSetup& ) override;
36 
38 
39  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
40 
41  FreeTrajectoryState initialFreeState() const override {return initialFTS;}
42 
44 
46 
49  {return builder(initialFTS, point);}
50 
55 
57 
59 
60  bool impactPointStateAvailable() const override {return (m_TSOS.load()==kSet ? true : false); }
61 
65  TrackRef persistentTrackRef() const { return TrackRef(); }
66 
67  TrackBaseRef trackBaseRef() const override {return TrackBaseRef();}
68 
69  TrackCharge charge() const override {return Track::charge();}
70 
71  CandidatePtr candidate() const override {return ptr_; }
72 
73  const MagneticField* field() const override {return theField;}
74 
75  const Track & track() const override {return *this;}
76 
78 
79  double timeExt() const override { return ( hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN() ); }
80  double dtErrorExt() const override { return ( hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN() ); }
81 
82  private:
83 
85  bool hasTime;
88 
90 
91  // mutable member data, those should be treated very carefully to guarantee
92  // thread safeness of the code by using atomic thread-safe helpers, see below
96  // thread-safe helpers to guarantee proper update of mutable member data
97  mutable std::atomic<char> m_TSOS;
98  mutable std::atomic<char> m_TSCP;
99  mutable std::atomic<char> m_SCTBL;
100 
104 
105  // to be used to setup thread states of class mutables
107 
108  };
109 
110 }
111 
112 #endif
TrajectoryStateClosestToPoint initialTSCP
const MagneticField * field() const override
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override
CandidatePtrTransientTrack & operator=(const CandidatePtrTransientTrack &tt)
TrajectoryStateOnSurface impactPointState() const override
void setBeamSpot(const reco::BeamSpot &beamSpot) override
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
TrackBaseRef trackBaseRef() const override
int TrackCharge
Definition: TrackCharge.h:4
void setES(const edm::EventSetup &) override
const Track & track() const override
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:36
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
TrajectoryStateClosestToPoint impactPointTSCP() const override
CandidatePtr candidate() const override
FreeTrajectoryState initialFreeState() const override
TrajectoryStateOnSurface innermostMeasurementState() const override
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
TrajectoryStateOnSurface outermostMeasurementState() const override
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:21
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
fixed size matrix
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
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry