Go to the documentation of this file.
14 desc.
add<
bool>(
"ignoreVertices",
false);
16 std::vector<double>
cuts = {-.7, 0.1, .7};
17 desc.
add<std::vector<double>>(
"qualityCuts",
cuts);
26 ignoreVertices_(
cfg.getParameter<
bool>(
"ignoreVertices")) {
27 auto const& qv =
cfg.getParameter<std::vector<double>>(
"qualityCuts");
31 produces<MVACollection>(
"MVAValues");
32 produces<QualityMaskCollection>(
"QualityMasks");
39 auto const&
tracks(*hSrcTrack);
52 auto mvaPairs = std::make_unique<MVAPairCollection>(
tracks.size(), std::make_pair(-99.
f,
true));
53 auto mvas = std::make_unique<MVACollection>(
tracks.size(), -99.f);
54 auto quals = std::make_unique<QualityMaskCollection>(
tracks.size(), 0);
61 <<
"ignoreVertices is set to False in the configuration, but the vertex collection is not valid";
68 for (
auto const&
output : *mvaPairs) {
75 float mva = (*mvas)[
k];
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual void initEvent(const edm::EventSetup &es)=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackMVAClassifierBase(const edm::ParameterSet &cfg)
static void fill(edm::ParameterSetDescription &desc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void computeMVA(reco::TrackCollection const &tracks, reco::BeamSpot const &beamSpot, reco::VertexCollection const &vertices, MVAPairCollection &mvas) const =0
edm::EDGetTokenT< reco::BeamSpot > beamspot_
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
~TrackMVAClassifierBase() override
void produce(edm::Event &evt, const edm::EventSetup &es) final
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::vector< Track > TrackCollection
collection of Tracks