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 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
51  float weight(unsigned int i) const {return theWeights[i];}
52  float & weight(unsigned int i) {return theWeights[i];}
53 
54  //get the annealing
55  virtual double getAnnealingFactor() const { return annealing_; }
56 
57  bool sharesInput(const TrackingRecHit* other,
58  SharedInputType what) const;
59 
60 private:
61 
63  std::vector<float> theWeights;
64  double annealing_;
65 
66 };
67 
68 // Comparison operators
69 inline bool operator<( const SiTrackerMultiRecHit& one, const SiTrackerMultiRecHit& other) {
70  if ( one.geographicalId() < other.geographicalId() ) {
71  return true;
72  } else {
73  return false;
74  }
75 }
76 
77 #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 RecHitPointer cloneSH() const
virtual double getAnnealingFactor() const
BaseTrackerRecHit Base
edm::OwnVector< TrackingRecHit > theHits
float weight(unsigned int i) const
virtual OmniClusterRef const & firstClusterRef() const
virtual int dimension() const
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
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:429