66 jetSrc_(consumes<edm::
View<T2> >(iConfig.getParameter<edm::
InputTag>(
"src"))),
67 deltaR_(iConfig.getParameter<double>(
"deltaR")),
68 ptCut_(iConfig.getParameter<double>(
"ptCut")),
69 makeNew_(iConfig.getUntrackedParameter<bool>(
"createNewCollection",
true)),
70 fillDummy_(iConfig.getUntrackedParameter<bool>(
"fillDummyEntries",
true))
73 produces<T2Collection>().setBranchAlias (alias);
96 auto_ptr<T2Collection>
jets;
102 int jetsize = genjets->size();
105 for(
int ijet = 0; ijet < jetsize; ++ijet){
109 vector<int> selectedIndices;
110 vector<int> removedIndices;
112 for(
int ijet = 0; ijet < jetsize; ++ijet){
114 const T2* jet1 = &((*genjets)[ijet]);
118 for(
int ijet2 = 0; ijet2 < jetsize; ++ijet2){
120 if(ijet2 == ijet)
continue;
122 const T2* jet2 = &((*genjets)[ijet2]);
125 if(jet1->et() < jet2->et()){
127 removedIndices.push_back(ijet);
131 removedIndices.push_back(ijet2);
137 double etjet = ((*genjets)[ijet]).et();
139 if(
selection[ijet] == 1 && etjet > ptCut_){
140 selectedIndices.push_back(ijet);
141 jets->push_back(*jet1);
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< T2 > T2Collection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &) override
double deltaR(double eta1, double eta2, double phi1, double phi2)
HiGenCleaner(const edm::ParameterSet &)