32 recHitsToken_(consumes<
EcalRecHitCollection>(iConfig.getParameter< edm::InputTag > (
"recHitsLabel"))),
33 emObjectToken_(consumes<
reco::
PhotonCollection>(iConfig.getParameter< edm::InputTag > (
"emObjectLabel"))),
35 recHitsLabel_(iConfig.getParameter< edm::InputTag > (
"recHitsLabel")),
36 emObjectLabel_(iConfig.getParameter< edm::InputTag > (
"emObjectLabel")),
37 energyCut_(iConfig.getParameter<double>(
"energyCut")),
38 etCut_(iConfig.getParameter<double>(
"etCut")),
39 etCandCut_(iConfig.getParameter<double> (
"etCandCut")),
40 outerRadius_(iConfig.getParameter<double>(
"outerRadius")),
41 innerRadius_(iConfig.getParameter<double>(
"innerRadius")),
42 interestingDetIdCollection_(iConfig.getParameter<std::
string>(
"interestingDetIdCollection"))
45 const std::vector<std::string> flagnamesEB =
46 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
48 const std::vector<std::string> flagnamesEE =
49 iConfig.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
52 StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
55 StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
57 const std::vector<std::string> severitynamesEB =
58 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
61 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
63 const std::vector<std::string> severitynamesEE =
64 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
67 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
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 doubleConeSel_->selectCallback(pclu, *recHitsH, [&](
const EcalRecHit& recHitRef) {
124 double et = recIt->
energy() *
125 caloGeom->getPosition(recIt->
detid()).
perp() /
126 caloGeom->getPosition(recIt->
detid()).
mag();
130 bool isBarrel =
false;
131 if (fabs(caloGeom->getPosition(recIt->
detid()).
eta() < 1.479))
134 int severityFlag = sevLevel->severityLevel(recIt->
detid(), *recHitsH);
135 std::vector<int>::const_iterator sit;
146 std::vector<int>::const_iterator vit;
169 if(
std::find(detIdCollection->begin(),detIdCollection->end(),recIt->
detid()) == detIdCollection->end())
170 detIdCollection->push_back(recIt->
detid());
175 delete doubleConeSel_;
T getParameter(std::string const &) const
std::vector< int > flagsexclEE_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const DetId & detid() const
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_
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
std::vector< Photon > PhotonCollection
collectin of Photon objects
GamIsoDetIdCollectionProducer(const edm::ParameterSet &)
ctor
std::vector< int > flagsexclEB_
~GamIsoDetIdCollectionProducer()
T perp() const
Magnitude of transverse component.
edm::EDGetTokenT< reco::PhotonCollection > emObjectToken_
edm::EDCollection< DetId > DetIdCollection
std::vector< int > severitiesexclEE_