CMS 3D CMS Logo

MedianDeDxEstimator.h
Go to the documentation of this file.
1 #ifndef RecoTrackerDeDx_MedianDeDxEstimator_h
2 #define RecoTrackerDeDx_MedianDeDxEstimator_h
3 
7 
9 public:
11 
12  std::pair<float, float> dedx(const reco::DeDxHitCollection& Hits) override {
13  if (Hits.empty())
14  return std::make_pair(-1, -1);
15  return std::make_pair(Hits[Hits.size() / 2].charge(), -1);
16  }
17 };
18 
19 #endif
std::vector< DeDxHit > DeDxHitCollection
Definition: DeDxHit.h:45
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
MedianDeDxEstimator(const edm::ParameterSet &iConfig)