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 public:
17  ~SiTrackerMultiRecHit() override {}
18 
20  const LocalError&,
21  GeomDet const& idet,
22  const std::vector<std::pair<const TrackingRecHit*, float> >&,
23  double);
24 
25  SiTrackerMultiRecHit* clone() const override { return new SiTrackerMultiRecHit(*this); }
26 #ifdef NO_DICT
27  RecHitPointer cloneSH() const override { return std::make_shared<SiTrackerMultiRecHit>(*this); }
28 #endif
29 
30  // virtual int dimension() const {return 2;}
31  int dimension() const override;
32  void getKfComponents(KfComponentsHolder& holder) const override;
33 
34  // at the momement nobody care of MultiHit!!!
35  // used by trackMerger (to be improved)
36  OmniClusterRef const& firstClusterRef() const override {
37  return static_cast<BaseTrackerRecHit const&>(theHits.front()).firstClusterRef();
38  }
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, SharedInputType what) const override;
59 
60 private:
62  std::vector<float> theWeights;
63  double annealing_;
64 };
65 
66 // Comparison operators
68  if (one.geographicalId() < other.geographicalId()) {
69  return true;
70  } else {
71  return false;
72  }
73 }
74 
75 #endif
SharedInputType
definition of equality via shared input
virtual RecHitPointer cloneSH() const
std::vector< float > const & weights() const
float & weight(unsigned int i)
BaseTrackerRecHit Base
OmniClusterRef const & firstClusterRef() const override
SiTrackerMultiRecHit * clone() const override
edm::OwnVector< TrackingRecHit > theHits
bool operator<(const SiTrackerMultiRecHit &one, const SiTrackerMultiRecHit &other)
std::vector< float > theWeights
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual double getAnnealingFactor() const
void getKfComponents(KfComponentsHolder &holder) const override
float weight(unsigned int i) const
std::vector< float > & weights()
virtual float weight() const
reference front()
Definition: OwnVector.h:459
int dimension() const override
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)