25 if (it != recHits.
end())
26 return (*it).energy();
36 if (it != recHits.
end())
46 : EgammaCandidateCollection_(
48 EgammaGsfTrackCollection_(
60 egammaPtCut(iConfig.getParameter<double>(
"egammaPtCut")),
61 egammaEtaCut(iConfig.getParameter<double>(
"egammaEtaCut")),
69 produces<Run3ScoutingElectronCollection>();
70 produces<Run3ScoutingPhotonCollection>();
80 auto outElectrons = std::make_unique<Run3ScoutingElectronCollection>();
81 auto outPhotons = std::make_unique<Run3ScoutingPhotonCollection>();
187 for (
auto& candidate : *EgammaCandidateCollection) {
204 Cluster2ndMoments moments = EcalClusterTools::cluster2ndMoments(*SCseed, *rechits);
205 float sMin = moments.
sMin;
206 float sMaj = moments.
sMaj;
208 unsigned int seedId = (*SCseed).seed();
210 std::vector<DetId> mDetIds = EcalClusterTools::matrixDetId((topology), (*SCseed).seed(),
rechitMatrixSize);
212 int detSize = mDetIds.size();
213 std::vector<float> mEnergies(detSize, 0.);
214 std::vector<float> mTimes(detSize, 0.);
216 for (
int i = 0;
i < detSize;
i++) {
225 if (candidate.superCluster()->energy() != 0.)
226 HoE = (*HoverEMap)[candidateRef] / candidate.superCluster()->energy();
231 for (
auto&
track : *EgammaGsfTrackCollection) {
236 if (scRefFromTrk == scRef) {
239 charge =
track.charge();
242 if (charge == -999) {
243 outPhotons->emplace_back(candidate.pt(),
247 (*SigmaIEtaIEtaMap)[candidateRef],
249 (*EcalPFClusterIsoMap)[candidateRef],
250 (*HcalPFClusterIsoMap)[candidateRef],
252 (*R9Map)[candidateRef],
259 outElectrons->emplace_back(candidate.pt(),
265 (*DetaMap)[candidateRef],
266 (*DphiMap)[candidateRef],
267 (*SigmaIEtaIEtaMap)[candidateRef],
269 (*OneOEMinusOneOPMap)[candidateRef],
270 (*MissingHitsMap)[candidateRef],
272 (*EcalPFClusterIsoMap)[candidateRef],
273 (*HcalPFClusterIsoMap)[candidateRef],
274 (*EleGsfTrackIsoMap)[candidateRef],
275 (*R9Map)[candidateRef],
304 desc.
add<
double>(
"egammaPtCut", 4.0);
305 desc.
add<
double>(
"egammaEtaCut", 2.5);
306 desc.
add<
double>(
"egammaHoverECut", 1.0);
307 desc.
add<
bool>(
"saveRecHitTiming",
false);
308 desc.
add<
int>(
"mantissaPrecision", 10)->setComment(
"default float16, change to 23 for float32");
309 desc.
add<
int>(
"rechitMatrixSize", 10);
312 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 &)