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& );
36 
38 
39  void setBeamSpot(const reco::BeamSpot& beamSpot);
40 
42 
44 
46 
49  {return builder(initialFTS, point);}
50 
55 
57 
59 
60  bool impactPointStateAvailable() const {return (m_TSOS.load()==kSet ? true : false); }
61 
65  TrackRef persistentTrackRef() const { return TrackRef(); }
66 
68 
69  TrackCharge charge() const {return Track::charge();}
70 
71  CandidatePtr candidate() const {return ptr_; }
72 
73  const MagneticField* field() const {return theField;}
74 
75  const Track & track() const {return *this;}
76 
78 
79  double timeExt() const { return ( hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN() ); }
80  double dtErrorExt() const { 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
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &)
TrajectoryStateOnSurface impactPointState() const
CandidatePtrTransientTrack & operator=(const CandidatePtrTransientTrack &tt)
TrajectoryStateOnSurface outermostMeasurementState() const
FreeTrajectoryState initialFreeState() const
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
int TrackCharge
Definition: TrackCharge.h:4
TrajectoryStateClosestToBeamLine stateAtBeamLine() const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:32
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
void setBeamSpot(const reco::BeamSpot &beamSpot)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
fixed size matrix
TrajectoryStateOnSurface innermostMeasurementState() const
int charge() const
track electric charge
Definition: TrackBase.h:562
const MagneticField * field() const
*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
TrajectoryStateClosestToPoint impactPointTSCP() const