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 
44 
45  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
46 
47  FreeTrajectoryState initialFreeState() const override { return initialFTS; }
48 
50 
52 
54  return builder(initialFTS, point);
55  }
56 
61 
63 
65 
66  bool impactPointStateAvailable() const override { return (m_TSOS.load() == kSet ? true : false); }
67 
71  TrackRef persistentTrackRef() const { return TrackRef(); }
72 
73  TrackBaseRef trackBaseRef() const override { return TrackBaseRef(); }
74 
75  TrackCharge charge() const override { return Track::charge(); }
76 
77  CandidatePtr candidate() const override { return ptr_; }
78 
79  const MagneticField* field() const override { return theField; }
80 
81  const Track& track() const override { return *this; }
82 
84 
85  double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
86  double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
87 
88  private:
90  bool hasTime;
93 
95 
96  // mutable member data, those should be treated very carefully to guarantee
97  // thread safeness of the code by using atomic thread-safe helpers, see below
101  // thread-safe helpers to guarantee proper update of mutable member data
102  mutable std::atomic<char> m_TSOS;
103  mutable std::atomic<char> m_TSCP;
104  mutable std::atomic<char> m_SCTBL;
105 
109 
110  // to be used to setup thread states of class mutables
112  };
113 
114 } // namespace reco
115 
116 #endif
TrajectoryStateClosestToPoint initialTSCP
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override
CandidatePtrTransientTrack & operator=(const CandidatePtrTransientTrack &tt)
const Track & track() const override
CandidatePtr candidate() const override
void setBeamSpot(const reco::BeamSpot &beamSpot) override
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
int TrackCharge
Definition: TrackCharge.h:4
int charge() const
track electric charge
Definition: TrackBase.h:596
Definition: TTTypes.h:54
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:35
TrajectoryStateOnSurface impactPointState() const override
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
TrajectoryStateClosestToPoint impactPointTSCP() const override
const MagneticField * field() const override
TrajectoryStateOnSurface outermostMeasurementState() const override
TrackBaseRef trackBaseRef() const override
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
double dtime()
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
fixed size matrix
FreeTrajectoryState initialFreeState() const override
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
TrajectoryStateOnSurface innermostMeasurementState() 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
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry