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];
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
virtual void computeMVA(reco::TrackCollection const &tracks, reco::BeamSpot const &beamSpot, reco::VertexCollection const &vertices, MVAPairCollection &mvas) const =0
std::vector< Track > TrackCollection
collection of Tracks
static void fill(edm::ParameterSetDescription &desc)
auto const & tracks
cannot be loose
~TrackMVAClassifierBase() override
std::vector< Vertex > VertexCollection
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
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)
T getParameter(std::string const &) const
Log< level::Warning, false > LogWarning