Definition at line 138 of file TauDiscriminantCutMultiplexer.cc.
References category, gather_cfg::cout, GOODCOLL_filter_cfg::cut, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::cuts_, DeDxTools::esConsumes(), Exception, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), mps_fire::i, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::inputFileName_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::DiscriminantCutEntry::kFixedCut, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::DiscriminantCutEntry::kVariableCut, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::loadMVAfromDB_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::moduleLabel_, eostools::move(), TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::mvaOutputNormalizationName_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::n_raws_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::raw_category_idx_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::raw_discriminator_idx_, AlCaHLTBitMon_QueryRunRegistry::string, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::toMultiplex_, TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::toMultiplex_token, parallelization::uint(), TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::verbosity_, HistogramManager_cfi::VPSet(), and MuTauSkim_cff::workingPoints.
152 if (!loadMVAfromDB_) {
154 }
else if (not mvaOutputNormalizationName_.empty()) {
161 typedef std::vector<edm::ParameterSet>
VPSet;
162 typedef std::vector<std::string> VString;
163 typedef std::vector<double> VDouble;
164 VString rawValueConfig =
cfg.getParameter<VString>(
"rawValues");
165 for (
uint i = 0;
i < rawValueConfig.size();
i++) {
166 if (rawValueConfig[
i] ==
"discriminator")
168 else if (rawValueConfig[
i] ==
"category")
172 <<
" Configuration Parameter 'rawValues' containes unknown values. Must be 'discriminator' or 'category'!!\n";
174 n_raws_ = rawValueConfig.size();
175 VPSet mapping =
cfg.getParameter<VPSet>(
"mapping");
176 for (
auto const& mappingEntry : mapping) {
177 unsigned category = mappingEntry.getParameter<uint32_t>(
"category");
178 std::vector<std::unique_ptr<DiscriminantCutEntry>> cutWPs;
180 bool localWPs =
false;
181 bool wpsAsDouble =
false;
182 if (mappingEntry.exists(
"workingPoints")) {
184 if (mappingEntry.existsAs<VDouble>(
"workingPoints")) {
186 }
else if (mappingEntry.existsAs<VString>(
"workingPoints")) {
190 <<
" Configuration Parameter 'workingPoints' must be filled with cms.string or cms.double!!\n";
192 }
else if (
cfg.exists(
"workingPoints")) {
194 if (
cfg.existsAs<VDouble>(
"workingPoints")) {
196 }
else if (
cfg.existsAs<VString>(
"workingPoints")) {
200 <<
" Configuration Parameter 'workingPoints' must be filled with cms.string or cms.double!!\n";
204 <<
" Undefined Configuration Parameter 'workingPoints' !!\n";
209 workingPoints = mappingEntry.getParameter<VDouble>(
"workingPoints");
211 workingPoints =
cfg.getParameter<VDouble>(
"workingPoints");
212 for (
auto const& wp : workingPoints) {
213 std::unique_ptr<DiscriminantCutEntry>
cut{
new DiscriminantCutEntry()};
221 workingPoints = mappingEntry.getParameter<VString>(
"workingPoints");
223 workingPoints =
cfg.getParameter<VString>(
"workingPoints");
224 for (
auto const& wp : workingPoints) {
225 std::unique_ptr<DiscriminantCutEntry>
cut{
new DiscriminantCutEntry()};
226 cut->cutName_ = categoryname + wp;
227 if (loadMVAfromDB_) {
239 verbosity_ =
cfg.getParameter<
int>(
"verbosity");
edm::EDGetTokenT< reco::TauDiscriminatorContainer > toMultiplex_token
edm::ESGetToken< PhysicsTFormulaPayload, PhysicsTFormulaPayloadRcd > formulaToken_
static const char category[]
edm::InputTag toMultiplex_
std::unique_ptr< const TFormula > mvaOutput_normalization_
int raw_discriminator_idx_
std::string mvaOutputNormalizationName_
edm::FileInPath inputFileName_