107 auto outElectrons = std::make_unique<Run3ScoutingElectronCollection>();
108 auto outPhotons = std::make_unique<Run3ScoutingPhotonCollection>();
215 for (
auto& candidate : *EgammaCandidateCollection) {
233 float sMin = moments.
sMin;
234 float sMaj = moments.
sMaj;
236 uint32_t seedId = (*SCseed).seed();
238 std::vector<DetId> mDetIds = EcalClusterTools::matrixDetId((topology), (*SCseed).seed(),
rechitMatrixSize);
240 int detSize = mDetIds.size();
241 std::vector<uint32_t> mDetIdIds;
242 std::vector<float> mEnergies;
243 std::vector<float> mTimes;
244 mDetIdIds.reserve(detSize);
245 mEnergies.reserve(detSize);
246 mTimes.reserve(detSize);
248 for (
int i = 0;
i < detSize;
i++) {
251 mDetIdIds.push_back(mDetIds[
i]);
260 auto const HoE = candidate.superCluster()->energy() != 0.
261 ? ((*HoverEMap)[candidateRef] / candidate.superCluster()->energy())
267 auto const sinin = candidate.superCluster()->energy() != 0. ? (*SigmaIEtaIEtaMap)[candidateRef] : 999.;
276 unsigned int const maxTrkSize = EgammaGsfTrackCollection->size();
277 std::vector<float> trkd0;
278 std::vector<float> trkdz;
279 std::vector<float> trkpt;
280 std::vector<float> trketa;
281 std::vector<float> trkphi;
282 std::vector<float> trkchi2overndf;
283 std::vector<int> trkcharge;
284 trkd0.reserve(maxTrkSize);
285 trkdz.reserve(maxTrkSize);
286 trkpt.reserve(maxTrkSize);
287 trketa.reserve(maxTrkSize);
288 trkphi.reserve(maxTrkSize);
289 trkchi2overndf.reserve(maxTrkSize);
290 trkcharge.reserve(maxTrkSize);
292 for (
auto&
track : *EgammaGsfTrackCollection) {
297 if (scRefFromTrk == scRef) {
298 trkd0.push_back(
track.d0());
299 trkdz.push_back(
track.dz());
300 trkpt.push_back(
track.pt());
301 trketa.push_back(
track.eta());
302 trkphi.push_back(
track.phi());
303 auto const trackndof =
track.ndof();
304 trkchi2overndf.push_back(((trackndof == 0) ? -1 : (
track.chi2() / trackndof)));
305 trkcharge.push_back(
track.charge());
308 if (trkcharge.empty()) {
309 outPhotons->emplace_back(candidate.pt(),
313 (*SigmaIEtaIEtaMap)[candidateRef],
315 (*EcalPFClusterIsoMap)[candidateRef],
316 (*HcalPFClusterIsoMap)[candidateRef],
318 (*R9Map)[candidateRef],
327 outElectrons->emplace_back(candidate.pt(),
337 (*DetaMap)[candidateRef],
338 (*DphiMap)[candidateRef],
339 (*SigmaIEtaIEtaMap)[candidateRef],
341 (*OneOEMinusOneOPMap)[candidateRef],
342 (*MissingHitsMap)[candidateRef],
344 (*EcalPFClusterIsoMap)[candidateRef],
345 (*HcalPFClusterIsoMap)[candidateRef],
346 (*EleGsfTrackIsoMap)[candidateRef],
347 (*R9Map)[candidateRef],
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
const edm::EDGetTokenT< reco::GsfTrackCollection > EgammaGsfTrackCollection_
const edm::EDGetTokenT< RecoEcalCandMap > EleGsfTrackIsoMap_
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
const int rechitMatrixSize
Abs< T >::type abs(const T &t)
const double egammaEtaCut
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
static float reduceMantissaToNbitsRounding(const float &f)
const bool rechitZeroSuppression
const edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEB_
float recHitE(const DetId id, const EcalRecHitCollection &recHits)
const edm::EDGetTokenT< RecoEcalCandMap > HcalPFClusterIsoMap_
const edm::EDGetTokenT< RecoEcalCandMap > EcalPFClusterIsoMap_