CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTSLRecCluster.h
Go to the documentation of this file.
1 #ifndef DTSLRECCLUSTER_H
2 #define DTSLRECCLUSTER_H
3 
17 /* Base Class Headers */
19 
20 /* Collaborating Class Declarations */
23 
24 /* C++ Headers */
25 #include <iosfwd>
26 
27 /* ====================================================================== */
28 
29 /* Class DTSLRecCluster Interface */
30 
31 class DTSLRecCluster : public RecHit1D {
32 
33  public:
34 
35  /* Constructor */
37 
39  DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pair) ;
40 
43  const LocalPoint&,
44  const LocalError&,
45  const std::vector<DTRecHit1DPair>& pair) ;
46 
47  /* Destructor */
48  virtual ~DTSLRecCluster() {}
49 
50  /* Operations */
52  virtual DTSLRecCluster* clone() const { return new DTSLRecCluster(*this); }
53 
55  DTSuperLayerId superLayerId() const { return theSlid; }
56 
58  virtual AlgebraicVector parameters() const {
59  return param( localPosition());
60  }
61 
62  // The parameter error matrix
64  return parError( localPositionError());
65  }
66 
71  if ( !isInitialized) initialize();
72  return theProjectionMatrix;
73  }
74 
76  virtual int dimension() const { return 2;}
77  virtual LocalPoint localPosition() const { return thePos; }
78  virtual LocalError localPositionError() const { return thePosError; }
79 
81  virtual std::vector<const TrackingRecHit*> recHits() const ;
82 
83  virtual std::vector<TrackingRecHit*> recHits() ;
84 
86  std::vector<DTRecHit1DPair> specificRecHits() const { return thePairs; }
87 
88  int nHits() const { return thePairs.size() ; }
89 
90  private:
92 
95 
96  std::vector<DTRecHit1DPair> thePairs;
97 
98  private:
99  static bool isInitialized;
101 
102  void initialize() const {
103  isInitialized=true;
105  theProjectionMatrix[0][1]=1;
106  }
107 
108  AlgebraicVector param( const LocalPoint& lp) const {
110  result[1]=lp.x();
111  return result;
112  }
113 
116  m[0][0]=le.xx();
117  return m;
118  }
119 
120  protected:
121 
122 };
123 std::ostream& operator<<(std::ostream& os, const DTSLRecCluster& seg);
124 #endif // DTSLRECCLUSTER_H
125 
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
float xx() const
Definition: LocalError.h:24
std::vector< DTRecHit1DPair > thePairs
AlgebraicSymMatrix parError(const LocalError &le) const
virtual AlgebraicMatrix projectionMatrix() const
virtual LocalPoint localPosition() const
Local position.
virtual AlgebraicVector parameters() const
the vector of parameters (dx/dz,x)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static AlgebraicMatrix theProjectionMatrix
virtual AlgebraicSymMatrix parametersError() const
Return just &quot;(sigma_x)^2&quot;.
AlgebraicVector param(const LocalPoint &lp) const
std::vector< DTRecHit1DPair > specificRecHits() const
Access to specific components.
virtual ~DTSLRecCluster()
int nHits() const
virtual std::vector< const TrackingRecHit * > recHits() const
return the hits
CLHEP::HepMatrix AlgebraicMatrix
tuple result
Definition: query.py:137
DTSuperLayerId theSlid
static bool isInitialized
CLHEP::HepVector AlgebraicVector
void initialize() const
virtual LocalError localPositionError() const
Error on the local position.
LocalPoint thePos
virtual DTSLRecCluster * clone() const
The clone method needed by the clone policy.
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual int dimension() const
return 2. The dimension of the matrix
LocalError thePosError
T x() const
Definition: PV3DBase.h:61