get ecal photon specific corrected energy plus values from regressions and store them in the Photon
Pre-selection loose isolation cuts
353 std::vector<double> preselCutValues;
358 std::vector<int> flags_, severitiesexcl_;
360 for (
unsigned int lSC = 0; lSC < photonCoreHandle->size(); lSC++) {
365 int subdet = scRef->seed()->hitsAndFractions()[0].first.subdetId();
371 hits = ecalBarrelHits;
377 hits = ecalEndcapHits;
381 edm::LogWarning(
"") <<
"PhotonProducer: do not know if it is a barrel or endcap SuperCluster";
387 if (scRef->energy() / cosh(scRef->eta()) <= preselCutValues[0])
398 float e2x5 = EcalClusterTools::e2x5Max(*(scRef->seed()), &(*
hits), &(*topology));
399 float e3x3 = EcalClusterTools::e3x3(*(scRef->seed()), &(*
hits), &(*topology));
401 const auto& cov = EcalClusterTools::covariances(*(scRef->seed()), &(*
hits), &(*topology),
geometry);
402 const auto& locCov = EcalClusterTools::localCovariances(*(scRef->seed()), &(*
hits), &(*topology));
406 float r9 = e3x3 / (scRef->rawEnergy());
418 float full5x5_sigmaEtaEta =
sqrt(full5x5_cov[0]);
424 caloPosition = unconvPos;
426 caloPosition = scRef->position();
446 newCandidate.setFiducialVolumeFlags(fiducialFlags);
447 newCandidate.setIsolationVariables(isolVarR04, isolVarR03);
453 showerShape.
e3x3 = e3x3;
459 showerShape.
hcalOverEcal[
id] = hcalHelperCone.hcalESum(*scRef,
id + 1, hcalCuts) / scRef->energy();
460 showerShape.
hcalOverEcalBc[
id] = hcalHelperBc.hcalESum(*scRef,
id + 1, hcalCuts) / scRef->energy();
464 newCandidate.setShowerShapeVariables(showerShape);
468 full5x5_showerShape.
e1x5 = full5x5_e1x5;
469 full5x5_showerShape.
e2x5 = full5x5_e2x5;
470 full5x5_showerShape.
e3x3 = full5x5_e3x3;
471 full5x5_showerShape.
e5x5 = full5x5_e5x5;
473 full5x5_showerShape.
sigmaEtaEta = full5x5_sigmaEtaEta;
476 full5x5_showerShape.
hcalOverEcal[
id] = hcalHelperCone.hcalESum(*scRef,
id + 1, hcalCuts) / full5x5_e5x5;
477 full5x5_showerShape.
hcalOverEcalBc[
id] = hcalHelperBc.hcalESum(*scRef,
id + 1, hcalCuts) / full5x5_e5x5;
481 newCandidate.full5x5_setShowerShapeVariables(full5x5_showerShape);
498 newCandidate.setMIPVariables(mipVar);
502 bool isLooseEM =
true;
503 if (newCandidate.pt() <
highEt_) {
504 if (newCandidate.hadronicOverEm() >= preselCutValues[1])
506 if (newCandidate.ecalRecHitSumEtConeDR04() > preselCutValues[2] + preselCutValues[3] * newCandidate.pt())
508 if (newCandidate.hcalTowerSumEtConeDR04() > preselCutValues[4] + preselCutValues[5] * newCandidate.pt())
510 if (newCandidate.nTrkSolidConeDR04() >
int(preselCutValues[6]))
512 if (newCandidate.nTrkHollowConeDR04() >
int(preselCutValues[7]))
514 if (newCandidate.trkSumPtSolidConeDR04() > preselCutValues[8])
516 if (newCandidate.trkSumPtHollowConeDR04() > preselCutValues[9])
518 if (newCandidate.sigmaIetaIeta() > preselCutValues[10])
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 HcalPFCuts *hcalCuts) const
std::vector< double > preselCutValuesEndcap_
std::vector< CaloTowerDetId > hcalTowersBehindClusters
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
PositionCalc posCalculator_
std::array< float, 7 > hcalOverEcalBc
PhotonEnergyCorrector photonEnergyCorrector_
PhotonIsolationCalculator photonIsolationCalculator_
const PhotonMIPHaloTagger photonMIPHaloTagger_
reco::Photon::MIPVariables mipCalculate(const reco::Photon &, const edm::Event &, const edm::EventSetup &es) const
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_
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