49 hltElectronTag(iConfig.getParameter< edm::InputTag > (
"HltElectronTag")),
50 sourceJetTag(iConfig.getParameter< edm::InputTag > (
"SourceJetTag")),
51 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
53 produces<reco::CaloJetCollection>();
83 std::vector<edm::Ref<reco::RecoEcalCandidateCollection> > clusCands;
85 std::vector<edm::Ref<reco::ElectronCollection> > eleCands;
89 std::vector<TVector3> ElePs;
91 if(!clusCands.empty()){
92 for(
size_t candNr=0;candNr<clusCands.size();candNr++){
93 TVector3 positionVector(
94 clusCands[candNr]->superCluster()->
position().
x(),
95 clusCands[candNr]->superCluster()->
position().
y(),
96 clusCands[candNr]->superCluster()->
position().
z());
97 ElePs.push_back(positionVector);
99 }
else if(!eleCands.empty()){
100 for(
size_t candNr=0;candNr<eleCands.size();candNr++){
101 TVector3 positionVector(
102 eleCands[candNr]->superCluster()->
position().
x(),
103 eleCands[candNr]->superCluster()->
position().
y(),
104 eleCands[candNr]->superCluster()->
position().
z());
105 ElePs.push_back(positionVector);
117 for(
unsigned int j=0;
j<theCaloJetCollection->size();
j++) {
119 isOverlapping =
false;
120 for(
unsigned int i=0;
i<ElePs.size();
i++) {
122 TVector3 JetP((*theCaloJetCollection)[
j].px(), (*theCaloJetCollection)[
j].py(), (*theCaloJetCollection)[
j].pz());
123 double DR = ElePs[
i].DeltaR(JetP);
126 isOverlapping =
true;
131 if(!isOverlapping) theFilteredCaloJetCollection->push_back((*theCaloJetCollection)[
j]);
136 iEvent.
put(theFilteredCaloJetCollection);
#define DEFINE_FWK_MODULE(type)
JetCollectionForEleHT(const edm::ParameterSet &)
static int position[TOTALCHAMBERS][3]
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag sourceJetTag
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag hltElectronTag
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects