18 desc.
add<
bool>(
"ignoreVertices",
false);
22 std::vector<double>
cuts = {-.7, 0.1, .7};
23 desc.
add<std::vector<double>>(
"qualityCuts",
cuts);
38 auto const & qv = cfg.
getParameter<std::vector<double>>(
"qualityCuts");
42 produces<MVACollection>(
"MVAValues");
43 produces<QualityMaskCollection>(
"QualityMasks");
52 auto const &
tracks(*hSrcTrack);
66 forest = forestHandle.
product();
70 auto mvas = std::make_unique<MVACollection>(
tracks.size(),-99.f);
71 auto quals = std::make_unique<QualityMaskCollection>(
tracks.size(),0);
77 edm::LogWarning(
"TrackMVAClassifierBase") <<
"ignoreVertices is set to False in the configuration, but the vertex collection is not valid";
81 assert((*mvas).size()==
tracks.size());
84 for (
auto mva : *
mvas) {
T getParameter(std::string const &) const
void beginStream(edm::StreamID) override final
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackMVAClassifierBase(const edm::ParameterSet &cfg)
void produce(edm::Event &evt, const edm::EventSetup &es) override final
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::TrackCollection > src_
source collection label
const std::string forestLabel_
const std::string dbFileName_
std::vector< Track > TrackCollection
collection of Tracks
static void fill(edm::ParameterSetDescription &desc)
std::vector< Vertex > VertexCollection
collection of Vertex objects
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void computeMVA(reco::TrackCollection const &tracks, reco::BeamSpot const &beamSpot, reco::VertexCollection const &vertices, GBRForest const *forestP, MVACollection &mvas) const =0
edm::EDGetTokenT< reco::BeamSpot > beamspot_
const bool useForestFromDB_
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::unique_ptr< GBRForest > forest_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
~TrackMVAClassifierBase()
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
T const * product() const