00001 #ifndef SiTrackerMultiRecHit_H 00002 #define SiTrackerMultiRecHit_H 00003 00004 #include "DataFormats/TrackerRecHit2D/interface/BaseSiTrackerRecHit2DLocalPos.h" 00005 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h" 00006 #include <vector> 00007 #include <map> 00008 /* 00009 A rechit type suitable for tracking algorithm that use soft hit-to-track assignement, 00010 such as the Deterministic Annealing Filter (DAF) or the Multi Track Filter (MTF). 00011 it contains an OwnVector with the component rechits and a vector of weights 00012 */ 00013 class SiTrackerMultiRecHit : public BaseSiTrackerRecHit2DLocalPos 00014 { 00015 public: 00016 SiTrackerMultiRecHit():BaseSiTrackerRecHit2DLocalPos(), 00017 theHits(), 00018 theWeights(){} 00019 SiTrackerMultiRecHit(const LocalPoint&, const LocalError&, const DetId&, const std::vector< std::pair<const TrackingRecHit*, float> >&); 00020 00021 virtual SiTrackerMultiRecHit* clone() const {return new SiTrackerMultiRecHit(*this);}; 00022 00023 virtual ~SiTrackerMultiRecHit(){}; 00024 00025 //vector of component rechits 00026 virtual std::vector<const TrackingRecHit*> recHits() const; 00027 00028 virtual std::vector<TrackingRecHit*> recHits() ; 00029 00030 //vector of weights 00031 std::vector<float> weights() const {return theWeights;} 00032 00033 //returns the weight for the i component 00034 float weight(unsigned int i) const ; 00035 00036 bool sharesInput(const TrackingRecHit* other, 00037 SharedInputType what) const; 00038 private: 00039 00040 edm::OwnVector<TrackingRecHit> theHits; 00041 std::vector<float> theWeights; 00042 00043 00044 }; 00045 00046 // Comparison operators 00047 inline bool operator<( const SiTrackerMultiRecHit& one, const SiTrackerMultiRecHit& other) { 00048 if ( one.geographicalId() < other.geographicalId() ) { 00049 return true; 00050 } else { 00051 return false; 00052 } 00053 } 00054 00055 #endif