CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TSiTrackerMultiRecHit.h
Go to the documentation of this file.
1 #ifndef TSiTrackerMultiRecHit_h
2 #define TSiTrackerMultiRecHit_h
3 
8 
9 /*
10 A TransientTrackingRecHit for the SiTrackerMultiRecHit
11 */
12 
13 class TSiTrackerMultiRecHit GCC11_FINAL : public TransientTrackingRecHit {
14 public:
15  //virtual ~TSiTrackerMultiRecHit() {delete theHitData;}
17 
18  virtual AlgebraicVector parameters() const {return theHitData.parameters();}
20  return HelpertRecHit2DLocalPos().parError( theHitData.localPositionError(), *det());
21  //return theHitData.parametersError();
22  }
23 
24  virtual void getKfComponents( KfComponentsHolder & holder ) const {
25  HelpertRecHit2DLocalPos().getKfComponents(holder, theHitData, *det());
26  }
27  virtual DetId geographicalId() const {return theHitData.geographicalId();}
28  virtual AlgebraicMatrix projectionMatrix() const {return theHitData.projectionMatrix();}
29  virtual int dimension() const {return theHitData.dimension();}
30 
31  virtual LocalPoint localPosition() const {return theHitData.localPosition();}
32  virtual LocalError localPositionError() const {return theHitData.localPositionError();}
33 
34  virtual const TrackingRecHit * hit() const {return &theHitData;};
35  const SiTrackerMultiRecHit* specificHit() const {return &theHitData;}
36 
37  virtual bool isValid() const{return theHitData.isValid();}
38 
39  virtual std::vector<const TrackingRecHit*> recHits() const {
40  return theHitData.recHits();
41  }
42  virtual std::vector<TrackingRecHit*> recHits() {
43  return theHitData.recHits();
44  }
45 
46 
49  void setAnnealingFactor(float annealing) {annealing_ = annealing;}
50  float getAnnealingFactor() const {return annealing_;}
51 
52 
53  //vector of weights
54  std::vector<float> const & weights() const {return theHitData.weights();}
55  std::vector<float> & weights() {return theHitData.weights();}
56 
57  //returns the weight for the i component
58  float weight(unsigned int i) const {return theHitData.weight(i);}
59  float & weight(unsigned int i) {return theHitData.weight(i);}
60 
61 
62  virtual const GeomDetUnit* detUnit() const;
63 
64  virtual bool canImproveWithTrack() const {return true;}
65 
66  virtual RecHitPointer clone(const TrajectoryStateOnSurface& ts) const;
67 
68  virtual ConstRecHitContainer transientHits() const {return theComponents;};
69 
70  static RecHitPointer build( const GeomDet * geom, const SiTrackerMultiRecHit* rh,
71  const ConstRecHitContainer& components, float annealing=1.){
72  return RecHitPointer(new TSiTrackerMultiRecHit( geom, rh, components, annealing));
73  }
74 
75 
76 
77 private:
79  //holds the TransientTrackingRecHit components of the MultiRecHit
81  float annealing_;
82 
84  const ConstRecHitContainer& components, float annealing):
85  TransientTrackingRecHit(geom), theHitData(*rh), theComponents(components), annealing_(annealing){}
86 
87  virtual TSiTrackerMultiRecHit* clone() const {
88  return new TSiTrackerMultiRecHit(*this);
89  }
90 
91 
92 };
93 
94 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
int i
Definition: DBlmapReader.cc:9
virtual bool isValid() const
virtual TSiTrackerMultiRecHit * clone() const
virtual TransientTrackingRecHit * clone() const =0
static void getKfComponents(KfComponentsHolder &holder, const TrackingRecHit &hit2dLocalPos, const GeomDet &det)
virtual DetId geographicalId() const
void setAnnealingFactor(float annealing)
std::vector< float > & weights()
ConstRecHitContainer theComponents
TSiTrackerMultiRecHit(const GeomDet *geom, const SiTrackerMultiRecHit *rh, const ConstRecHitContainer &components, float annealing)
CLHEP::HepMatrix AlgebraicMatrix
std::vector< float > const & weights() const
virtual const TrackingRecHit * hit() const
virtual LocalPoint localPosition() const
virtual void getKfComponents(KfComponentsHolder &holder) const
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual int dimension() const
float getAnnealingFactor() const
Definition: DetId.h:20
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const
virtual AlgebraicMatrix projectionMatrix() const
const SiTrackerMultiRecHit * specificHit() const
SiTrackerMultiRecHit theHitData
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
float & weight(unsigned int i)
float weight(unsigned int i) const
virtual ConstRecHitContainer transientHits() const
Composite interface: returns the component hits, if any.
virtual ~TSiTrackerMultiRecHit()
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual const GeomDetUnit * detUnit() const
static RecHitPointer build(const GeomDet *geom, const SiTrackerMultiRecHit *rh, const ConstRecHitContainer &components, float annealing=1.)
virtual bool canImproveWithTrack() const
virtual AlgebraicVector parameters() const
virtual AlgebraicSymMatrix parametersError() const
static AlgebraicSymMatrix parError(const LocalError &le, const GeomDet &det)
Our base class.
Definition: SiPixelRecHit.h:22