![]() |
![]() |
#include <MCTruthPairSelector.h>
Static Public Member Functions | |
static helpers::MCTruthPairSelector < T > | make (const edm::ParameterSet &cfg) |
Definition at line 44 of file MCTruthPairSelector.h.
static helpers::MCTruthPairSelector<T> reco::modules::ParameterAdapter< helpers::MCTruthPairSelector< T > >::make | ( | const edm::ParameterSet & | cfg | ) | [inline, static] |
Definition at line 45 of file MCTruthPairSelector.h.
References spr::find(), newFWLiteAna::found, and gen::vint.
{ const std::string matchPDGId( "matchPDGId" ); const std::string checkCharge( "checkCharge" ); bool ck = false; std::vector<std::string> bools = cfg.template getParameterNamesForType<bool>(); bool found = find( bools.begin(), bools.end(), checkCharge ) != bools.end(); if (found) ck = cfg.template getParameter<bool>( checkCharge ); typedef std::vector<int> vint; std::vector<std::string> ints = cfg.template getParameterNamesForType<vint>(); found = find( ints.begin(), ints.end(), matchPDGId ) != ints.end(); if ( found ) { vint ids = cfg.template getParameter<vint>( matchPDGId ); return helpers::MCTruthPairSelector<T>( ids.begin(), ids.end(), ck ); } else { return helpers::MCTruthPairSelector<T>( ck ); } }