33 recHitsLabel_(iConfig.getParameter< edm::InputTag > (
"recHitsLabel")),
34 emObjectLabel_(iConfig.getParameter< edm::InputTag > (
"emObjectLabel")),
35 energyCut_(iConfig.getParameter<double>(
"energyCut")),
36 etCut_(iConfig.getParameter<double>(
"etCut")),
37 etCandCut_(iConfig.getParameter<double> (
"etCandCut")),
38 outerRadius_(iConfig.getParameter<double>(
"outerRadius")),
39 innerRadius_(iConfig.getParameter<double>(
"innerRadius")),
40 interestingDetIdCollection_(iConfig.getParameter<std::
string>(
"interestingDetIdCollection"))
43 const std::vector<std::string> flagnamesEB =
44 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
46 const std::vector<std::string> flagnamesEE =
47 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
50 StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
53 StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
55 const std::vector<std::string> severitynamesEB =
56 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
59 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
61 const std::vector<std::string> severitynamesEE =
62 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
65 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
90 std::auto_ptr<CaloRecHitMetaCollectionV> recHits_(0);
112 std::auto_ptr< DetIdCollection > detIdCollection (
new DetIdCollection() ) ;
114 reco::GsfElectronCollection::const_iterator emObj;
116 for (emObj = emObjectH->begin(); emObj != emObjectH->end(); emObj++) {
120 GlobalPoint pclu (emObj->caloPosition().x(),emObj->caloPosition().y(),emObj->caloPosition().z());
121 std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*recHits_);
124 for (recIt = chosen->begin(); recIt!= chosen->end () ; ++recIt) {
129 double et = recIt->
energy() *
130 caloGeom->getPosition(recIt->
detid()).
perp() /
131 caloGeom->getPosition(recIt->
detid()).
mag();
133 bool isBarrel =
false;
134 if (fabs(caloGeom->getPosition(recIt->
detid()).
eta() < 1.479))
140 std::vector<int>::const_iterator sit;
141 int severityFlag = sevLevel->severityLevel(recIt->
detid(), *recHitsH);
152 std::vector<int>::const_iterator vit;
175 if(
std::find(detIdCollection->begin(),detIdCollection->end(),recIt->
detid()) == detIdCollection->end())
176 detIdCollection->push_back(recIt->
detid());
181 delete doubleConeSel_;
edm::InputTag recHitsLabel_
T getParameter(std::string const &) const
const DetId & detid() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
~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< int > flagsexclEE_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< int > severitiesexclEE_
edm::InputTag emObjectLabel_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T perp() const
Magnitude of transverse component.
std::vector< int > flagsexclEB_
edm::EDCollection< DetId > DetIdCollection
std::string interestingDetIdCollection_
std::vector< int > severitiesexclEB_