Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full5x5 shower shape block to non-GED photons producer #12086

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion RecoEgamma/EgammaPhotonProducers/src/PhotonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ void PhotonProducer::fillPhotonCollection(edm::Event& evt,
float sigmaIetaIeta = sqrt(locCov[0]);
float r9 =e3x3/(scRef->rawEnergy());

float full5x5_maxXtal = noZS::EcalClusterTools::eMax( *(scRef->seed()), &(*hits) );
//AA
//Change these to consider severity level of hits
float full5x5_e1x5 = noZS::EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology));
float full5x5_e2x5 = noZS::EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology));
float full5x5_e3x3 = noZS::EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology));
float full5x5_e5x5 = noZS::EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology));
std::vector<float> full5x5_cov = noZS::EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry);
std::vector<float> full5x5_locCov = noZS::EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology));

float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]);
float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]);

// compute position of ECAL shower
math::XYZPoint caloPosition;
if (r9>minR9) {
Expand Down Expand Up @@ -404,7 +417,18 @@ void PhotonProducer::fillPhotonCollection(edm::Event& evt,
showerShape.hcalDepth1OverEcalBc = hcalDepth1OverEcalBc;
showerShape.hcalDepth2OverEcalBc = hcalDepth2OverEcalBc;
showerShape.hcalTowersBehindClusters = TowersBehindClus;
newCandidate.setShowerShapeVariables ( showerShape );
newCandidate.setShowerShapeVariables ( showerShape );

/// fill full5x5 shower shape block
reco::Photon::ShowerShape full5x5_showerShape;
full5x5_showerShape.e1x5= full5x5_e1x5;
full5x5_showerShape.e2x5= full5x5_e2x5;
full5x5_showerShape.e3x3= full5x5_e3x3;
full5x5_showerShape.e5x5= full5x5_e5x5;
full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal;
full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta;
full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta;
newCandidate.full5x5_setShowerShapeVariables ( full5x5_showerShape );

/// get ecal photon specific corrected energy
/// plus values from regressions and store them in the Photon
Expand Down