32 recHitsToken_(consumes<
EcalRecHitCollection>(iConfig.getParameter<edm::InputTag > (
"recHitsLabel"))),
34 recHitsLabel_(iConfig.getParameter< edm::InputTag > (
"recHitsLabel")),
35 emObjectLabel_(iConfig.getParameter< edm::InputTag > (
"emObjectLabel")),
36 energyCut_(iConfig.getParameter<double>(
"energyCut")),
37 etCut_(iConfig.getParameter<double>(
"etCut")),
38 etCandCut_(iConfig.getParameter<double> (
"etCandCut")),
39 outerRadius_(iConfig.getParameter<double>(
"outerRadius")),
40 innerRadius_(iConfig.getParameter<double>(
"innerRadius")),
41 interestingDetIdCollection_(iConfig.getParameter<std::
string>(
"interestingDetIdCollection"))
44 const std::vector<std::string> flagnamesEB =
45 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
47 const std::vector<std::string> flagnamesEE =
48 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
51 StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
54 StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
56 const std::vector<std::string> severitynamesEB =
57 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
60 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
62 const std::vector<std::string> severitynamesEE =
63 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
66 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
111 std::auto_ptr< DetIdCollection > detIdCollection (
new DetIdCollection() ) ;
113 reco::GsfElectronCollection::const_iterator emObj;
115 for (emObj = emObjectH->begin(); emObj != emObjectH->end(); emObj++) {
119 GlobalPoint pclu (emObj->caloPosition().x(),emObj->caloPosition().y(),emObj->caloPosition().z());
120 doubleConeSel_->selectCallback(pclu, *recHitsH, [&](
const EcalRecHit& recIt) {
124 double et = recIt.
energy() *
125 caloGeom->getPosition(recIt.
detid()).
perp() /
126 caloGeom->getPosition(recIt.
detid()).
mag();
128 bool isBarrel =
false;
129 if (fabs(caloGeom->getPosition(recIt.
detid()).
eta() < 1.479))
135 std::vector<int>::const_iterator sit;
136 int severityFlag = sevLevel->severityLevel(recIt.
detid(), *recHitsH);
147 std::vector<int>::const_iterator vit;
170 if (
std::find(detIdCollection->begin(),detIdCollection->end(),recIt.
detid()) == detIdCollection->end())
171 detIdCollection->push_back(recIt.
detid());
176 delete doubleConeSel_;
edm::InputTag recHitsLabel_
T getParameter(std::string const &) const
bool checkFlags(const std::vector< int > &flagsvec) const
check if one of the flags in a set is true
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const DetId & detid() const
~EleIsoDetIdCollectionProducer()
EleIsoDetIdCollectionProducer(const edm::ParameterSet &)
ctor
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< int > flagsexclEE_
bool checkFlag(int flag) const
check if the flag is true
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< int > severitiesexclEE_
T perp() const
Magnitude of transverse component.
edm::EDGetToken emObjectToken_
edm::EDGetToken recHitsToken_
std::vector< int > flagsexclEB_
edm::EDCollection< DetId > DetIdCollection
std::string interestingDetIdCollection_
std::vector< int > severitiesexclEB_