114 for (
unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoecalcandHandle->size(); iRecoEcalCand++) {
116 if (recoecalcandref->superCluster()->seed()->seed().det() !=
DetId::Ecal) {
117 clshMap.insert(recoecalcandref, 0);
118 clsh5x5Map.insert(recoecalcandref, 0);
119 clsh5x5NoiseCleanedMap.insert(recoecalcandref, 0);
121 clshMap2.insert(recoecalcandref, 0);
122 clsh5x5Map2.insert(recoecalcandref, 0);
123 clsh5x5NoiseCleanedMap2.insert(recoecalcandref, 0);
125 clshSMajorMap.insert(recoecalcandref, 0);
126 clshSMinorMap.insert(recoecalcandref, 0);
128 e2x2Map.insert(recoecalcandref, 0);
136 const auto& vCov = lazyTools.localCovariances(*(recoecalcandref->superCluster()->seed()));
137 sigmaee =
sqrt(vCov[0]);
138 sigmapp =
sqrt(vCov[2]);
141 auto const ecalCandLocalCov = lazyTools5x5.localCovariances(*(recoecalcandref->superCluster()->seed()));
142 auto const sigmaee5x5 =
sqrt(ecalCandLocalCov[0]);
143 auto const sigmapp5x5 =
sqrt(ecalCandLocalCov[2]);
145 auto const ecalCandLocalCovNoiseCleaned = lazyTools5x5.localCovariances(*(recoecalcandref->superCluster()->seed()),
150 auto const sigmaee5x5NoiseCleaned =
sqrt(ecalCandLocalCovNoiseCleaned[0]);
151 auto const sigmapp5x5NoiseCleaned =
sqrt(ecalCandLocalCovNoiseCleaned[2]);
153 clshMap.insert(recoecalcandref, sigmaee);
154 clsh5x5Map.insert(recoecalcandref, sigmaee5x5);
155 clsh5x5NoiseCleanedMap.insert(recoecalcandref, sigmaee5x5NoiseCleaned);
157 clshMap2.insert(recoecalcandref, sigmapp);
158 clsh5x5Map2.insert(recoecalcandref, sigmapp5x5);
159 clsh5x5NoiseCleanedMap2.insert(recoecalcandref, sigmapp5x5NoiseCleaned);
164 Cluster2ndMoments moments = EcalClusterTools::cluster2ndMoments(*SCseed, *rechits);
167 clshSMajorMap.insert(recoecalcandref,
sMaj);
168 clshSMinorMap.insert(recoecalcandref,
sMin);
170 auto const e2x2 = lazyTools.e2x2(*(recoecalcandref->superCluster()->seed()));
171 e2x2Map.insert(recoecalcandref, e2x2);
174 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clshMap));
175 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clsh5x5Map),
"sigmaIEtaIEta5x5");
176 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clsh5x5NoiseCleanedMap),
177 "sigmaIEtaIEta5x5NoiseCleaned");
179 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clshMap2),
"sigmaIPhiIPhi");
180 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clsh5x5Map2),
"sigmaIPhiIPhi5x5");
181 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clsh5x5NoiseCleanedMap2),
182 "sigmaIPhiIPhi5x5NoiseCleaned");
184 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clshSMajorMap),
"sMajor");
185 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(clshSMinorMap),
"sMinor");
187 iEvent.put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(e2x2Map),
"e2x2");
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
static constexpr float kRelEnCut
T const * product() const
const double multThresEE_
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > ecalPFRechitThresholdsToken_
const EcalClusterLazyTools::ESGetTokens ecalClusterLazyToolsESGetTokens_
Abs< T >::type abs(const T &t)
const double multThresEB_
const edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEEToken_
const edm::EDGetTokenT< EcalRecHitCollection > ecalRechitEBToken_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_