CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
34 
35  // at the momement nobody care of MultiHit!!!
36  // used by trackMerger (to be improved)
37  virtual OmniClusterRef const & firstClusterRef() const { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
38 
40  virtual std::vector<const TrackingRecHit*> recHits() const;
41 // virtual void recHitsV(std::vector<const TrackingRecHit*> & ) const;
42 
44  virtual std::vector<TrackingRecHit*> recHits() ;
45 // virtual void recHitsV(std::vector<TrackingRecHit*> & );
46 
47  //vector of weights
48  std::vector<float> const & weights() const {return theWeights;}
49  std::vector<float> & weights() {return theWeights;}
50 
51  //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
70 inline bool operator<( const SiTrackerMultiRecHit& one, const SiTrackerMultiRecHit& other) {
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
int i
Definition: DBlmapReader.cc:9
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
float & weight(unsigned int i)
virtual int dimension() const
virtual double getAnnealingFactor() const
BaseTrackerRecHit Base
edm::OwnVector< TrackingRecHit > theHits
float weight(unsigned int i) const
virtual OmniClusterRef const & firstClusterRef() const
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
virtual void getKfComponents(KfComponentsHolder &holder) const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
std::vector< float > const & weights() const
virtual SiTrackerMultiRecHit * clone() const
void getKfComponents2D(KfComponentsHolder &holder) const
std::vector< float > theWeights
std::shared_ptr< TrackingRecHit const > RecHitPointer
std::vector< float > & weights()
DetId geographicalId() const
reference front()
Definition: OwnVector.h:355
virtual RecHitPointer cloneSH() const