File indexing completed on 2024-04-06 12:04:13
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "DataFormats/GEMRecHit/interface/ME0RecHit.h"
0010
0011 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof)
0012 : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(), theLocalError() {}
0013
0014 ME0RecHit::ME0RecHit() : RecHit2DLocalPos(), theME0Id(), theTOF(0.), theLocalPosition(), theLocalError() {}
0015
0016 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos)
0017 : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(pos), theLocalError() {}
0018
0019
0020 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos, const LocalError& err)
0021 : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(pos), theLocalError(err) {}
0022
0023
0024 ME0RecHit::~ME0RecHit() {}
0025
0026 ME0RecHit* ME0RecHit::clone() const { return new ME0RecHit(*this); }
0027
0028
0029
0030 std::vector<const TrackingRecHit*> ME0RecHit::recHits() const {
0031 std::vector<const TrackingRecHit*> nullvector;
0032 return nullvector;
0033 }
0034
0035
0036 std::vector<TrackingRecHit*> ME0RecHit::recHits() {
0037 std::vector<TrackingRecHit*> nullvector;
0038 return nullvector;
0039 }
0040
0041
0042 bool ME0RecHit::operator==(const ME0RecHit& hit) const { return this->geographicalId() == hit.geographicalId(); }
0043
0044
0045 std::ostream& operator<<(std::ostream& os, const ME0RecHit& hit) {
0046 os << "pos: x = " << hit.localPosition().x();
0047 os << " +/- " << sqrt(hit.localPositionError().xx()) << " cm";
0048 os << " y = " << hit.localPosition().y();
0049 os << " +/- " << sqrt(hit.localPositionError().yy()) << " cm";
0050 return os;
0051 }