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);
92 std::auto_ptr<CaloRecHitMetaCollectionV> recHits_(0);
110 std::auto_ptr< DetIdCollection > detIdCollection (
new DetIdCollection() ) ;
112 reco::PhotonCollection::const_iterator emObj;
114 for (emObj = emObjectH->begin(); emObj != emObjectH->end(); emObj++) {
118 GlobalPoint pclu (emObj->caloPosition().x(),emObj->caloPosition().y(),emObj->caloPosition().z());
119 std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*recHits_);
122 for (recIt = chosen->begin(); recIt!= chosen->end () ; ++recIt) {
126 double et = recIt->
energy() *
127 caloGeom->getPosition(recIt->
detid()).
perp() /
128 caloGeom->getPosition(recIt->
detid()).
mag();
130 if ( et <
etCut_)
continue;
132 bool isBarrel =
false;
133 if (fabs(caloGeom->getPosition(recIt->
detid()).
eta() < 1.479))
136 int severityFlag = sevLevel->severityLevel(recIt->
detid(), *recHitsH);
137 std::vector<int>::const_iterator sit;
148 std::vector<int>::const_iterator vit;
171 if(
std::find(detIdCollection->begin(),detIdCollection->end(),recIt->
detid()) == detIdCollection->end())
172 detIdCollection->push_back(recIt->
detid());
177 delete doubleConeSel_;
T getParameter(std::string const &) const
std::vector< int > flagsexclEE_
const DetId & detid() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::InputTag emObjectLabel_
std::vector< int > severitiesexclEB_
std::string interestingDetIdCollection_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag recHitsLabel_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
GamIsoDetIdCollectionProducer(const edm::ParameterSet &)
ctor
std::vector< int > flagsexclEB_
~GamIsoDetIdCollectionProducer()
T perp() const
Magnitude of transverse component.
edm::EDCollection< DetId > DetIdCollection
std::vector< int > severitiesexclEE_