RecoTracker
DeDx
interface
MedianDeDxEstimator.h
Go to the documentation of this file.
1
#ifndef RecoTrackerDeDx_MedianDeDxEstimator_h
2
#define RecoTrackerDeDx_MedianDeDxEstimator_h
3
4
#include "
RecoTracker/DeDx/interface/BaseDeDxEstimator.h
"
5
#include "
RecoTracker/DeDx/interface/DeDxTools.h
"
6
#include "
DataFormats/TrackReco/interface/DeDxHit.h
"
7
8
class
MedianDeDxEstimator
:
public
BaseDeDxEstimator
{
9
public
:
10
MedianDeDxEstimator
(
const
edm::ParameterSet
& iConfig) {}
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
reco::DeDxHitCollection
std::vector< DeDxHit > DeDxHitCollection
Definition:
DeDxHit.h:41
MedianDeDxEstimator
Definition:
MedianDeDxEstimator.h:8
MedianDeDxEstimator::dedx
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
Definition:
MedianDeDxEstimator.h:12
DeDxHit.h
DeDxTools.h
BaseDeDxEstimator.h
edm::ParameterSet
Definition:
ParameterSet.h:36
BaseDeDxEstimator
Definition:
BaseDeDxEstimator.h:7
MedianDeDxEstimator::MedianDeDxEstimator
MedianDeDxEstimator(const edm::ParameterSet &iConfig)
Definition:
MedianDeDxEstimator.h:10
Generated for CMSSW Reference Manual by
1.8.16