28 return (*it).energy();
48 : EgammaCandidateCollection_(
50 EgammaGsfTrackCollection_(
63 egammaPtCut(iConfig.getParameter<double>(
"egammaPtCut")),
64 egammaEtaCut(iConfig.getParameter<double>(
"egammaEtaCut")),
77 <<
"size of \"absEtaBinUpperEdges\" (" <<
absEtaBinUpperEdges.size() <<
") and \"egammaSigmaIEtaIEtaCut\" (" 83 throw cms::Exception(
"IncorrectValue") <<
"absEtaBinUpperEdges entries should be greater than or equal to zero.";
86 throw cms::Exception(
"ImproperBinning") <<
"absEtaBinUpperEdges entries should be in increasing order.";
93 <<
") should have a value larger than \"egammaEtaCut\" (" <<
egammaEtaCut <<
").";
97 produces<Run3ScoutingElectronCollection>();
98 produces<Run3ScoutingPhotonCollection>();
108 auto outElectrons = std::make_unique<Run3ScoutingElectronCollection>();
109 auto outPhotons = std::make_unique<Run3ScoutingPhotonCollection>();
224 for (
auto& candidate : *EgammaCandidateCollection) {
245 uint32_t
seedId = (*SCseed).seed();
249 int detSize = mDetIds.size();
250 std::vector<uint32_t> mDetIdIds;
251 std::vector<float> mEnergies;
252 std::vector<float> mTimes;
253 mDetIdIds.reserve(detSize);
254 mEnergies.reserve(detSize);
255 mTimes.reserve(detSize);
257 for (
int i = 0;
i < detSize;
i++) {
260 mDetIdIds.push_back(mDetIds[
i]);
269 auto const HoE = candidate.superCluster()->energy() != 0.
270 ? ((*HoverEMap)[candidateRef] / candidate.superCluster()->energy())
276 auto const sinin = candidate.superCluster()->energy() != 0. ? (*SigmaIEtaIEtaMap)[candidateRef] : 999.;
285 unsigned int const maxTrkSize = EgammaGsfTrackCollection->size();
286 std::vector<float> trkd0;
287 std::vector<float> trkdz;
288 std::vector<float> trkpt;
289 std::vector<float> trketa;
290 std::vector<float> trkphi;
291 std::vector<float> trkpMode;
292 std::vector<float> trketaMode;
293 std::vector<float> trkphiMode;
294 std::vector<float> trkqoverpModeError;
295 std::vector<float> trkchi2overndf;
296 std::vector<int> trkcharge;
297 trkd0.reserve(maxTrkSize);
298 trkdz.reserve(maxTrkSize);
299 trkpt.reserve(maxTrkSize);
300 trketa.reserve(maxTrkSize);
301 trkphi.reserve(maxTrkSize);
302 trkpMode.reserve(maxTrkSize);
303 trketaMode.reserve(maxTrkSize);
304 trkphiMode.reserve(maxTrkSize);
305 trkqoverpModeError.reserve(maxTrkSize);
306 trkchi2overndf.reserve(maxTrkSize);
307 trkcharge.reserve(maxTrkSize);
309 for (
auto&
track : *EgammaGsfTrackCollection) {
314 if (scRefFromTrk == scRef) {
315 trkd0.push_back(
track.d0());
316 trkdz.push_back(
track.dz());
317 trkpt.push_back(
track.pt());
318 trketa.push_back(
track.eta());
319 trkphi.push_back(
track.phi());
320 trkpMode.push_back(
track.pMode());
321 trketaMode.push_back(
track.etaMode());
322 trkphiMode.push_back(
track.phiMode());
323 trkqoverpModeError.push_back(
track.qoverpModeError());
324 auto const trackndof =
track.ndof();
325 trkchi2overndf.push_back(((trackndof == 0) ? -1 : (
track.chi2() / trackndof)));
326 trkcharge.push_back(
track.charge());
329 if (trkcharge.empty()) {
330 outPhotons->emplace_back(candidate.pt(),
335 scRef->preshowerEnergy(),
336 scRef->correctedEnergyUncertainty(),
337 (*SigmaIEtaIEtaMap)[candidateRef],
339 (*EcalPFClusterIsoMap)[candidateRef],
340 (*HcalPFClusterIsoMap)[candidateRef],
342 (*R9Map)[candidateRef],
346 scRef->clustersSize(),
353 outElectrons->emplace_back(candidate.pt(),
358 scRef->preshowerEnergy(),
359 scRef->correctedEnergyUncertainty(),
370 (*DetaMap)[candidateRef],
371 (*DphiMap)[candidateRef],
372 (*SigmaIEtaIEtaMap)[candidateRef],
374 (*OneOEMinusOneOPMap)[candidateRef],
375 (*MissingHitsMap)[candidateRef],
377 (*fBremMap)[candidateRef],
378 (*EcalPFClusterIsoMap)[candidateRef],
379 (*HcalPFClusterIsoMap)[candidateRef],
380 (*EleGsfTrackIsoMap)[candidateRef],
381 (*R9Map)[candidateRef],
385 scRef->clustersSize(),
415 desc.add<
double>(
"egammaPtCut", 4.0);
416 desc.add<
double>(
"egammaEtaCut", 2.5);
417 desc.add<
double>(
"egammaHoverECut", 1.0);
418 desc.add<std::vector<double>>(
"egammaSigmaIEtaIEtaCut", {99999.0, 99999.0});
419 desc.add<std::vector<double>>(
"absEtaBinUpperEdges", {1.479, 5.0});
420 desc.add<
bool>(
"saveRecHitTiming",
false);
421 desc.add<
int>(
"mantissaPrecision", 10)->setComment(
"default float16, change to 23 for float32");
422 desc.add<
int>(
"rechitMatrixSize", 10);
423 desc.add<
bool>(
"rechitZeroSuppression",
true);
426 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_
const edm::EDGetTokenT< RecoEcalCandMap > R9Map_
const std::vector< double > egammaSigmaIEtaIEtaCut
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
const edm::EDGetTokenT< reco::GsfTrackCollection > EgammaGsfTrackCollection_
const edm::EDGetTokenT< RecoEcalCandMap > EleGsfTrackIsoMap_
const edm::EDGetTokenT< RecoEcalCandMap > fBremMap_
const edm::EDGetTokenT< RecoEcalCandMap > HoverEMap_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > EgammaCandidateCollection_
const std::vector< double > absEtaBinUpperEdges
const edm::EDGetTokenT< RecoEcalCandMap > DetaMap_
const double egammaHoverECut
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
const int rechitMatrixSize
Abs< T >::type abs(const T &t)
const double egammaEtaCut
#define DEFINE_FWK_MODULE(type)
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 bool saveRecHitTiming
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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)
const bool rechitZeroSuppression
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 &)