CMS 3D CMS Logo

ME0RecHit.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * $Date: 2013/04/24 16:54:24 $
5  * $Revision: 1.1 $
6  * \author M. Maggi -- INFN Bari
7  */
8 
10 
11 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof)
12  : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(), theLocalError() {}
13 
14 ME0RecHit::ME0RecHit() : RecHit2DLocalPos(), theME0Id(), theTOF(0.), theLocalPosition(), theLocalError() {}
15 
16 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos)
17  : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(pos), theLocalError() {}
18 
19 // Constructor from a local position and error, wireId and digi time.
20 ME0RecHit::ME0RecHit(const ME0DetId& me0Id, float tof, const LocalPoint& pos, const LocalError& err)
21  : RecHit2DLocalPos(me0Id), theME0Id(me0Id), theTOF(tof), theLocalPosition(pos), theLocalError(err) {}
22 
23 // Destructor
25 
26 ME0RecHit* ME0RecHit::clone() const { return new ME0RecHit(*this); }
27 
28 // Access to component RecHits.
29 // No components rechits: it returns a null vector
30 std::vector<const TrackingRecHit*> ME0RecHit::recHits() const {
31  std::vector<const TrackingRecHit*> nullvector;
32  return nullvector;
33 }
34 // Non-const access to component RecHits.
35 // No components rechits: it returns a null vector
36 std::vector<TrackingRecHit*> ME0RecHit::recHits() {
37  std::vector<TrackingRecHit*> nullvector;
38  return nullvector;
39 }
40 
41 // Comparison operator, based on the wireId and the digi time
42 bool ME0RecHit::operator==(const ME0RecHit& hit) const { return this->geographicalId() == hit.geographicalId(); }
43 
44 // The ostream operator
45 std::ostream& operator<<(std::ostream& os, const ME0RecHit& hit) {
46  os << "pos: x = " << hit.localPosition().x();
47  os << " +/- " << sqrt(hit.localPositionError().xx()) << " cm";
48  os << " y = " << hit.localPosition().y();
49  os << " +/- " << sqrt(hit.localPositionError().yy()) << " cm";
50  return os;
51 }
ME0RecHit.h
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
pos
Definition: PixelAliasList.h:18
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
RecHit2DLocalPos::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: RecHit2DLocalPos.h:10
operator<<
std::ostream & operator<<(std::ostream &os, const ME0RecHit &hit)
The ostream operator.
Definition: ME0RecHit.cc:45
runTheMatrix.err
err
Definition: runTheMatrix.py:288
LocalError
Definition: LocalError.h:12
ME0RecHit::ME0RecHit
ME0RecHit()
Default constructor.
Definition: ME0RecHit.cc:14
ME0DetId
Definition: ME0DetId.h:16
RecHit2DLocalPos
Definition: RecHit2DLocalPos.h:8
ME0RecHit
Definition: ME0RecHit.h:16
ME0RecHit::clone
ME0RecHit * clone() const override
Definition: ME0RecHit.cc:26
ME0RecHit::recHits
std::vector< const TrackingRecHit * > recHits() const override
Definition: ME0RecHit.cc:30
ME0RecHit::~ME0RecHit
~ME0RecHit() override
Destructor.
Definition: ME0RecHit.cc:24
hit
Definition: SiStripHitEffFromCalibTree.cc:88
ME0RecHit::operator==
bool operator==(const ME0RecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: ME0RecHit.cc:42