get ecal photon specific corrected energy plus values from regressions and store them in the Photon
Pre-selection loose isolation cuts
346 std::vector<double> preselCutValues;
351 std::vector<int> flags_, severitiesexcl_;
353 for (
unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
358 int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
364 hits = ecalBarrelHits;
370 hits = ecalEndcapHits;
374 edm::LogWarning(
"") <<
"PhotonProducer: do not know if it is a barrel or endcap SuperCluster";
380 if (scRef->energy() / cosh(scRef->eta()) <= preselCutValues[0])
391 float e2x5 = EcalClusterTools::e2x5Max(*(scRef->seed()), &(*
hits), &(*topology));
392 float e3x3 = EcalClusterTools::e3x3(*(scRef->seed()), &(*
hits), &(*topology));
393 float e5x5 = EcalClusterTools::e5x5(*(scRef->seed()), &(*
hits), &(*topology));
394 const auto& cov = EcalClusterTools::covariances(*(scRef->seed()), &(*
hits), &(*topology),
geometry);
395 const auto& locCov = EcalClusterTools::localCovariances(*(scRef->seed()), &(*
hits), &(*topology));
398 float sigmaIetaIeta =
sqrt(locCov[0]);
399 float r9 = e3x3 / (scRef->rawEnergy());
411 float full5x5_sigmaEtaEta =
sqrt(full5x5_cov[0]);
417 caloPosition = unconvPos;
419 caloPosition = scRef->position();
439 newCandidate.setFiducialVolumeFlags(fiducialFlags);
440 newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
446 showerShape.
e3x3 = e3x3;
447 showerShape.
e5x5 = e5x5;
452 showerShape.
hcalOverEcal[
id] = hcalHelperCone.hcalESum(*scRef,
id + 1) / scRef->energy();
453 showerShape.
hcalOverEcalBc[
id] = hcalHelperBc.hcalESum(*scRef,
id + 1) / scRef->energy();
457 newCandidate.setShowerShapeVariables(showerShape);
461 full5x5_showerShape.
e1x5 = full5x5_e1x5;
462 full5x5_showerShape.
e2x5 = full5x5_e2x5;
463 full5x5_showerShape.
e3x3 = full5x5_e3x3;
464 full5x5_showerShape.
e5x5 = full5x5_e5x5;
466 full5x5_showerShape.
sigmaEtaEta = full5x5_sigmaEtaEta;
469 full5x5_showerShape.
hcalOverEcal[
id] = hcalHelperCone.hcalESum(*scRef,
id + 1) / full5x5_e5x5;
470 full5x5_showerShape.
hcalOverEcalBc[
id] = hcalHelperBc.hcalESum(*scRef,
id + 1) / full5x5_e5x5;
474 newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
492 newCandidate.setMIPVariables(mipVar);
496 bool isLooseEM =
true;
497 if (newCandidate.pt() <
highEt_) {
498 if (newCandidate.hadronicOverEm() >= preselCutValues[1])
500 if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
502 if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
504 if (newCandidate.nTrkSolidConeDR04() >
int(preselCutValues[6]))
506 if (newCandidate.nTrkHollowConeDR04() >
int(preselCutValues[7]))
508 if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
510 if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
512 if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
std::vector< double > preselCutValuesEndcap_
std::vector< CaloTowerDetId > hcalTowersBehindClusters
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
void MIPcalculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::MIPVariables &mipId)
PositionCalc posCalculator_
std::array< float, 7 > hcalOverEcalBc
PhotonEnergyCorrector photonEnergyCorrector_
PhotonMIPHaloTagger photonMIPHaloTagger_
PhotonIsolationCalculator photonIsolationCalculator_
std::vector< int > flagsexclEB_
std::vector< int > flagsexclEE_
std::string candidateP4type_
std::vector< int > severitiesexclEE_
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
void init(const edm::EventSetup &theEventSetup)
std::vector< int > severitiesexclEB_
void calculate(const reco::Photon *, const edm::Event &, const edm::EventSetup &es, reco::Photon::FiducialFlags &phofid, reco::Photon::IsolationVariables &phoisolR03, reco::Photon::IsolationVariables &phoisolR04) const
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
void calculate(edm::Event &evt, reco::Photon &, int subdet, const reco::VertexCollection &vtxcol, const edm::EventSetup &iSetup)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
std::array< float, 7 > hcalOverEcal
std::vector< double > preselCutValuesBarrel_
Log< level::Warning, false > LogWarning