18 #include <boost/ptr_container/ptr_vector.hpp>
19 #include <boost/foreach.hpp>
68 typedef std::vector<edm::ParameterSet> VPSet;
70 const VPSet& builders = pset.
getParameter<VPSet>(
"builders");
71 for (VPSet::const_iterator builderPSet = builders.begin();
72 builderPSet != builders.end(); ++builderPSet) {
74 const std::string& pluginType =
75 builderPSet->getParameter<std::string>(
"plugin");
81 const VPSet& modfiers = pset.
getParameter<VPSet>(
"modifiers");
82 for (VPSet::const_iterator modfierPSet = modfiers.begin();
83 modfierPSet != modfiers.end(); ++modfierPSet) {
85 const std::string& pluginType =
86 modfierPSet->getParameter<std::string>(
"plugin");
93 if (pset.
exists(
"outputSelection")) {
95 if (selection !=
"") {
101 produces<reco::PFTauCollection>();
111 reco::tau::castView<reco::PFJetRefVector>(jetView);
118 for (BuilderList::iterator builder =
builders_.begin();
120 builder->setup(evt, es);
122 for (ModifierList::iterator modifier =
modifiers_.begin();
124 modifier->setup(evt, es);
133 const std::vector<reco::RecoTauPiZero>& piZeros = (*piZeroAssoc)[jetRef];
135 unsigned int nTausBuilt = 0;
136 for (BuilderList::const_iterator builder =
builders_.begin();
140 (*builder)(jetRef, piZeros));
143 output->reserve(output->size() + taus.size());
146 output->insert(output->end(), taus.begin(), taus.end());
147 nTausBuilt += taus.size();
153 output->push_back(tau);
162 reco::PFTau nullTau(std::numeric_limits<int>::quiet_NaN(), jetRef->p4());
164 output->push_back(nullTau);
169 for (reco::PFTauCollection::iterator
tau = output->begin();
170 tau != output->end(); ++
tau) {
171 for (ModifierList::const_iterator modifier =
modifiers_.begin();
T getParameter(std::string const &) const
boost::ptr_vector< Modifier > ModifierList
std::vector< PFTau > PFTauCollection
collection of PFTau objects
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
boost::ptr_vector< reco::PFTau > output_type
std::auto_ptr< StringCutObjectSelector< reco::PFTau > > outputSelector_
void setjetRef(const PFJetRef &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
RecoTauProducer(const edm::ParameterSet &pset)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
reco::tau::RecoTauModifierPlugin Modifier
reco::tau::RecoTauBuilderPlugin Builder
void produce(edm::Event &evt, const edm::EventSetup &es)
boost::ptr_vector< Builder > BuilderList
T get(const Candidate &c)