00001 #ifndef TrajectoryStateClosestToBeamLine_H 00002 #define TrajectoryStateClosestToBeamLine_H 00003 00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" 00006 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h" 00007 #include "DataFormats/BeamSpot/interface/BeamSpot.h" 00008 00015 class TrajectoryStateClosestToBeamLine 00016 { 00017 public: 00018 00019 typedef FreeTrajectoryState FTS; 00020 00021 TrajectoryStateClosestToBeamLine() : valid(false) {} 00022 00023 TrajectoryStateClosestToBeamLine 00024 (const FTS& stateAtPCA, const GlobalPoint & pointOnBeamLine, 00025 const reco::BeamSpot & beamSpot) : 00026 theFTS(stateAtPCA) , thePointOnBeamLine(pointOnBeamLine), 00027 theBeamSpot(beamSpot), valid(true) 00028 {} 00029 00030 ~TrajectoryStateClosestToBeamLine(){} 00031 00036 FTS const & trackStateAtPCA() const { 00037 return theFTS; 00038 } 00039 00043 GlobalPoint const & beamLinePCA() const { 00044 return thePointOnBeamLine; 00045 } 00046 00051 Measurement1D transverseImpactParameter() const; 00052 00056 reco::BeamSpot const & beamSpot() { 00057 return theBeamSpot; 00058 } 00059 00060 inline bool isValid() const {return valid;} 00061 00062 private: 00063 00064 FTS theFTS; 00065 GlobalPoint thePointOnBeamLine; 00066 reco::BeamSpot theBeamSpot; 00067 bool valid; 00068 00069 }; 00070 #endif