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
reco::CandidatePtrTransientTrack::m_TSCP
std::atomic< char > m_TSCP
Definition: CandidatePtrTransientTrack.h:105
reco::CandidatePtrTransientTrack::hasTime
bool hasTime
Definition: CandidatePtrTransientTrack.h:92
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
reco::CandidatePtrTransientTrack::initialTSOS
TrajectoryStateOnSurface initialTSOS
Definition: CandidatePtrTransientTrack.h:100
FreeTrajectoryState.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
reco::CandidatePtrTransientTrack::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const override
Definition: CandidatePtrTransientTrack.h:55
reco::CandidatePtrTransientTrack::CandidatePtrTransientTrack
CandidatePtrTransientTrack()
Definition: CandidatePtrTransientTrack.cc:23
reco::CandidatePtrTransientTrack::theField
const MagneticField * theField
Definition: CandidatePtrTransientTrack.h:94
protons_cff.time
time
Definition: protons_cff.py:39
reco::CandidatePtrTransientTrack
Definition: CandidatePtrTransientTrack.h:19
reco::CandidatePtrTransientTrack::trajectoryStateClosestToBeamLine
TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine
Definition: CandidatePtrTransientTrack.h:102
reco::TrackBaseRef
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:35
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::CandidatePtrTransientTrack::initialTSCP
TrajectoryStateClosestToPoint initialTSCP
Definition: CandidatePtrTransientTrack.h:101
reco::CandidatePtrTransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const override
Definition: CandidatePtrTransientTrack.cc:132
edm::Ref< TrackCollection >
reco::CandidatePtrTransientTrack::initialFTS
FreeTrajectoryState initialFTS
Definition: CandidatePtrTransientTrack.h:96
reco::CandidatePtrTransientTrack::builder
TSCPBuilderNoMaterial builder
Definition: CandidatePtrTransientTrack.h:108
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
Track.h
reco::CandidatePtrTransientTrack::m_SCTBL
std::atomic< char > m_SCTBL
Definition: CandidatePtrTransientTrack.h:106
TrackFwd.h
reco::CandidatePtrTransientTrack::field
const MagneticField * field() const override
Definition: CandidatePtrTransientTrack.h:81
reco::CandidatePtrTransientTrack::track
const Track & track() const override
Definition: CandidatePtrTransientTrack.h:83
reco::BeamSpot
Definition: BeamSpot.h:21
reco::CandidatePtrTransientTrack::dtErrorExt_
double dtErrorExt_
Definition: CandidatePtrTransientTrack.h:93
reco::Track
Definition: Track.h:27
reco::CandidatePtrTransientTrack::outermostMeasurementState
TrajectoryStateOnSurface outermostMeasurementState() const override
Definition: CandidatePtrTransientTrack.cc:161
reco::CandidatePtrTransientTrack::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition: CandidatePtrTransientTrack.h:109
edm::ESHandle< GlobalTrackingGeometry >
reco::CandidatePtrTransientTrack::timeExt_
double timeExt_
Definition: CandidatePtrTransientTrack.h:93
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
reco::CandidatePtrTransientTrack::initialFreeState
FreeTrajectoryState initialFreeState() const override
Definition: CandidatePtrTransientTrack.h:49
reco::CandidatePtrTransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const override
Definition: CandidatePtrTransientTrack.cc:165
reco::CandidatePtrTransientTrack::kUnset
Definition: CandidatePtrTransientTrack.h:113
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
reco::CandidatePtrTransientTrack::trackBaseRef
TrackBaseRef trackBaseRef() const override
Definition: CandidatePtrTransientTrack.h:75
funct::true
true
Definition: Factorize.h:173
reco::CandidatePtrTransientTrack::ptr_
CandidatePtr ptr_
Definition: CandidatePtrTransientTrack.h:91
reco::CandidatePtrTransientTrack::impactPointStateAvailable
bool impactPointStateAvailable() const override
Definition: CandidatePtrTransientTrack.h:68
reco::CandidatePtrTransientTrack::stateOnSurface
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const override
Definition: CandidatePtrTransientTrack.cc:169
reco::CandidatePtrTransientTrack::charge
TrackCharge charge() const override
Definition: CandidatePtrTransientTrack.h:77
reco::CandidatePtrTransientTrack::CacheStates
CacheStates
Definition: CandidatePtrTransientTrack.h:113
reco::BasicTransientTrack
Definition: BasicTransientTrack.h:22
reco::CandidatePtrTransientTrack::setES
void setES(const edm::EventSetup &) override
Definition: CandidatePtrTransientTrack.cc:119
edm::EventSetup
Definition: EventSetup.h:58
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
TSCPBuilderNoMaterial.h
reco::CandidatePtrTransientTrack::persistentTrackRef
TrackRef persistentTrackRef() const
Definition: CandidatePtrTransientTrack.h:73
reco::CandidatePtrTransientTrack::stateAtBeamLine
TrajectoryStateClosestToBeamLine stateAtBeamLine() const override
Definition: CandidatePtrTransientTrack.cc:174
edm::Ptr< Candidate >
BasicTransientTrack.h
reco::CandidatePtrTransientTrack::kSetting
Definition: CandidatePtrTransientTrack.h:113
TSCPBuilderNoMaterial
Definition: TSCPBuilderNoMaterial.h:17
reco::CandidatePtrTransientTrack::kSet
Definition: CandidatePtrTransientTrack.h:113
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
reco::CandidatePtrTransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const override
Definition: CandidatePtrTransientTrack.cc:147
reco::CandidatePtrTransientTrack::theBeamSpot
reco::BeamSpot theBeamSpot
Definition: CandidatePtrTransientTrack.h:110
edm::RefToBase< reco::Track >
reco::CandidatePtrTransientTrack::m_TSOS
std::atomic< char > m_TSOS
Definition: CandidatePtrTransientTrack.h:104
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
reco::CandidatePtrTransientTrack::dtErrorExt
double dtErrorExt() const override
Definition: CandidatePtrTransientTrack.h:88
reco::CandidatePtrTransientTrack::operator=
CandidatePtrTransientTrack & operator=(const CandidatePtrTransientTrack &tt)
Candidate.h
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::CandidatePtrTransientTrack::setBeamSpot
void setBeamSpot(const reco::BeamSpot &beamSpot) override
Definition: CandidatePtrTransientTrack.cc:127
MagneticField
Definition: MagneticField.h:19
reco::CandidatePtrTransientTrack::timeExt
double timeExt() const override
Definition: CandidatePtrTransientTrack.h:87
reco::CandidatePtrTransientTrack::setTrackingGeometry
void setTrackingGeometry(const edm::ESHandle< GlobalTrackingGeometry > &) override
Definition: CandidatePtrTransientTrack.cc:123
reco::CandidatePtrTransientTrack::candidate
CandidatePtr candidate() const override
Definition: CandidatePtrTransientTrack.h:79