32 recHitsLabel_(iConfig.getParameter< edm::InputTag > (
"recHitsLabel")),
33 emObjectLabel_(iConfig.getParameter< edm::InputTag > (
"emObjectLabel")),
34 energyCut_(iConfig.getParameter<double>(
"energyCut")),
35 etCut_(iConfig.getParameter<double>(
"etCut")),
36 etCandCut_(iConfig.getParameter<double> (
"etCandCut")),
37 outerRadius_(iConfig.getParameter<double>(
"outerRadius")),
38 innerRadius_(iConfig.getParameter<double>(
"innerRadius")),
39 interestingDetIdCollection_(iConfig.getParameter<std::string>(
"interestingDetIdCollection")),
40 severityLevelCut_(iConfig.getParameter<int>(
"severityLevelCut")),
44 v_chstatus_(iConfig.getParameter<std::vector<int> >(
"recHitFlagsToBeExcluded")) {
75 std::auto_ptr<CaloRecHitMetaCollectionV> recHits_(0);
97 std::auto_ptr< DetIdCollection > detIdCollection (
new DetIdCollection() ) ;
99 reco::PhotonCollection::const_iterator emObj;
101 for (emObj = emObjectH->begin(); emObj != emObjectH->end(); emObj++) {
105 GlobalPoint pclu (emObj->caloPosition().x(),emObj->caloPosition().y(),emObj->caloPosition().z());
106 std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*recHits_);
109 for (recIt = chosen->begin(); recIt!= chosen->end () ; ++recIt) {
113 double et = recIt->
energy() *
114 caloGeom->getPosition(recIt->
detid()).
perp() /
115 caloGeom->getPosition(recIt->
detid()).
mag();
117 if ( fabs(et) <
etCut_)
continue;
141 if(
std::find(detIdCollection->begin(),detIdCollection->end(),recIt->
detid()) == detIdCollection->end())
142 detIdCollection->push_back(recIt->
detid());
147 delete doubleConeSel_;
const DetId & detid() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::InputTag emObjectLabel_
std::string interestingDetIdCollection_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag recHitsLabel_
std::vector< int > v_chstatus_
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
~GamIsoDetIdCollectionProducer()
T perp() const
Magnitude of transverse component.
edm::EDCollection< DetId > DetIdCollection