84 jetSrc_(iConfig.getParameter<
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);
std::vector< T2 > T2Collection
DEFINE_FWK_MODULE(HiMixingModule)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
HiGenCleaner< reco::GenJet > HiGenJetCleaner
HiGenCleaner(const edm::ParameterSet &)