1 #ifndef RecoTrackerDeDx_SmirnovDeDxDiscriminator_h
2 #define RecoTrackerDeDx_SmirnovDeDxDiscriminator_h
24 std::vector<float> vect_probs;
25 for (
size_t i = 0;
i < Hits.size();
i++) {
26 float path = Hits[
i].pathLength() * 10.0;
37 vect_probs.push_back(prob);
40 size_t size = vect_probs.size();
42 return std::make_pair(-1, -1);
43 std::sort(vect_probs.begin(), vect_probs.end(), std::less<float>());
44 float TotalProb = 1.0 / (12 *
size);
45 for (
size_t i = 1;
i <=
size;
i++) {
46 TotalProb +=
pow(vect_probs[
i - 1] - ((2.0 *
i - 1.0) / (2.0 * size)), 2);
48 TotalProb *= (3.0 /
size);
49 return std::make_pair(TotalProb, -1);
std::string ProbabilityMode
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
std::vector< DeDxHit > DeDxHitCollection
T getParameter(std::string const &) const
void beginRun(edm::Run const &run, const edm::EventSetup &iSetup) override
SmirnovDeDxDiscriminator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iCollector)
DeDxTools::ESGetTokenH3DDVariant token_
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)