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 
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 
51 
52  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
53 
54  FreeTrajectoryState initialFreeState() const override { return initialFTS; }
55 
57 
59 
61  return builder(initialFTS, point);
62  }
63 
68 
70 
72 
73  bool impactPointStateAvailable() const override { return (m_TSOS.load() == kSet ? true : false); }
74 
78  TrackRef persistentTrackRef() const { return tkr_; }
79 
80  TrackBaseRef trackBaseRef() const override { return TrackBaseRef(tkr_); }
81 
82  TrackCharge charge() const override { return Track::charge(); }
83 
84  const MagneticField* field() const override { return theField; }
85 
86  const Track& track() const override { return *this; }
87 
89 
90  double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
91  double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
92 
93  private:
95  bool hasTime;
98 
100 
101  // mutable member data, those should be treated very carefully to guarantee
102  // thread safeness of the code by using atomic thread-safe helpers, see below
106  // thread-safe helpers to guarantee proper update of mutable member data
107  mutable std::atomic<char> m_TSOS;
108  mutable std::atomic<char> m_TSCP;
109  mutable std::atomic<char> m_SCTBL;
110 
114 
115  // to be used to setup thread states of class mutables
117  };
118 
119 } // namespace reco
120 
121 #endif
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
reco::TrackTransientTrack::kSet
Definition: TrackTransientTrack.h:116
reco::TrackTransientTrack::timeExt_
double timeExt_
Definition: TrackTransientTrack.h:96
reco::TrackTransientTrack::builder
TSCPBuilderNoMaterial builder
Definition: TrackTransientTrack.h:111
reco::TrackTransientTrack::m_TSCP
std::atomic< char > m_TSCP
Definition: TrackTransientTrack.h:108
FreeTrajectoryState.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
reco::TrackTransientTrack::charge
TrackCharge charge() const override
Definition: TrackTransientTrack.h:82
reco::TrackTransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const override
Definition: TrackTransientTrack.cc:193
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
reco::TrackTransientTrack::m_TSOS
std::atomic< char > m_TSOS
Definition: TrackTransientTrack.h:107
reco::TrackTransientTrack::timeExt
double timeExt() const override
Definition: TrackTransientTrack.h:90
reco::TrackTransientTrack::dtErrorExt_
double dtErrorExt_
Definition: TrackTransientTrack.h:96
reco::TrackTransientTrack::stateAtBeamLine
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override
Definition: TrackTransientTrack.cc:235
reco::TrackTransientTrack::hasTime
bool hasTime
Definition: TrackTransientTrack.h:95
reco::TrackTransientTrack::dtErrorExt
double dtErrorExt() const override
Definition: TrackTransientTrack.h:91
protons_cff.time
time
Definition: protons_cff.py:35
reco::TrackTransientTrack::field
const MagneticField * field() const override
Definition: TrackTransientTrack.h:84
reco::TrackTransientTrack::track
const Track & track() const override
Definition: TrackTransientTrack.h:86
reco::TrackBaseRef
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:35
reco::TrackTransientTrack::theBeamSpot
reco::BeamSpot theBeamSpot
Definition: TrackTransientTrack.h:113
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
edm::Ref< TrackCollection >
reco::TrackTransientTrack::initialFreeState
FreeTrajectoryState initialFreeState() const override
Definition: TrackTransientTrack.h:54
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
reco::TrackTransientTrack::trajectoryStateClosestToBeamLine
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
Definition: TrackTransientTrack.h:105
Track.h
TrackFwd.h
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
edm::ESHandle< GlobalTrackingGeometry >
reco::TrackTransientTrack::tkr_
TrackRef tkr_
Definition: TrackTransientTrack.h:94
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
reco::TrackTransientTrack::operator=
TrackTransientTrack & operator=(const TrackTransientTrack &tt)
reco::TrackTransientTrack::theField
const MagneticField * theField
Definition: TrackTransientTrack.h:97
funct::true
true
Definition: Factorize.h:173
reco::TrackTransientTrack::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition: TrackTransientTrack.h:112
reco::TrackTransientTrack::setBeamSpot
void setBeamSpot(const reco::BeamSpot &beamSpot) override
Definition: TrackTransientTrack.cc:188
reco::TrackTransientTrack::initialTSOS
TrajectoryStateOnSurface initialTSOS
Definition: TrackTransientTrack.h:103
reco::TrackTransientTrack::TrackTransientTrack
TrackTransientTrack()
Definition: TrackTransientTrack.cc:23
reco::BasicTransientTrack
Definition: BasicTransientTrack.h:21
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
TSCPBuilderNoMaterial.h
reco::TrackTransientTrack::m_SCTBL
std::atomic< char > m_SCTBL
Definition: TrackTransientTrack.h:109
BasicTransientTrack.h
reco::TrackTransientTrack::stateOnSurface
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
Definition: TrackTransientTrack.cc:230
TSCPBuilderNoMaterial
Definition: TSCPBuilderNoMaterial.h:17
reco::TrackTransientTrack::initialFTS
FreeTrajectoryState initialFTS
Definition: TrackTransientTrack.h:99
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
reco::TrackTransientTrack::setTrackingGeometry
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
Definition: TrackTransientTrack.cc:184
reco::TrackTransientTrack::trackBaseRef
TrackBaseRef trackBaseRef() const override
Definition: TrackTransientTrack.h:80
reco::TrackTransientTrack::impactPointStateAvailable
bool impactPointStateAvailable() const override
Definition: TrackTransientTrack.h:73
reco::TrackTransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const override
Definition: TrackTransientTrack.cc:208
edm::RefToBase< reco::Track >
reco::TrackTransientTrack::kUnset
Definition: TrackTransientTrack.h:116
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
reco::TrackTransientTrack::outermostMeasurementState
TrajectoryStateOnSurface outermostMeasurementState() const override
Definition: TrackTransientTrack.cc:222
reco::TrackTransientTrack::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
Definition: TrackTransientTrack.h:60
point
*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
reco::TrackTransientTrack::kSetting
Definition: TrackTransientTrack.h:116
MagneticField
Definition: MagneticField.h:19
reco::TrackTransientTrack
Definition: TrackTransientTrack.h:18
reco::TrackTransientTrack::initialTSCP
TrajectoryStateClosestToPoint initialTSCP
Definition: TrackTransientTrack.h:104
reco::TrackTransientTrack::CacheStates
CacheStates
Definition: TrackTransientTrack.h:116
reco::TrackTransientTrack::persistentTrackRef
TrackRef persistentTrackRef() const
Definition: TrackTransientTrack.h:78
reco::TrackTransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const override
Definition: TrackTransientTrack.cc:226