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")) {
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");
49 flagsexclEB_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
51 flagsexclEE_ = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
53 const std::vector<std::string> severitynamesEB =
54 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEB");
56 severitiesexclEB_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEB);
58 const std::vector<std::string> severitynamesEE =
59 iConfig.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcludedEE");
61 severitiesexclEE_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesEE);
99 auto detIdCollection = std::make_unique<DetIdCollection>();
101 reco::PhotonCollection::const_iterator emObj;
102 if (doubleConeSel_) {
103 for (emObj = emObjectH->begin(); emObj != emObjectH->end(); emObj++) {
108 GlobalPoint pclu(emObj->caloPosition().x(), emObj->caloPosition().y(), emObj->caloPosition().z());
126 std::vector<int>::const_iterator sit;
153 if (
std::find(detIdCollection->begin(), detIdCollection->end(), recIt->
detid()) == detIdCollection->end())
154 detIdCollection->push_back(recIt->
detid());
159 delete doubleConeSel_;
T getParameter(std::string const &) const
std::vector< int > flagsexclEE_
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())
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_
~GamIsoDetIdCollectionProducer() override
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
bool checkFlag(int flag) const
check if the flag is true
void produce(edm::Event &, const edm::EventSetup &) override
producer
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
std::vector< Photon > PhotonCollection
collectin of Photon objects
GamIsoDetIdCollectionProducer(const edm::ParameterSet &)
ctor
void selectCallback(double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
std::vector< int > flagsexclEB_
T perp() const
Magnitude of transverse component.
edm::EDGetTokenT< reco::PhotonCollection > emObjectToken_
T const * product() const
std::vector< int > severitiesexclEE_