Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-28 03:10:23

0001 #ifndef TrackReco_TransientTrackFromFTS_h
0002 #define TrackReco_TransientTrackFromFTS_h
0003 
0004 /**

0005    * Concrete implementation of the TransientTrack for a multi-state reco::GsfTrack

0006    * To be built through the factory TransientTrackFromFTSFactory or the TransientTrackBuilder

0007    */
0008 
0009 #include "TrackingTools/TransientTrack/interface/BasicTransientTrack.h"
0010 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0011 #include "DataFormats/TrackReco/interface/Track.h"
0012 #include "TrackingTools/PatternTools/interface/TSCPBuilderNoMaterial.h"
0013 
0014 namespace reco {
0015 
0016   class TransientTrackFromFTS : public BasicTransientTrack {
0017   public:
0018     TransientTrackFromFTS();
0019 
0020     TransientTrackFromFTS(const FreeTrajectoryState& fts);
0021     TransientTrackFromFTS(const FreeTrajectoryState& fts, const double time, const double dtime);
0022 
0023     TransientTrackFromFTS(const FreeTrajectoryState& fts,
0024                           const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0025     TransientTrackFromFTS(const FreeTrajectoryState& fts,
0026                           const double time,
0027                           const double dtime,
0028                           const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
0029 
0030     TransientTrackFromFTS(const TransientTrackFromFTS& tt);
0031 
0032     TransientTrackFromFTS& operator=(const TransientTrackFromFTS& tt);
0033 
0034     void setTrackingGeometry(const edm::ESHandle<GlobalTrackingGeometry>&) override;
0035 
0036     void setBeamSpot(const reco::BeamSpot& beamSpot) override;
0037 
0038     FreeTrajectoryState initialFreeState() const override { return initialFTS; }
0039 
0040     TrajectoryStateOnSurface outermostMeasurementState() const override;
0041 
0042     TrajectoryStateOnSurface innermostMeasurementState() const override;
0043 
0044     TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint& point) const override {
0045       return builder(initialFTS, point);
0046     }
0047 
0048     /**

0049     * The TSOS at any point. The initial state will be used for the propagation.

0050     */
0051     TrajectoryStateOnSurface stateOnSurface(const GlobalPoint& point) const override;
0052 
0053     TrajectoryStateClosestToPoint impactPointTSCP() const override;
0054 
0055     TrajectoryStateOnSurface impactPointState() const override;
0056 
0057     bool impactPointStateAvailable() const override { return initialTSOSAvailable; }
0058 
0059     TrackCharge charge() const override { return initialFTS.charge(); }
0060 
0061     const MagneticField* field() const override { return theField; }
0062 
0063     const Track& track() const override;
0064 
0065     TrackBaseRef trackBaseRef() const override { return TrackBaseRef(); }
0066 
0067     TrajectoryStateClosestToBeamLine stateAtBeamLine() const override;
0068 
0069     double timeExt() const override { return (hasTime ? timeExt_ : std::numeric_limits<double>::quiet_NaN()); }
0070     double dtErrorExt() const override { return (hasTime ? dtErrorExt_ : std::numeric_limits<double>::quiet_NaN()); }
0071 
0072   private:
0073     void calculateTSOSAtVertex() const;
0074 
0075     FreeTrajectoryState initialFTS;
0076     bool hasTime;
0077     double timeExt_;
0078     double dtErrorExt_;
0079     const MagneticField* theField;
0080     mutable bool initialTSOSAvailable, initialTSCPAvailable, trackAvailable, blStateAvailable;
0081     mutable TrajectoryStateOnSurface initialTSOS;
0082     mutable TrajectoryStateClosestToPoint initialTSCP;
0083     mutable Track theTrack;
0084     TSCPBuilderNoMaterial builder;
0085     edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
0086     reco::BeamSpot theBeamSpot;
0087     mutable TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine;
0088   };
0089 
0090 }  // namespace reco

0091 
0092 #endif