Back to home page

Project CMSSW displayed by LXR

 
 

    


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  * Trajectory state defined at the point of closest approach (PCA) of the
0011  * track to the beamline. It gives also access to the point on the beamline which is
0012  * the closest to the track.
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    * State of the track at the PCA to the beamline
0030    */
0031 
0032   FTS const& trackStateAtPCA() const { return theFTS; }
0033 
0034   /**
0035    * Point on the beamline which is the closest to the track
0036    */
0037   GlobalPoint const& beamLinePCA() const { return thePointOnBeamLine; }
0038 
0039   /**
0040    * Transverse impact parameter of the track to the beamline.
0041    * It is the transverse distance of the two PCAs.
0042    */
0043   Measurement1D transverseImpactParameter() const;
0044 
0045   /**
0046    * The beamline
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