27 if (it != recHits.
end())
28 return (*it).energy();
38 if (it != recHits.
end())
48 : EgammaCandidateCollection_(
50 EgammaGsfTrackCollection_(
62 egammaPtCut(iConfig.getParameter<double>(
"egammaPtCut")),
63 egammaEtaCut(iConfig.getParameter<double>(
"egammaEtaCut")),
71 produces<Run3ScoutingElectronCollection>();
72 produces<Run3ScoutingPhotonCollection>();
82 auto outElectrons = std::make_unique<Run3ScoutingElectronCollection>();
83 auto outPhotons = std::make_unique<Run3ScoutingPhotonCollection>();
189 for (
auto& candidate : *EgammaCandidateCollection) {
206 Cluster2ndMoments moments = EcalClusterTools::cluster2ndMoments(*SCseed, *rechits);
207 float sMin = moments.
sMin;
208 float sMaj = moments.
sMaj;
210 uint32_t seedId = (*SCseed).seed();
212 std::vector<DetId> mDetIds = EcalClusterTools::matrixDetId((topology), (*SCseed).seed(),
rechitMatrixSize);
214 int detSize = mDetIds.size();
215 std::vector<uint32_t> mDetIdIds(detSize, 0);
216 std::vector<float> mEnergies(detSize, 0.);
217 std::vector<float> mTimes(detSize, 0.);
219 for (
int i = 0;
i < detSize;
i++) {
220 mDetIdIds[
i] = mDetIds[
i];
228 if (candidate.superCluster()->energy() != 0.)
229 HoE = (*HoverEMap)[candidateRef] / candidate.superCluster()->energy();
234 for (
auto&
track : *EgammaGsfTrackCollection) {
239 if (scRefFromTrk == scRef) {
242 charge =
track.charge();
245 if (charge == -999) {
246 outPhotons->emplace_back(candidate.pt(),
250 (*SigmaIEtaIEtaMap)[candidateRef],
252 (*EcalPFClusterIsoMap)[candidateRef],
253 (*HcalPFClusterIsoMap)[candidateRef],
255 (*R9Map)[candidateRef],
263 outElectrons->emplace_back(candidate.pt(),
269 (*DetaMap)[candidateRef],
270 (*DphiMap)[candidateRef],
271 (*SigmaIEtaIEtaMap)[candidateRef],
273 (*OneOEMinusOneOPMap)[candidateRef],
274 (*MissingHitsMap)[candidateRef],
276 (*EcalPFClusterIsoMap)[candidateRef],
277 (*HcalPFClusterIsoMap)[candidateRef],
278 (*EleGsfTrackIsoMap)[candidateRef],
279 (*R9Map)[candidateRef],
309 desc.
add<
double>(
"egammaPtCut", 4.0);
310 desc.
add<
double>(
"egammaEtaCut", 2.5);
311 desc.
add<
double>(
"egammaHoverECut", 1.0);
312 desc.
add<
bool>(
"saveRecHitTiming",
false);
313 desc.
add<
int>(
"mantissaPrecision", 10)->setComment(
"default float16, change to 23 for float32");
314 desc.
add<
int>(
"rechitMatrixSize", 10);
317 descriptions.
add(
"hltScoutingEgammaProducer", desc);
helper::MatcherGetRef< C >::ref_type getRef(const Handle< C > &c, size_t k)
const int mantissaPrecision
const edm::EDGetTokenT< RecoEcalCandMap > SigmaIEtaIEtaMap_
const edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEE_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< RecoEcalCandMap > R9Map_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
const edm::EDGetTokenT< reco::GsfTrackCollection > EgammaGsfTrackCollection_
const edm::EDGetTokenT< RecoEcalCandMap > EleGsfTrackIsoMap_
const edm::EDGetTokenT< RecoEcalCandMap > HoverEMap_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > EgammaCandidateCollection_
bool getData(T &iHolder) const
tuple EcalPFClusterIsoMap
const edm::EDGetTokenT< RecoEcalCandMap > DetaMap_
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
const int rechitMatrixSize
Abs< T >::type abs(const T &t)
const double egammaEtaCut
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNull() const
Checks for null.
float recHitT(const DetId id, const EcalRecHitCollection &recHits)
const edm::EDGetTokenT< RecoEcalCandMap > OneOEMinusOneOPMap_
const edm::EDGetTokenT< RecoEcalCandMap > MissingHitsMap_
const edm::EDGetTokenT< RecoEcalCandMap > DphiMap_
const_iterator end() const
static constexpr float d0
const bool saveRecHitTiming
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple HcalPFClusterIsoMap
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
void produce(edm::StreamID sid, edm::Event &iEvent, edm::EventSetup const &setup) const final
static float reduceMantissaToNbitsRounding(const float &f)
iterator find(key_type k)
const edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEB_
float recHitE(const DetId id, const EcalRecHitCollection &recHits)
~HLTScoutingEgammaProducer() override
const edm::EDGetTokenT< RecoEcalCandMap > HcalPFClusterIsoMap_
const edm::EDGetTokenT< RecoEcalCandMap > EcalPFClusterIsoMap_
HLTScoutingEgammaProducer(const edm::ParameterSet &)