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 auto detIdCollection = std::make_unique<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());
135 std::vector<int>::const_iterator sit;
163 if (
std::find(detIdCollection->begin(),detIdCollection->end(),recIt.
detid()) == detIdCollection->end())
164 detIdCollection->push_back(recIt.
detid());
169 delete doubleConeSel_;
edm::InputTag recHitsLabel_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
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())
bool isBarrel(GeomDetEnumerators::SubDetector m)
const DetId & detid() const
EleIsoDetIdCollectionProducer(const edm::ParameterSet &)
ctor
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_
~EleIsoDetIdCollectionProducer() override
bool checkFlag(int flag) const
check if the flag is true
std::vector< int > severitiesexclEE_
void produce(edm::Event &, const edm::EventSetup &) override
producer
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
et
define resolution functions of each parameter
void selectCallback(double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
T perp() const
Magnitude of transverse component.
edm::EDGetToken emObjectToken_
edm::EDGetToken recHitsToken_
std::vector< int > flagsexclEB_
std::string interestingDetIdCollection_
T const * product() const
std::vector< int > severitiesexclEB_