CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 }
37 
39  const LocalPoint& pos,
40  const LocalError& err,
41  const std::vector<DTRecHit1DPair>& pairs) :
42 theSlid(id), thePos(pos), thePosError(err), thePairs(pairs){
43 }
44 
45 /* Destructor */
46 
47 /* Operations */
48 vector<const TrackingRecHit*> DTSLRecCluster::recHits() const {
49  std::vector<const TrackingRecHit*> pointersOfRecHits;
50 
51  for(std::vector<DTRecHit1DPair>::const_iterator rechit = thePairs.begin();
52  rechit != thePairs.end(); rechit++)
53  pointersOfRecHits.push_back( &(*rechit) );
54 
55  return pointersOfRecHits;
56 }
57 
58 vector<TrackingRecHit*> DTSLRecCluster::recHits() {
59  std::vector<TrackingRecHit*> pointersOfRecHits;
60 
61  for(std::vector<DTRecHit1DPair>::iterator rechit = thePairs.begin();
62  rechit != thePairs.end(); rechit++)
63  pointersOfRecHits.push_back( &(*rechit) );
64 
65  return pointersOfRecHits;
66 }
67 
68 ostream& operator<<(ostream& os, const DTSLRecCluster& clus) {
69  os << "Pos " << clus.localPosition()
70  << " err " << clus.localPositionError()
71  << " nHits: " << clus.nHits() ;
72  return os;
73 }
74 
75 
std::vector< DTRecHit1DPair > thePairs
virtual LocalPoint localPosition() const
Local position.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static const AlgebraicMatrix theProjectionMatrix
int nHits() const
virtual std::vector< const TrackingRecHit * > recHits() const
return the hits
CLHEP::HepMatrix AlgebraicMatrix
static AlgebraicMatrix initMatrix()
virtual LocalError localPositionError() const
Error on the local position.