64 : jetSrc_(consumes<edm::
View<T2> >(iConfig.getParameter<edm::
InputTag>(
"src"))),
65 deltaR_(iConfig.getParameter<double>(
"deltaR")),
66 ptCut_(iConfig.getParameter<double>(
"ptCut")),
67 makeNew_(iConfig.getUntrackedParameter<bool>(
"createNewCollection",
true)),
68 fillDummy_(iConfig.getUntrackedParameter<bool>(
"fillDummyEntries",
true)) {
70 produces<T2Collection>().setBranchAlias(alias);
89 auto jets = std::make_unique<T2Collection>();
94 int jetsize = genjets->size();
98 for (
int ijet = 0; ijet < jetsize; ++ijet) {
102 vector<int> selectedIndices;
103 vector<int> removedIndices;
105 for (
int ijet = 0; ijet < jetsize; ++ijet) {
106 const T2* jet1 = &((*genjets)[ijet]);
110 for (
int ijet2 = 0; ijet2 < jetsize; ++ijet2) {
114 const T2* jet2 = &((*genjets)[ijet2]);
116 if (
Geom::deltaR(jet1->momentum(), jet2->momentum()) < deltaR_) {
117 if (jet1->et() < jet2->et()) {
119 removedIndices.push_back(ijet);
123 removedIndices.push_back(ijet2);
129 double etjet = ((*genjets)[ijet]).et();
131 if (
selection[ijet] == 1 && etjet > ptCut_) {
132 selectedIndices.push_back(ijet);
133 jets->push_back(*jet1);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T getParameter(std::string const &) const
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
HiGenCleaner(const edm::ParameterSet &)