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 TValidTrackingRecHit {
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  TValidTrackingRecHit(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
virtual ConstRecHitContainer transientHits() const
Composite interface: returns the component hits, if any.
virtual LocalError localPositionError() const
virtual void getKfComponents(KfComponentsHolder &holder) const
virtual DetId geographicalId() const
int i
Definition: DBlmapReader.cc:9
virtual AlgebraicSymMatrix parametersError() const
TSiTrackerMultiRecHit(const GeomDet *geom, const SiTrackerMultiRecHit *rh, const ConstRecHitContainer &components, float annealing)
void setAnnealingFactor(float annealing)
static void getKfComponents(KfComponentsHolder &holder, const TrackingRecHit &hit2dLocalPos, const GeomDet &det)
virtual const GeomDet * det() const GCC11_FINAL
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
float getAnnealingFactor() const
virtual bool canImproveWithTrack() const
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual TSiTrackerMultiRecHit * clone() const
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
virtual AlgebraicMatrix projectionMatrix() const
float weight(unsigned int i) const
float & weight(unsigned int i)
virtual ~TSiTrackerMultiRecHit()
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
virtual AlgebraicVector parameters() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: DetId.h:18
virtual LocalPoint localPosition() const
CLHEP::HepVector AlgebraicVector
virtual bool isValid() const
static RecHitPointer build(const GeomDet *geom, const SiTrackerMultiRecHit *rh, const ConstRecHitContainer &components, float annealing=1.)
virtual TValidTrackingRecHit * clone() const =0
std::vector< float > & weights()
const SiTrackerMultiRecHit * specificHit() const
SiTrackerMultiRecHit theHitData
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual const GeomDetUnit * detUnit() const
virtual int dimension() const
std::vector< float > const & weights() const
ConstRecHitContainer theComponents
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
static AlgebraicSymMatrix parError(const LocalError &le, const GeomDet &det)
Unlimited (trivial) bounds.