#include <src/CondFormats/interface/EcalGlobalShowerContainmentCorrectionsVsEta.h>
Classes | |
struct | Coefficients |
Structure defining the container for correction coefficients. More... | |
Public Member Functions | |
const double | correction3x3 (const DetId &xtal) const |
The correction factor for 3x3 matrix. | |
const double | correction5x5 (const DetId &xtal) const |
The correction factor for 5x5 matrix. | |
const Coefficients | correctionCoefficients () const |
Get the correction coefficients for the given xtal. | |
void | fillCorrectionCoefficients (const Coefficients &coefficients) |
Fill the correction coefficients. | |
Private Types | |
enum | Type { e3x3, e5x5 } |
Private Member Functions | |
const double | correction (const DetId &xtal, Type type) const |
Private Attributes | |
Coefficients | coefficients_ |
Holds the coeffiecients. The index corresponds to the group. |
Description: Holds the coefficients of a polynomial that describes variation of the global containment effect as afunction of eta
Usage example(for real code see CalibCalorimetry/EcalCorrectionModules/test) :
ESHandle<EcalGlobalShowerContainmentCorrectionsVsEta> pGapCorr; iESetup.get<EcalGlobalShowerContainmentCorrectionsVsEtaRcd>().get(pGapCorr); double correction3x3 = pGapCorr->correction3x3(centerXtal,mathpoint); double correction5x5 = pGapCorr->correction5x5(centerXtal,mathpoint);
Definition at line 35 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.
enum EcalGlobalShowerContainmentCorrectionsVsEta::Type [private] |
Definition at line 96 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.
const double EcalGlobalShowerContainmentCorrectionsVsEta::correction | ( | const DetId & | xtal, |
EcalGlobalShowerContainmentCorrectionsVsEta::Type | type | ||
) | const [private] |
Calculate the correction for the given direction and type
Definition at line 26 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.
References coefficients_, corr, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::data, DetId::det(), e5x5, DetId::Ecal, EcalBarrel, EcalEndcap, EBDetId::ieta(), EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::kCoefficients, evf::evtn::offset(), funct::pow(), and DetId::subdetId().
Referenced by correction3x3(), and correction5x5().
{ if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalBarrel ) { int offset=0; if (type==e5x5) offset+= Coefficients::kCoefficients; double corr=0; if (EBDetId(xtal).ieta() < coefficients_.data[0]) corr=coefficients_.data[1]; else corr=coefficients_.data[1] + coefficients_.data[2] * pow ( EBDetId(xtal).ieta() - coefficients_.data[0] , 2); return corr; } else if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalEndcap ) return 1.; else return -1; }
const double EcalGlobalShowerContainmentCorrectionsVsEta::correction3x3 | ( | const DetId & | xtal | ) | const |
The correction factor for 3x3 matrix.
pos | is the distance in cm from the center of the xtal as calculated in RecoEcal/EgammaCoreTools/interface/PositionCalc.h The valid return value is in the range (0,1] (divide by this value to apply the correction) Returns -1 if correction is not avaiable for that xtal |
Definition at line 52 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.
References corr, correction(), and e3x3.
{ double corr = correction(xtal,e3x3); return corr; }
const double EcalGlobalShowerContainmentCorrectionsVsEta::correction5x5 | ( | const DetId & | xtal | ) | const |
The correction factor for 5x5 matrix.
pos | is the distance in cm from the center of the xtal as calculated in RecoEcal/EgammaCoreTools/interface/PositionCalc.h The return value is in the range (0,1] (divide by this value to apply the correction) Returns -1 if correction is not avaiable for that xtal |
Definition at line 62 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.
References corr, correction(), and e5x5.
{ double corr = correction(xtal,e5x5); return corr; }
const EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients EcalGlobalShowerContainmentCorrectionsVsEta::correctionCoefficients | ( | ) | const |
Get the correction coefficients for the given xtal.
Definition at line 13 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.
References coefficients_.
{ return coefficients_; }
void EcalGlobalShowerContainmentCorrectionsVsEta::fillCorrectionCoefficients | ( | const Coefficients & | coefficients | ) |
Fill the correction coefficients.
Definition at line 19 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.
References coefficients_.
{ coefficients_=coefficients; }
Holds the coeffiecients. The index corresponds to the group.
Definition at line 103 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.
Referenced by correction(), correctionCoefficients(), and fillCorrectionCoefficients().