31 template <
class T,
typename C = std::vector<
typename T::ConstituentTypeFwdPtr>>
41 produces<JetsOutput>();
42 produces<ConstituentsOutput>(
"constituents");
47 desc.
add<
edm::InputTag>(
"src")->setComment(
"InputTag used for retrieving jets in event.");
49 "Cut used by which to select jets. For example:\n"
50 " \"pt > 100.0 && abs(rapidity()) < 2.4\".");
65 auto jets = std::make_unique<JetsOutput>();
66 auto candsOut = std::make_unique<ConstituentsOutput>();
72 for (
auto const&
jet : *h_jets) {
78 for (
unsigned int ida{}; ida <
jet.numberOfDaughters(); ++ida) {
79 candsOut->emplace_back(
initptr(
jet.daughterPtr(ida)));
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
StringCutObjectSelector< T > const selector_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
JetConstituentSelector(edm::ParameterSet const ¶ms)
Container::value_type value_type
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< edm::View< T > > const srcToken_
T getParameter(std::string const &) const
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
typename C::value_type ValueType
std::vector< T > JetsOutput
ConstituentsOutput::value_type const initptr(edm::Ptr< reco::Candidate > const &dau) const