15 desc.
add<
bool>(
"ignoreVertices",
false);
17 std::vector<double>
cuts = {-.7, 0.1, .7};
18 desc.
add<std::vector<double>>(
"qualityCuts",
cuts);
30 auto const & qv = cfg.
getParameter<std::vector<double>>(
"qualityCuts");
34 produces<MVACollection>(
"MVAValues");
35 produces<QualityMaskCollection>(
"QualityMasks");
44 auto const &
tracks(*hSrcTrack);
57 auto mvaPairs = std::make_unique<MVAPairCollection>(
tracks.size(),std::make_pair(-99.
f,
true));
58 auto mvas = std::make_unique<MVACollection>(
tracks.size(),-99.f);
59 auto quals = std::make_unique<QualityMaskCollection>(
tracks.size(),0);
65 edm::LogWarning(
"TrackMVAClassifierBase") <<
"ignoreVertices is set to False in the configuration, but the vertex collection is not valid";
69 assert((*mvaPairs).size()==
tracks.size());
72 for (
auto const&
output : *mvaPairs) {
79 float mva = (*mvas)[
k];
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackMVAClassifierBase(const edm::ParameterSet &cfg)
virtual void initEvent(const edm::EventSetup &es)=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
std::vector< Track > TrackCollection
collection of Tracks
static void fill(edm::ParameterSetDescription &desc)
std::vector< Vertex > VertexCollection
collection of Vertex objects
~TrackMVAClassifierBase() override
edm::EDGetTokenT< reco::BeamSpot > beamspot_
void produce(edm::Event &evt, const edm::EventSetup &es) final
edm::EDGetTokenT< reco::VertexCollection > vertices_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void computeMVA(reco::TrackCollection const &tracks, reco::BeamSpot const &beamSpot, reco::VertexCollection const &vertices, MVAPairCollection &mvas) const =0