File indexing completed on 2024-04-06 12:31:41
0001 #ifndef TrackReco_GsfTransientTrack_h
0002 #define TrackReco_GsfTransientTrack_h
0003
0004
0005
0006
0007
0008 #include "TrackingTools/TransientTrack/interface/BasicTransientTrack.h"
0009 #include "DataFormats/TrackReco/interface/Track.h"
0010 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0011 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
0012 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
0013 #include "TrackingTools/PatternTools/interface/TSCPBuilderNoMaterial.h"
0014 #include "TrackingTools/PatternTools/interface/TransverseImpactPointExtrapolator.h"
0015
0016 namespace reco {
0017
0018 class GsfTransientTrack : public GsfTrack, public BasicTransientTrack {
0019 public:
0020
0021 GsfTransientTrack();
0022 GsfTransientTrack(const GsfTrack& tk, const MagneticField* field);
0023 GsfTransientTrack(const GsfTrack& tk, const double time, const double dtime, const MagneticField* field);
0024
0025 GsfTransientTrack(const GsfTrackRef& tk, const MagneticField* field);
0026 GsfTransientTrack(const GsfTrackRef& tk, const double time, const double dtime, const MagneticField* field);
0027
0028 GsfTransientTrack(const GsfTrackRef& tk,
0029 const MagneticField* field,
0030 const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0031 GsfTransientTrack(const GsfTrackRef& tk,
0032 const double time,
0033 const double dtime,
0034 const MagneticField* field,
0035 const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0036
0037 GsfTransientTrack(const GsfTrack& tk,
0038 const MagneticField* field,
0039 const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0040 GsfTransientTrack(const GsfTrack& tk,
0041 const double time,
0042 const double dtime,
0043 const MagneticField* field,
0044 const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0045
0046 GsfTransientTrack(const GsfTransientTrack& tt);
0047
0048 GsfTransientTrack& operator=(const GsfTransientTrack& tt);
0049
0050 void setTrackingGeometry(const edm::ESHandle<GlobalTrackingGeometry>&) override;
0051
0052 void setBeamSpot(const reco::BeamSpot& beamSpot) override;
0053
0054 FreeTrajectoryState initialFreeState() const override { return initialFTS; }
0055
0056 TrajectoryStateOnSurface outermostMeasurementState() const override;
0057
0058 TrajectoryStateOnSurface innermostMeasurementState() const override;
0059
0060
0061
0062
0063
0064
0065 TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint& point) const override;
0066
0067
0068
0069
0070
0071 TrajectoryStateOnSurface stateOnSurface(const GlobalPoint& point) const override;
0072
0073
0074
0075
0076
0077 TrajectoryStateClosestToPoint impactPointTSCP() const override;
0078
0079
0080
0081
0082
0083 TrajectoryStateOnSurface impactPointState() const override;
0084
0085 bool impactPointStateAvailable() const override { return initialTSOSAvailable; }
0086
0087
0088
0089
0090 GsfTrackRef persistentTrackRef() const { return tkr_; }
0091
0092 TrackBaseRef trackBaseRef() const override { return TrackBaseRef(tkr_); }
0093
0094 TrackCharge charge() const override { return GsfTrack::charge(); }
0095
0096 const MagneticField* field() const override { return theField; }
0097
0098 const Track& track() const override { return *this; }
0099
0100 TrajectoryStateClosestToBeamLine stateAtBeamLine() const override;
0101
0102 double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
0103
0104 double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
0105
0106 private:
0107 void init();
0108 void calculateTSOSAtVertex() const;
0109
0110 GsfTrackRef tkr_;
0111 bool hasTime;
0112 double timeExt_, dtErrorExt_;
0113 const MagneticField* theField;
0114
0115 FreeTrajectoryState initialFTS;
0116 mutable bool initialTSOSAvailable, initialTSCPAvailable, blStateAvailable;
0117 mutable TrajectoryStateOnSurface initialTSOS;
0118 mutable TrajectoryStateClosestToPoint initialTSCP;
0119 TSCPBuilderNoMaterial builder;
0120 edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
0121 reco::BeamSpot theBeamSpot;
0122 mutable TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine;
0123
0124 TransverseImpactPointExtrapolator theTIPExtrapolator;
0125 };
0126
0127 }
0128
0129 #endif