84 jetSrc_(consumes<edm::
View<T2> >(iConfig.getParameter<edm::
InputTag>(
"src"))),
85 deltaR_(iConfig.getParameter<double>(
"deltaR")),
86 ptCut_(iConfig.getParameter<double>(
"ptCut")),
87 makeNew_(iConfig.getUntrackedParameter<bool>(
"createNewCollection",
true)),
88 fillDummy_(iConfig.getUntrackedParameter<bool>(
"fillDummyEntries",
true))
91 produces<T2Collection>().setBranchAlias (alias);
112 using namespace reco;
114 auto_ptr<T2Collection>
jets;
120 int jetsize = genjets->size();
123 for(
int ijet = 0; ijet < jetsize; ++ijet){
127 vector<int> selectedIndices;
128 vector<int> removedIndices;
130 for(
int ijet = 0; ijet < jetsize; ++ijet){
132 const T2* jet1 = &((*genjets)[ijet]);
136 for(
int ijet2 = 0; ijet2 < jetsize; ++ijet2){
138 if(ijet2 == ijet)
continue;
140 const T2* jet2 = &((*genjets)[ijet2]);
143 if(jet1->et() < jet2->et()){
145 removedIndices.push_back(ijet);
149 removedIndices.push_back(ijet2);
155 double etjet = ((*genjets)[ijet]).et();
157 if(
selection[ijet] == 1 && etjet > ptCut_){
158 selectedIndices.push_back(ijet);
159 jets->push_back(*jet1);
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< T2 > T2Collection
edm::EDGetTokenT< edm::View< T2 > > jetSrc_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HiGenCleaner< reco::GenParticle > HiPartonCleaner
virtual void produce(edm::Event &, const edm::EventSetup &) override
double deltaR(double eta1, double eta2, double phi1, double phi2)
HiGenCleaner< reco::GenJet > HiGenJetCleaner
HiGenCleaner(const edm::ParameterSet &)