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 
29 
30 /* Constructor */
31 DTSLRecCluster::DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pairs) :
32 theSlid(id), thePairs(pairs){
33 }
34 
36  const LocalPoint& pos,
37  const LocalError& err,
38  const std::vector<DTRecHit1DPair>& pairs) :
39 theSlid(id), thePos(pos), thePosError(err), thePairs(pairs){
40 }
41 
42 /* Destructor */
43 
44 /* Operations */
45 vector<const TrackingRecHit*> DTSLRecCluster::recHits() const {
46  std::vector<const TrackingRecHit*> pointersOfRecHits;
47 
48  for(std::vector<DTRecHit1DPair>::const_iterator rechit = thePairs.begin();
49  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();
59  rechit != thePairs.end(); rechit++)
60  pointersOfRecHits.push_back( &(*rechit) );
61 
62  return pointersOfRecHits;
63 }
64 
65 ostream& operator<<(ostream& os, const DTSLRecCluster& clus) {
66  os << "Pos " << clus.localPosition()
67  << " err " << clus.localPositionError()
68  << " nHits: " << clus.nHits() ;
69  return os;
70 }
71 
72 
std::vector< DTRecHit1DPair > thePairs
virtual LocalPoint localPosition() const
Local position.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static AlgebraicMatrix theProjectionMatrix
int nHits() const
virtual std::vector< const TrackingRecHit * > recHits() const
return the hits
CLHEP::HepMatrix AlgebraicMatrix
static bool isInitialized
virtual LocalError localPositionError() const
Error on the local position.