CMS 3D CMS Logo

GEMRecHit.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author M. Maggi -- INFN Bari
5  */
6 
8 
9 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx)
10  : RecHit2DLocalPos(gemId),
11  theGEMId(gemId),
12  theBx(bx),
13  theFirstStrip(99),
14  theClusterSize(99),
15  theLocalPosition(),
16  theLocalError() {}
17 
19  : RecHit2DLocalPos(),
20  theGEMId(),
21  theBx(99),
22  theFirstStrip(99),
23  theClusterSize(99),
24  theLocalPosition(),
25  theLocalError() {}
26 
27 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos)
28  : RecHit2DLocalPos(gemId), theGEMId(gemId), theBx(bx), theFirstStrip(99), theClusterSize(99), theLocalPosition(pos) {
29  float stripResolution = 3.0; //cm this sould be taken from trimmed cluster size times strip size
30  // taken out from geometry service i.e. topology
31  theLocalError = LocalError(stripResolution * stripResolution, 0., 0.); //FIXME: is it really needed?
32 }
33 
34 // Constructor from a local position and error, wireId and digi time.
35 GEMRecHit::GEMRecHit(const GEMDetId& gemId, int bx, const LocalPoint& pos, const LocalError& err)
36  : RecHit2DLocalPos(gemId),
37  theGEMId(gemId),
38  theBx(bx),
39  theFirstStrip(99),
40  theClusterSize(99),
41  theLocalPosition(pos),
42  theLocalError(err) {}
43 
44 // Constructor from a local position and error, wireId, bx and cluster size.
46  const GEMDetId& gemId, int bx, int firstStrip, int clustSize, const LocalPoint& pos, const LocalError& err)
47  : RecHit2DLocalPos(gemId),
48  theGEMId(gemId),
49  theBx(bx),
50  theFirstStrip(firstStrip),
51  theClusterSize(clustSize),
52  theLocalPosition(pos),
53  theLocalError(err) {}
54 
55 // Destructor
57 
58 GEMRecHit* GEMRecHit::clone() const { return new GEMRecHit(*this); }
59 
60 // Access to component RecHits.
61 // No components rechits: it returns a null vector
62 std::vector<const TrackingRecHit*> GEMRecHit::recHits() const {
63  std::vector<const TrackingRecHit*> nullvector;
64  return nullvector;
65 }
66 
67 // Non-const access to component RecHits.
68 // No components rechits: it returns a null vector
69 std::vector<TrackingRecHit*> GEMRecHit::recHits() {
70  std::vector<TrackingRecHit*> nullvector;
71  return nullvector;
72 }
73 
74 // Comparison operator, based on the wireId and the digi time
75 bool GEMRecHit::operator==(const GEMRecHit& hit) const { return this->geographicalId() == hit.geographicalId(); }
76 
77 // The ostream operator
78 std::ostream& operator<<(std::ostream& os, const GEMRecHit& hit) {
79  os << "pos: " << hit.localPosition().x();
80  os << " +/- " << sqrt(hit.localPositionError().xx());
81  return os;
82 }
GEMRecHit::recHits
std::vector< const TrackingRecHit * > recHits() const override
Definition: GEMRecHit.cc:62
GEMRecHit::theLocalError
LocalError theLocalError
Definition: GEMRecHit.h:83
GEMRecHit.h
pos
Definition: PixelAliasList.h:18
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
GEMRecHit::GEMRecHit
GEMRecHit()
Default constructor.
Definition: GEMRecHit.cc:18
GEMRecHit::clone
GEMRecHit * clone() const override
Definition: GEMRecHit.cc:58
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
operator<<
std::ostream & operator<<(std::ostream &os, const GEMRecHit &hit)
The ostream operator.
Definition: GEMRecHit.cc:78
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
RecHit2DLocalPos::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: RecHit2DLocalPos.h:10
runTheMatrix.err
err
Definition: runTheMatrix.py:288
LocalError
Definition: LocalError.h:12
GEMDetId
Definition: GEMDetId.h:17
GEMRecHit::~GEMRecHit
~GEMRecHit() override
Destructor.
Definition: GEMRecHit.cc:56
RecHit2DLocalPos
Definition: RecHit2DLocalPos.h:8
GEMRecHit
Definition: GEMRecHit.h:14
hit
Definition: SiStripHitEffFromCalibTree.cc:88
GEMRecHit::operator==
bool operator==(const GEMRecHit &hit) const
Comparison operator, based on the gemId and the digi time.
Definition: GEMRecHit.cc:75