34 template <
class T,
typename C = std::vector<
typename T::ConstituentTypeFwdPtr>>
46 produces<JetsOutput>();
47 produces<ConstituentsOutput>(
"constituents");
53 desc.
add<
edm::InputTag>(
"src")->setComment(
"InputTag used for retrieving jets in event.");
54 desc.
add<
std::string>(
"cut")->setComment(
"Cut used by which to select jets. For example:\n" 55 " \"pt > 100.0 && abs(rapidity()) < 2.4\".");
71 auto jets = std::make_unique<JetsOutput>();
72 auto candsOut = std::make_unique<ConstituentsOutput>();
79 for (
auto const&
jet : *h_jets) {
85 for (
unsigned int ida {}; ida <
jet.numberOfDaughters(); ++ida) {
86 candsOut->emplace_back(
initptr(
jet.daughterPtr(ida)) );
T getParameter(std::string const &) const
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
JetConstituentSelector(edm::ParameterSet const ¶ms)
#define DEFINE_FWK_MODULE(type)
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_
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