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  * $date : 17/04/2008 17:14:32 CEST $
9  *
10  * Modification:
11  *
12  *********************************/
13 
14 /* This Class Header */
16 
17 /* Collaborating Class Header */
18 
19 /* C++ Headers */
20 #include <iostream>
21 using namespace std;
22 
23 /* ====================================================================== */
24 
25 /* static member definition */
27  AlgebraicMatrix m( 2, 5, 0);
28  m[0][1]=1;
29  return m;
30 }
31 
33 
34 /* Constructor */
35 DTSLRecCluster::DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pairs) :
36 theSlid(id), thePairs(pairs){
37 }
38 
40  const LocalPoint& pos,
41  const LocalError& err,
42  const std::vector<DTRecHit1DPair>& pairs) :
43 theSlid(id), thePos(pos), thePosError(err), thePairs(pairs){
44 }
45 
46 /* Destructor */
47 
48 /* Operations */
49 vector<const TrackingRecHit*> DTSLRecCluster::recHits() const {
50  std::vector<const TrackingRecHit*> pointersOfRecHits;
51 
52  for(std::vector<DTRecHit1DPair>::const_iterator rechit = thePairs.begin();
53  rechit != thePairs.end(); rechit++)
54  pointersOfRecHits.push_back( &(*rechit) );
55 
56  return pointersOfRecHits;
57 }
58 
59 vector<TrackingRecHit*> DTSLRecCluster::recHits() {
60  std::vector<TrackingRecHit*> pointersOfRecHits;
61 
62  for(std::vector<DTRecHit1DPair>::iterator rechit = thePairs.begin();
63  rechit != thePairs.end(); rechit++)
64  pointersOfRecHits.push_back( &(*rechit) );
65 
66  return pointersOfRecHits;
67 }
68 
69 ostream& operator<<(ostream& os, const DTSLRecCluster& clus) {
70  os << "Pos " << clus.localPosition()
71  << " err " << clus.localPositionError()
72  << " nHits: " << clus.nHits() ;
73  return os;
74 }
75 
76 
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.