File indexing completed on 2024-04-06 12:31:41
0001 #ifndef TrajectoryStateClosestToBeamLine_H
0002 #define TrajectoryStateClosestToBeamLine_H
0003
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0006 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
0007 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0008
0009
0010
0011
0012
0013
0014
0015 class TrajectoryStateClosestToBeamLine {
0016 public:
0017 typedef FreeTrajectoryState FTS;
0018
0019 TrajectoryStateClosestToBeamLine() : valid(false) {}
0020
0021 TrajectoryStateClosestToBeamLine(const FTS& stateAtPCA,
0022 const GlobalPoint& pointOnBeamLine,
0023 const reco::BeamSpot& beamSpot)
0024 : theFTS(stateAtPCA), thePointOnBeamLine(pointOnBeamLine), theBeamSpot(beamSpot), valid(true) {}
0025
0026 ~TrajectoryStateClosestToBeamLine() {}
0027
0028
0029
0030
0031
0032 FTS const& trackStateAtPCA() const { return theFTS; }
0033
0034
0035
0036
0037 GlobalPoint const& beamLinePCA() const { return thePointOnBeamLine; }
0038
0039
0040
0041
0042
0043 Measurement1D transverseImpactParameter() const;
0044
0045
0046
0047
0048 reco::BeamSpot const& beamSpot() { return theBeamSpot; }
0049
0050 inline bool isValid() const { return valid; }
0051
0052 private:
0053 FTS theFTS;
0054 GlobalPoint thePointOnBeamLine;
0055 reco::BeamSpot theBeamSpot;
0056 bool valid;
0057 };
0058 #endif