CMS 3D CMS Logo

DTSLRecCluster.cc
Go to the documentation of this file.
1 /******* \class DTSLRecCluster *******
2  *
3  * Description:
4  *
5  * detailed description
6  *
7  * \author : Stefano Lacaprara - INFN LNL <stefano.lacaprara@pd.infn.it>
8  *
9  * Modification:
10  *
11  *********************************/
12 
13 /* This Class Header */
15 
16 /* Collaborating Class Header */
17 
18 /* C++ Headers */
19 #include <iostream>
20 using namespace std;
21 
22 /* ====================================================================== */
23 
24 /* static member definition */
26  AlgebraicMatrix m(2, 5, 0);
27  m[0][1] = 1;
28  return m;
29 }
30 
32 
33 /* Constructor */
34 DTSLRecCluster::DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pairs)
35  : theSlid(id), thePairs(pairs) {}
36 
38  const LocalPoint& pos,
39  const LocalError& err,
40  const std::vector<DTRecHit1DPair>& pairs)
41  : theSlid(id), thePos(pos), thePosError(err), thePairs(pairs) {}
42 
43 /* Destructor */
44 
45 /* Operations */
46 vector<const TrackingRecHit*> DTSLRecCluster::recHits() const {
47  std::vector<const TrackingRecHit*> pointersOfRecHits;
48 
49  for (std::vector<DTRecHit1DPair>::const_iterator rechit = thePairs.begin(); rechit != thePairs.end(); rechit++)
50  pointersOfRecHits.push_back(&(*rechit));
51 
52  return pointersOfRecHits;
53 }
54 
55 vector<TrackingRecHit*> DTSLRecCluster::recHits() {
56  std::vector<TrackingRecHit*> pointersOfRecHits;
57 
58  for (std::vector<DTRecHit1DPair>::iterator rechit = thePairs.begin(); rechit != thePairs.end(); rechit++)
59  pointersOfRecHits.push_back(&(*rechit));
60 
61  return pointersOfRecHits;
62 }
63 
64 ostream& operator<<(ostream& os, const DTSLRecCluster& clus) {
65  os << "Pos " << clus.localPosition() << " err " << clus.localPositionError() << " nHits: " << clus.nHits();
66  return os;
67 }
int nHits() const
std::vector< const TrackingRecHit * > recHits() const override
return the hits
std::vector< DTRecHit1DPair > thePairs
ostream & operator<<(ostream &os, const DTSLRecCluster &clus)
static const AlgebraicMatrix theProjectionMatrix
LocalError localPositionError() const override
Error on the local position.
CLHEP::HepMatrix AlgebraicMatrix
static AlgebraicMatrix initMatrix()
LocalPoint localPosition() const override
Local position.