49 hltElectronTag(iConfig.getParameter< edm::InputTag > (
"HltElectronTag")),
50 sourceJetTag(iConfig.getParameter< edm::InputTag > (
"SourceJetTag")),
51 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
53 produces<reco::CaloJetCollection>();
71 desc.
add<
double>(
"minDeltaR",0.5);
72 descriptions.
add(
"hltJetCollectionForEleHT",desc);
91 std::vector<edm::Ref<reco::RecoEcalCandidateCollection> > clusCands;
93 std::vector<edm::Ref<reco::ElectronCollection> > eleCands;
97 std::vector<TVector3> ElePs;
99 if(!clusCands.empty()){
100 for(
size_t candNr=0;candNr<clusCands.size();candNr++){
101 TVector3 positionVector(
102 clusCands[candNr]->superCluster()->
position().
x(),
103 clusCands[candNr]->superCluster()->
position().
y(),
104 clusCands[candNr]->superCluster()->
position().
z());
105 ElePs.push_back(positionVector);
107 }
else if(!eleCands.empty()){
108 for(
size_t candNr=0;candNr<eleCands.size();candNr++){
109 TVector3 positionVector(
110 eleCands[candNr]->superCluster()->
position().
x(),
111 eleCands[candNr]->superCluster()->
position().
y(),
112 eleCands[candNr]->superCluster()->
position().
z());
113 ElePs.push_back(positionVector);
125 for(
unsigned int j=0;
j<theCaloJetCollection->size();
j++) {
127 isOverlapping =
false;
128 for(
unsigned int i=0;
i<ElePs.size();
i++) {
130 TVector3 JetP((*theCaloJetCollection)[
j].px(), (*theCaloJetCollection)[
j].py(), (*theCaloJetCollection)[
j].pz());
131 double DR = ElePs[
i].DeltaR(JetP);
134 isOverlapping =
true;
139 if(!isOverlapping) theFilteredCaloJetCollection->push_back((*theCaloJetCollection)[
j]);
144 iEvent.
put(theFilteredCaloJetCollection);
#define DEFINE_FWK_MODULE(type)
JetCollectionForEleHT(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag sourceJetTag
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &, const edm::EventSetup &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static int position[264][3]
edm::InputTag hltElectronTag
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects