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 
50  void setES(const edm::EventSetup&) override;
51 
53 
54  void setBeamSpot(const reco::BeamSpot& beamSpot) override;
55 
56  FreeTrajectoryState initialFreeState() const override { return initialFTS; }
57 
59 
61 
63  return builder(initialFTS, point);
64  }
65 
70 
72 
74 
75  bool impactPointStateAvailable() const override { return (m_TSOS.load() == kSet ? true : false); }
76 
80  TrackRef persistentTrackRef() const { return tkr_; }
81 
82  TrackBaseRef trackBaseRef() const override { return TrackBaseRef(tkr_); }
83 
84  TrackCharge charge() const override { return Track::charge(); }
85 
86  const MagneticField* field() const override { return theField; }
87 
88  const Track& track() const override { return *this; }
89 
91 
92  double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
93  double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
94 
95  private:
97  bool hasTime;
100 
102 
103  // mutable member data, those should be treated very carefully to guarantee
104  // thread safeness of the code by using atomic thread-safe helpers, see below
108  // thread-safe helpers to guarantee proper update of mutable member data
109  mutable std::atomic<char> m_TSOS;
110  mutable std::atomic<char> m_TSCP;
111  mutable std::atomic<char> m_SCTBL;
112 
116 
117  // to be used to setup thread states of class mutables
119  };
120 
121 } // namespace reco
122 
123 #endif
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
reco::TrackTransientTrack::kSet
Definition: TrackTransientTrack.h:118
reco::TrackTransientTrack::timeExt_
double timeExt_
Definition: TrackTransientTrack.h:98
reco::TrackTransientTrack::builder
TSCPBuilderNoMaterial builder
Definition: TrackTransientTrack.h:113
reco::TrackTransientTrack::m_TSCP
std::atomic< char > m_TSCP
Definition: TrackTransientTrack.h:110
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:84
reco::TrackTransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const override
Definition: TrackTransientTrack.cc:197
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
reco::TrackTransientTrack::m_TSOS
std::atomic< char > m_TSOS
Definition: TrackTransientTrack.h:109
reco::TrackTransientTrack::timeExt
double timeExt() const override
Definition: TrackTransientTrack.h:92
reco::TrackTransientTrack::setES
void setES(const edm::EventSetup &) override
Definition: TrackTransientTrack.cc:184
reco::TrackTransientTrack::dtErrorExt_
double dtErrorExt_
Definition: TrackTransientTrack.h:98
reco::TrackTransientTrack::stateAtBeamLine
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override
Definition: TrackTransientTrack.cc:239
reco::TrackTransientTrack::hasTime
bool hasTime
Definition: TrackTransientTrack.h:97
reco::TrackTransientTrack::dtErrorExt
double dtErrorExt() const override
Definition: TrackTransientTrack.h:93
reco::TrackTransientTrack::field
const MagneticField * field() const override
Definition: TrackTransientTrack.h:86
reco::TrackTransientTrack::track
const Track & track() const override
Definition: TrackTransientTrack.h:88
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:115
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Ref< TrackCollection >
reco::TrackTransientTrack::initialFreeState
FreeTrajectoryState initialFreeState() const override
Definition: TrackTransientTrack.h:56
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
reco::TrackTransientTrack::trajectoryStateClosestToBeamLine
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
Definition: TrackTransientTrack.h:107
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:96
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:99
funct::true
true
Definition: Factorize.h:173
reco::TrackTransientTrack::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition: TrackTransientTrack.h:114
reco::TrackTransientTrack::setBeamSpot
void setBeamSpot(const reco::BeamSpot &beamSpot) override
Definition: TrackTransientTrack.cc:192
reco::TrackTransientTrack::initialTSOS
TrajectoryStateOnSurface initialTSOS
Definition: TrackTransientTrack.h:105
reco::TrackTransientTrack::TrackTransientTrack
TrackTransientTrack()
Definition: TrackTransientTrack.cc:23
reco::BasicTransientTrack
Definition: BasicTransientTrack.h:22
edm::EventSetup
Definition: EventSetup.h:57
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
TSCPBuilderNoMaterial.h
reco::TrackTransientTrack::m_SCTBL
std::atomic< char > m_SCTBL
Definition: TrackTransientTrack.h:111
BasicTransientTrack.h
reco::TrackTransientTrack::stateOnSurface
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
Definition: TrackTransientTrack.cc:234
TSCPBuilderNoMaterial
Definition: TSCPBuilderNoMaterial.h:17
reco::TrackTransientTrack::initialFTS
FreeTrajectoryState initialFTS
Definition: TrackTransientTrack.h:101
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
reco::TrackTransientTrack::setTrackingGeometry
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
Definition: TrackTransientTrack.cc:188
reco::TrackTransientTrack::trackBaseRef
TrackBaseRef trackBaseRef() const override
Definition: TrackTransientTrack.h:82
reco::TrackTransientTrack::impactPointStateAvailable
bool impactPointStateAvailable() const override
Definition: TrackTransientTrack.h:75
reco::TrackTransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const override
Definition: TrackTransientTrack.cc:212
edm::RefToBase< reco::Track >
reco::TrackTransientTrack::kUnset
Definition: TrackTransientTrack.h:118
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:226
reco::TrackTransientTrack::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
Definition: TrackTransientTrack.h:62
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
ntuplemaker.time
time
Definition: ntuplemaker.py:310
reco::TrackTransientTrack::kSetting
Definition: TrackTransientTrack.h:118
MagneticField
Definition: MagneticField.h:19
reco::TrackTransientTrack
Definition: TrackTransientTrack.h:18
reco::TrackTransientTrack::initialTSCP
TrajectoryStateClosestToPoint initialTSCP
Definition: TrackTransientTrack.h:106
reco::TrackTransientTrack::CacheStates
CacheStates
Definition: TrackTransientTrack.h:118
reco::TrackTransientTrack::persistentTrackRef
TrackRef persistentTrackRef() const
Definition: TrackTransientTrack.h:80
reco::TrackTransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const override
Definition: TrackTransientTrack.cc:230