20 std::vector<double>
cuts = {-.7, 0.1, .7};
21 desc.
add<std::vector<double>>(
"qualityCuts",
cuts);
31 forestLabel_(cfg.getParameter<std::
string>(
"GBRForestLabel")),
32 dbFileName_(cfg.getParameter<std::
string>(
"GBRForestFileName")),
33 useForestFromDB_( (!forestLabel_.
empty()) & dbFileName_.
empty()) {
35 auto const & qv = cfg.
getParameter<std::vector<double>>(
"qualityCuts");
39 produces<MVACollection>(
"MVAValues");
40 produces<QualityMaskCollection>(
"QualityMasks");
49 auto const &
tracks(*hSrcTrack);
64 forest = forestHandle.
product();
68 auto mvas = std::make_unique<MVACollection>(
tracks.size(),-99.f);
69 auto quals = std::make_unique<QualityMaskCollection>(
tracks.size(),0);
77 for (
auto mva : *mvas) {
T getParameter(std::string const &) const
TrackMVAClassifierBase(const edm::ParameterSet &cfg)
virtual void computeMVA(reco::TrackCollection const &tracks, reco::BeamSpot const &beamSpot, reco::VertexCollection const &vertices, GBRForest const *forestP, MVACollection &mvas) const =0
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
void produce(edm::Event &evt, const edm::EventSetup &es) overridefinal
void beginStream(edm::StreamID) overridefinal
edm::EDGetTokenT< reco::BeamSpot > beamspot_
const bool useForestFromDB_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::VertexCollection > vertices_
std::unique_ptr< GBRForest > forest_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
~TrackMVAClassifierBase()