30 template <
class T,
typename C = std::vector<
typename T::ConstituentTypeFwdPtr>>
41 produces<JetsOutput>();
42 produces<ConstituentsOutput>(
"constituents");
48 desc.
add<
edm::InputTag>(
"src")->setComment(
"InputTag used for retrieving jets in event.");
49 desc.
add<
std::string>(
"cut")->setComment(
"Cut used by which to select jets. For example:\n" 50 " \"pt > 100.0 && abs(rapidity()) < 2.4\".");
61 auto jets = std::make_unique<JetsOutput>();
62 auto candsOut = std::make_unique<ConstituentsOutput>();
68 for (
auto const&
jet : *h_jets) {
73 for (
unsigned int ida {}; ida <
jet.numberOfDaughters(); ++ida) {
74 candsOut->emplace_back(
jet.daughterPtr(ida),
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
#define DEFINE_FWK_MODULE(type)
JetConstituentSelector(edm::ParameterSet const ¶ms)
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
std::vector< T > JetsOutput