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  // constructor from persistent track
23 
26  const double time,
27  const double dtime,
28  const MagneticField* field);
29 
31  const MagneticField* field,
32  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
34  const double time,
35  const double dtime,
36  const MagneticField* field,
37  const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
38 
40 
42 
43  void setES(const edm::EventSetup&) override;
44 
46 
47  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
48 
49  FreeTrajectoryState initialFreeState() const override { return initialFTS; }
50 
52 
54 
56  return builder(initialFTS, point);
57  }
58 
63 
65 
67 
68  bool impactPointStateAvailable() const override { return (m_TSOS.load() == kSet ? true : false); }
69 
73  TrackRef persistentTrackRef() const { return TrackRef(); }
74 
75  TrackBaseRef trackBaseRef() const override { return TrackBaseRef(); }
76 
77  TrackCharge charge() const override { return Track::charge(); }
78 
79  CandidatePtr candidate() const override { return ptr_; }
80 
81  const MagneticField* field() const override { return theField; }
82 
83  const Track& track() const override { return *this; }
84 
86 
87  double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
88  double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
89 
90  private:
92  bool hasTime;
95 
97 
98  // mutable member data, those should be treated very carefully to guarantee
99  // thread safeness of the code by using atomic thread-safe helpers, see below
103  // thread-safe helpers to guarantee proper update of mutable member data
104  mutable std::atomic<char> m_TSOS;
105  mutable std::atomic<char> m_TSCP;
106  mutable std::atomic<char> m_SCTBL;
107 
111 
112  // to be used to setup thread states of class mutables
114  };
115 
116 } // namespace reco
117 
118 #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:35
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:20
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
fixed size matrix
int charge() const
track electric charge
Definition: TrackBase.h:575
*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