Public Member Functions | |
bool | filter (edm::Event &evt, const edm::EventSetup &es) |
RecoTauDiscriminatorRefSelectorImpl (const edm::ParameterSet &pset) | |
~RecoTauDiscriminatorRefSelectorImpl () | |
Private Types | |
typedef T::OutputType | OutputType |
Private Attributes | |
double | cut_ |
edm::InputTag | discriminatorSrc_ |
bool | filter_ |
edm::InputTag | src_ |
Definition at line 52 of file PFTauViewRefDiscriminantSelector.cc.
typedef T::OutputType RecoTauDiscriminatorRefSelectorImpl< T >::OutputType [private] |
Definition at line 58 of file PFTauViewRefDiscriminantSelector.cc.
RecoTauDiscriminatorRefSelectorImpl< T >::RecoTauDiscriminatorRefSelectorImpl | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 66 of file PFTauViewRefDiscriminantSelector.cc.
References edm::ParameterSet::getParameter().
{ src_ = pset.getParameter<edm::InputTag>("src"); discriminatorSrc_ = pset.getParameter<edm::InputTag>("discriminator"); cut_ = pset.getParameter<double>("cut"); filter_ = pset.getParameter<bool>("filter"); //produces<reco::PFTauRefVector>(); produces<OutputType>(); }
RecoTauDiscriminatorRefSelectorImpl< T >::~RecoTauDiscriminatorRefSelectorImpl | ( | ) | [inline] |
Definition at line 55 of file PFTauViewRefDiscriminantSelector.cc.
{}
bool RecoTauDiscriminatorRefSelectorImpl< T >::filter | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDFilter.
Definition at line 78 of file PFTauViewRefDiscriminantSelector.cc.
References edm::Event::getByLabel(), collect_tpl::input, reco::modules::make(), convertSQLitetoXML_cfg::output, and edm::Event::put().
{ edm::Handle<reco::CandidateView> input; evt.getByLabel(src_, input); reco::PFTauRefVector inputRefs = reco::tau::castView<reco::PFTauRefVector>(input); edm::Handle<reco::PFTauDiscriminator> disc; evt.getByLabel(discriminatorSrc_, disc); // std::auto_ptr<reco::PFTauRefVector> output( // new reco::PFTauRefVector(inputRefs.id())); //std::auto_ptr<OutputType> output( // new OutputType(inputRefs.id())); std::auto_ptr<OutputType> output(new OutputType); BOOST_FOREACH(reco::PFTauRef ref, inputRefs) { if ( (*disc)[ref] > cut_ ) output->push_back(T::make(ref)); } size_t selected = output->size(); evt.put(output); return (!filter_ || selected); }
double RecoTauDiscriminatorRefSelectorImpl< T >::cut_ [private] |
Definition at line 61 of file PFTauViewRefDiscriminantSelector.cc.
edm::InputTag RecoTauDiscriminatorRefSelectorImpl< T >::discriminatorSrc_ [private] |
Definition at line 60 of file PFTauViewRefDiscriminantSelector.cc.
bool RecoTauDiscriminatorRefSelectorImpl< T >::filter_ [private] |
Definition at line 62 of file PFTauViewRefDiscriminantSelector.cc.
edm::InputTag RecoTauDiscriminatorRefSelectorImpl< T >::src_ [private] |
Definition at line 59 of file PFTauViewRefDiscriminantSelector.cc.