File indexing completed on 2024-04-06 12:04:13
0001
0002
0003
0004
0005
0006
0007 #include "DataFormats/GEMRecHit/interface/GEMRecHit.h"
0008
0009 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx)
0010 : RecHit2DLocalPos(gemId),
0011 theGEMId(gemId),
0012 theBx(bx),
0013 theFirstStrip(99),
0014 theClusterSize(99),
0015 theLocalPosition(),
0016 theLocalError() {}
0017
0018 GEMRecHit::GEMRecHit()
0019 : RecHit2DLocalPos(),
0020 theGEMId(),
0021 theBx(99),
0022 theFirstStrip(99),
0023 theClusterSize(99),
0024 theLocalPosition(),
0025 theLocalError() {}
0026
0027 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos)
0028 : RecHit2DLocalPos(gemId), theGEMId(gemId), theBx(bx), theFirstStrip(99), theClusterSize(99), theLocalPosition(pos) {
0029 float stripResolution = 3.0;
0030
0031 theLocalError = LocalError(stripResolution * stripResolution, 0., 0.);
0032 }
0033
0034
0035 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos, const LocalError& err)
0036 : RecHit2DLocalPos(gemId),
0037 theGEMId(gemId),
0038 theBx(bx),
0039 theFirstStrip(99),
0040 theClusterSize(99),
0041 theLocalPosition(pos),
0042 theLocalError(err) {}
0043
0044
0045 GEMRecHit::GEMRecHit(
0046 const GEMDetId& gemId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err)
0047 : RecHit2DLocalPos(gemId),
0048 theGEMId(gemId),
0049 theBx(bx),
0050 theFirstStrip(firstStrip),
0051 theClusterSize(clustSize),
0052 theLocalPosition(pos),
0053 theLocalError(err) {}
0054
0055
0056 GEMRecHit::~GEMRecHit() {}
0057
0058 GEMRecHit* GEMRecHit::clone() const { return new GEMRecHit(*this); }
0059
0060
0061
0062 std::vector<const TrackingRecHit*> GEMRecHit::recHits() const {
0063 std::vector<const TrackingRecHit*> nullvector;
0064 return nullvector;
0065 }
0066
0067
0068
0069 std::vector<TrackingRecHit*> GEMRecHit::recHits() {
0070 std::vector<TrackingRecHit*> nullvector;
0071 return nullvector;
0072 }
0073
0074
0075 bool GEMRecHit::operator==(const GEMRecHit& hit) const { return this->geographicalId() == hit.geographicalId(); }
0076
0077
0078 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit) {
0079 os << "pos: " << hit.localPosition().x();
0080 os << " +/- " << sqrt(hit.localPositionError().xx());
0081 return os;
0082 }