29 template <
class T,
typename C = std::vector<
typename T::ConstituentTypeFwdPtr>>
40 produces<JetsOutput>();
41 produces<ConstituentsOutput>(
"constituents");
47 desc.
add<
edm::InputTag>(
"src")->setComment(
"InputTag used for retrieving jets in event.");
48 desc.
add<
std::string>(
"cut")->setComment(
"Cut used by which to select jets. For example:\n" 49 " \"pt > 100.0 && abs(rapidity()) < 2.4\".");
50 descriptions.
add(
"JetConsituentSelector", desc);
55 auto jets = std::make_unique<JetsOutput>();
56 auto candsOut = std::make_unique<ConstituentsOutput>();
62 for (
auto const&
jet : *h_jets) {
67 for (
unsigned int ida {}; ida <
jet.numberOfDaughters(); ++ida) {
68 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)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< edm::View< T > > const srcToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
std::vector< T > JetsOutput