Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:49:13

0001 
0002 #ifndef SiStripLaserRecHit2D_H
0003 #define SiStripLaserRecHit2D_H
0004 
0005 #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"
0006 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0007 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
0008 
0009 ///
0010 ///
0011 ///
0012 class SiStripLaserRecHit2D : public RecHit2DLocalPos {
0013 public:
0014   SiStripLaserRecHit2D() : RecHit2DLocalPos(0) {}
0015   ~SiStripLaserRecHit2D() override {}
0016   SiStripLaserRecHit2D(const LocalPoint& p, const LocalError& e, const SiStripDetId& id)
0017       : RecHit2DLocalPos(id), position(p), error(e) {
0018     detId = id;
0019   }
0020 
0021   LocalPoint localPosition() const override { return position; }
0022   LocalError localPositionError() const override { return error; }
0023   SiStripLaserRecHit2D* clone() const override { return new SiStripLaserRecHit2D(*this); }
0024 
0025   const SiStripDetId& getDetId(void) const { return detId; }
0026 
0027 private:
0028   LocalPoint position;
0029   LocalError error;
0030   SiStripDetId detId;
0031 };
0032 
0033 ///
0034 /// Comparison operators
0035 ///
0036 inline bool operator<(const SiStripLaserRecHit2D& one, const SiStripLaserRecHit2D& other) {
0037   return (one.geographicalId() < other.geographicalId());
0038 }
0039 
0040 #endif