59 superClustersToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"superClustersLabel"))},
60 elesToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"elesLabel"))},
61 phosToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"phosLabel"))},
62 hcalHitSelector_(iConfig.getParameter<
edm::ParameterSet>(
"hitSelection"), consumesCollector()) {
63 minSCEt_ = iConfig.getParameter<
double>(
"minSCEt");
64 minEleEt_ = iConfig.getParameter<
double>(
"minEleEt");
65 minPhoEt_ = iConfig.getParameter<
double>(
"minPhoEt");
67 interestingDetIdCollection_ = iConfig.getParameter<
std::string>(
"interestingDetIdCollection");
70 produces<DetIdCollection>(interestingDetIdCollection_);
79 desc.add<
double>(
"minSCEt", 20);
80 desc.add<
double>(
"minEleEt", 20);
81 desc.add<
double>(
"minPhoEt", 20);
84 descriptions.
add((
"interestingGedEgammaIsoHCALDetId"),
desc);
98 std::vector<DetId> indexToStore;
99 indexToStore.reserve(100);
102 for (
auto& ele : *
eles) {
103 float scEt = ele.superCluster()->energy() *
std::sin(ele.superCluster()->position().theta());
109 if (phos.isValid() &&
recHits.isValid()) {
110 for (
auto& pho : *phos) {
111 float scEt = pho.superCluster()->energy() *
std::sin(pho.superCluster()->position().theta());
119 float scEt = sc.energy() *
std::sin(sc.position().theta());
127 std::sort(indexToStore.begin(), indexToStore.end());
128 std::unique(indexToStore.begin(), indexToStore.end());
130 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
void setup(const edm::EventSetup &iSetup)
void produce(edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &, const edm::EventSetup &) final
std::string interestingDetIdCollection_
void addDetIds(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, CollType &detIdsToStore) const
def unique(seq, keepstr=True)
const edm::EDGetTokenT< reco::GsfElectronCollection > elesToken_
static edm::ParameterSetDescription makePSetDescription()
void add(std::string const &label, ParameterSetDescription const &psetDescription)
EgammaIsoHcalDetIdCollectionProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< reco::PhotonCollection > phosToken_
EGHcalRecHitSelector hcalHitSelector_
const edm::EDGetTokenT< HBHERecHitCollection > recHitsToken_