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  ~SiTrackerMultiRecHit() override{}
22 
23 
24  SiTrackerMultiRecHit(const LocalPoint&, const LocalError&, GeomDet const & idet,
25  const std::vector< std::pair<const TrackingRecHit*, float> >&, double);
26 
27  SiTrackerMultiRecHit* clone() const override {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  int dimension() const override;
34  void getKfComponents( KfComponentsHolder & holder ) const override;
35 
36  // at the momement nobody care of MultiHit!!!
37  // used by trackMerger (to be improved)
38  OmniClusterRef const & firstClusterRef() const override { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
39 
41  std::vector<const TrackingRecHit*> recHits() const override;
42 
44  std::vector<TrackingRecHit*> recHits() override ;
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 override;
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
SiTrackerMultiRecHit * clone() const override
virtual float weight() const
float & weight(unsigned int i)
OmniClusterRef const & firstClusterRef() const override
virtual RecHitPointer cloneSH() const
virtual double getAnnealingFactor() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
BaseTrackerRecHit Base
int dimension() const override
edm::OwnVector< TrackingRecHit > theHits
float weight(unsigned int i) const
bool operator<(const SiTrackerMultiRecHit &one, const SiTrackerMultiRecHit &other)
std::vector< float > const & weights() const
std::vector< float > theWeights
void getKfComponents(KfComponentsHolder &holder) const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
std::vector< float > & weights()
DetId geographicalId() const
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
reference front()
Definition: OwnVector.h:423