#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
Go to the source code of this file.
Functions | |
reco::CaloClusterPtrVector | CaloClusterVectorCopier (const reco::SuperCluster &sc) |
reco::SuperCluster | fBremScCorr (const reco::SuperCluster &sc, const edm::ParameterSet &ps) |
reco::SuperCluster | fEAddScCorr (const reco::SuperCluster &sc, double Ecorr) |
reco::SuperCluster | fEtaScCorr (const reco::SuperCluster &sc) |
reco::SuperCluster | fEtEtaCorr (const reco::SuperCluster &sc, const edm::ParameterSet &ps) |
reco::CaloClusterPtrVector CaloClusterVectorCopier | ( | const reco::SuperCluster & | sc | ) |
Definition at line 104 of file SCEnergyCorrections.h.
References reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), and edm::PtrVector< T >::push_back().
Referenced by fBremScCorr(), fEAddScCorr(), fEtaScCorr(), and fEtEtaCorr().
{ reco::CaloClusterPtrVector clusters_v; for(reco::CaloCluster_iterator cluster = sc.clustersBegin(); cluster != sc.clustersEnd(); cluster ++) { clusters_v.push_back(*cluster); } return clusters_v; }
reco::SuperCluster fBremScCorr | ( | const reco::SuperCluster & | sc, |
const edm::ParameterSet & | ps | ||
) |
Definition at line 20 of file SCEnergyCorrections.h.
References a, b, trackerHits::c, CaloClusterVectorCopier(), reco::CaloCluster::energy(), reco::CaloCluster::eta(), reco::SuperCluster::etaWidth(), fEtaScCorr(), edm::ParameterSet::getParameter(), p1, p2, p3, p4, reco::SuperCluster::phiWidth(), reco::CaloCluster::position(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::seed(), dtT0WireCalibration_cfg::threshold, and detailsBasic3DVector::y.
Referenced by ErsatzMEt::analyze(), and fEtEtaCorr().
{ std::vector<double> fBrem = ps.getParameter<std::vector<double> >("fBremVec"); double bremFrLowThr = ps.getParameter<double>("brLinearLowThr"); double bremFrHighThr = ps.getParameter<double>("brLinearHighThr"); reco::CaloClusterPtrVector bcs = CaloClusterVectorCopier(sc); double bremFrac = sc.phiWidth()/sc.etaWidth(); double newE = sc.energy(); if(fabs(sc.eta()) < 1.479) { reco::SuperCluster fEtaSC = fEtaScCorr(sc); reco::CaloClusterPtrVector bcs = CaloClusterVectorCopier(sc); newE = fEtaSC.energy(); } if(bremFrac < bremFrLowThr) bremFrac = bremFrLowThr; if(bremFrac < bremFrHighThr) bremFrac = bremFrHighThr; double p0 = fBrem[0]; double p1 = fBrem[1]; double p2 = fBrem[2]; double p3 = fBrem[3]; double p4 = fBrem[4]; // double threshold = p4; double y = p0*threshold*threshold + p1*threshold + p2; double yprime = 2*p0*threshold + p1; double a = p3; double b = yprime - 2*a*threshold; double c = y - a*threshold*threshold - b*threshold; double fCorr = 1; if( bremFrac < threshold ) fCorr = p0*bremFrac*bremFrac + p1*bremFrac + p2; else fCorr = a*bremFrac*bremFrac + b*bremFrac + c; newE /= fCorr; reco::SuperCluster corrSc(newE, sc.position(), sc.seed(), bcs, sc.preshowerEnergy(), 0., 0.); return corrSc; }
reco::SuperCluster fEAddScCorr | ( | const reco::SuperCluster & | sc, |
double | Ecorr | ||
) |
Definition at line 94 of file SCEnergyCorrections.h.
References CaloClusterVectorCopier(), reco::CaloCluster::position(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::rawEnergy(), and reco::SuperCluster::seed().
{ reco::CaloClusterPtrVector bcs = CaloClusterVectorCopier(sc); double newE = sc.rawEnergy()+Ecorr; reco::SuperCluster corrSc(newE, sc.position(), sc.seed(), bcs, sc.preshowerEnergy(), 0., 0.); return corrSc; }
reco::SuperCluster fEtaScCorr | ( | const reco::SuperCluster & | sc | ) |
Definition at line 5 of file SCEnergyCorrections.h.
References CaloClusterVectorCopier(), reco::CaloCluster::eta(), p1, reco::CaloCluster::position(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::rawEnergy(), and reco::SuperCluster::seed().
Referenced by ErsatzMEt::analyze(), and fBremScCorr().
{ reco::CaloClusterPtrVector bcs = CaloClusterVectorCopier(sc); double ieta = fabs(sc.eta())*(5/0.087); double p0 = 40.2198; double p1 = -3.03103e-6; double newE; // std::cout << "Corrected E = Raw E * (1+ p1*(ieta - p0)*(ieta - p0))"<< std::endl; if ( ieta < p0 ) newE = sc.rawEnergy(); else newE = sc.rawEnergy()/(1 + p1*(ieta - p0)*(ieta - p0)); reco::SuperCluster corrSc(newE, sc.position(), sc.seed(), bcs, sc.preshowerEnergy(), 0., 0.); return corrSc; }
reco::SuperCluster fEtEtaCorr | ( | const reco::SuperCluster & | sc, |
const edm::ParameterSet & | ps | ||
) |
Definition at line 64 of file SCEnergyCorrections.h.
References CaloClusterVectorCopier(), eta(), reco::CaloCluster::eta(), fBremScCorr(), edm::ParameterSet::getParameter(), p1, p2, reco::CaloCluster::position(), reco::SuperCluster::preshowerEnergy(), and reco::SuperCluster::seed().
{ // et -- Et of the SuperCluster (with respect to (0,0,0)) // eta -- eta of the SuperCluster std::vector<double> fEtEtaParams = ps.getParameter<std::vector<double> >("fEtEtaParamsVec"); reco::SuperCluster fBremSC = fBremScCorr(sc, ps); reco::CaloClusterPtrVector bcs = CaloClusterVectorCopier(sc); double eta = sc.eta(); double et = fBremSC.energy()/cosh(eta); double fCorr = 0.; double p0 = fEtEtaParams[0] + fEtEtaParams[1]/(et + fEtEtaParams[ 2]) + fEtEtaParams[ 3]/(et*et); double p1 = fEtEtaParams[4] + fEtEtaParams[5]/(et + fEtEtaParams[ 6]) + fEtEtaParams[ 7]/(et*et); double p2 = fEtEtaParams[8] + fEtEtaParams[9]/(et + fEtEtaParams[10]) + fEtEtaParams[11]/(et*et); fCorr = p0 + p1 * atan(fEtEtaParams[12]*(fEtEtaParams[13]-fabs(eta))) + fEtEtaParams[14] * fabs(eta) + p1 * fEtEtaParams[15] * fabs(eta) + p2 * fEtEtaParams[16] * eta * eta; if ( fCorr < 0.5 ) fCorr = 0.5; double newE = et/(fCorr*cosh(eta)); reco::SuperCluster corrSc(newE, sc.position(), sc.seed(), bcs, sc.preshowerEnergy(), 0., 0.); return corrSc; }