CMS 3D CMS Logo

SiTrackerMultiRecHit.h
Go to the documentation of this file.
1 #ifndef SiTrackerMultiRecHit_H
2 #define SiTrackerMultiRecHit_H
3 
6 #include <vector>
7 #include <map>
8 /*
9 A rechit type suitable for tracking algorithm that use soft hit-to-track assignement,
10 such as the Deterministic Annealing Filter (DAF) or the Multi Track Filter (MTF).
11 it contains an OwnVector with the component rechits and a vector of weights
12 */
14 {
15 public:
18  theHits(),
19  theWeights(),
20  annealing_(0){}
21  virtual ~SiTrackerMultiRecHit(){}
22 
23 
24  SiTrackerMultiRecHit(const LocalPoint&, const LocalError&, GeomDet const & idet,
25  const std::vector< std::pair<const TrackingRecHit*, float> >&, double);
26 
27  virtual SiTrackerMultiRecHit* clone() const {return new SiTrackerMultiRecHit(*this);}
28 #ifdef NO_DICT
29  virtual RecHitPointer cloneSH() const { return std::make_shared<SiTrackerMultiRecHit>(*this);}
30 #endif
31 
32 // virtual int dimension() const {return 2;}
33  virtual int dimension() const;
34  virtual void getKfComponents( KfComponentsHolder & holder ) const;
35 
36  // at the momement nobody care of MultiHit!!!
37  // used by trackMerger (to be improved)
38  virtual OmniClusterRef const & firstClusterRef() const { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
39 
41  virtual std::vector<const TrackingRecHit*> recHits() const;
42 
44  virtual std::vector<TrackingRecHit*> recHits() ;
45 
46  //vector of weights
47  std::vector<float> const & weights() const {return theWeights;}
48  std::vector<float> & weights() {return theWeights;}
49 
50  //returns the weight for the i component
52  float weight(unsigned int i) const {return theWeights[i];}
53  float & weight(unsigned int i) {return theWeights[i];}
54 
55  //get the annealing
56  virtual double getAnnealingFactor() const { return annealing_; }
57 
58  bool sharesInput(const TrackingRecHit* other,
59  SharedInputType what) const;
60 
61 private:
62 
64  std::vector<float> theWeights;
65  double annealing_;
66 
67 };
68 
69 // Comparison operators
71  if ( one.geographicalId() < other.geographicalId() ) {
72  return true;
73  } else {
74  return false;
75  }
76 }
77 
78 #endif
SharedInputType
definition of equality via shared input
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
virtual float weight() const
float & weight(unsigned int i)
virtual RecHitPointer cloneSH() const
virtual double getAnnealingFactor() const
BaseTrackerRecHit Base
edm::OwnVector< TrackingRecHit > theHits
float weight(unsigned int i) const
bool operator<(const SiTrackerMultiRecHit &one, const SiTrackerMultiRecHit &other)
virtual OmniClusterRef const & firstClusterRef() const
virtual int dimension() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
std::vector< float > const & weights() const
virtual SiTrackerMultiRecHit * clone() const
std::vector< float > theWeights
virtual void getKfComponents(KfComponentsHolder &holder) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
std::vector< float > & weights()
DetId geographicalId() const
reference front()
Definition: OwnVector.h:423