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  virtual ~SiTrackerMultiRecHit(){}
21 
22 
23  SiTrackerMultiRecHit(const LocalPoint&, const LocalError&, const DetId&,
24  const std::vector< std::pair<const TrackingRecHit*, float> >&);
25 
26  virtual SiTrackerMultiRecHit* clone() const {return new SiTrackerMultiRecHit(*this);}
27 
28  virtual int dimension() const {return 2;}
29  virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
30 
31  // at the momement nobody care of MultiHit!!!
32  // used by trackMerger (to be improved)
33  virtual OmniClusterRef const & firstClusterRef() const { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
34 
35 
36  //vector of component rechits
37  virtual std::vector<const TrackingRecHit*> recHits() const;
38 
39  virtual std::vector<TrackingRecHit*> recHits() ;
40 
41  //vector of weights
42  std::vector<float> const & weights() const {return theWeights;}
43  std::vector<float> & weights() {return theWeights;}
44 
45  //returns the weight for the i component
46  float weight(unsigned int i) const {return theWeights[i];}
47  float & weight(unsigned int i) {return theWeights[i];}
48 
49  bool sharesInput(const TrackingRecHit* other,
50  SharedInputType what) const;
51 private:
52 
54  std::vector<float> theWeights;
55 
56 
57 };
58 
59 // Comparison operators
60 inline bool operator<( const SiTrackerMultiRecHit& one, const SiTrackerMultiRecHit& other) {
61  if ( one.geographicalId() < other.geographicalId() ) {
62  return true;
63  } else {
64  return false;
65  }
66 }
67 
68 #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
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
Definition: DetId.h:18
std::vector< float > & weights()
DetId geographicalId() const
reference front()
Definition: OwnVector.h:348