#include <src/CondFormats/interface/EcalShowerContainmentCorrections.h>
Classes | |
struct | Coefficients |
Structure defining the container for correction coefficients. More... | |
Public Member Functions | |
const double | correction3x3 (const EBDetId &xtal, const math::XYZPoint &pos) const |
The correction factor for 3x3 matrix. More... | |
const double | correction5x5 (const EBDetId &xtal, const math::XYZPoint &pos) const |
The correction factor for 5x5 matrix. More... | |
const Coefficients | correctionCoefficients (const EBDetId ¢erxtal) const |
Get the correction coefficients for the given xtal. More... | |
void | fillCorrectionCoefficients (const EBDetId &xtal, int group, const Coefficients &coefficients) |
Fill the correction coefficients for a given xtal, part of group . More... | |
void | fillCorrectionCoefficients (const int supermodule, const int module, const Coefficients &coefficients) |
Fill the correction coefficients for a given Ecal module. More... | |
Private Types | |
enum | Direction { eX, eY } |
typedef std::map< EBDetId, int > | GroupMap |
enum | Type { e3x3, e5x5 } |
Private Member Functions | |
const double | correctionXY (const EBDetId &xtal, double position, Direction dir, Type type) const |
Private Attributes | |
std::vector< Coefficients > | coefficients_ |
Holds the coeffiecients. The index corresponds to the group. More... | |
GroupMap | groupmap_ |
Maps in which group a particular xtal has been placed. More... | |
Description: Holds the coefficients of a polynomial that describes the shower containment.
Usage example(for real code see CalibCalorimetry/EcalCorrectionModules/test) :
Definition at line 44 of file EcalShowerContainmentCorrections.h.
|
private |
Definition at line 136 of file EcalShowerContainmentCorrections.h.
|
private |
Enumerator | |
---|---|
eX | |
eY |
Definition at line 126 of file EcalShowerContainmentCorrections.h.
|
private |
Enumerator | |
---|---|
e3x3 | |
e5x5 |
Definition at line 127 of file EcalShowerContainmentCorrections.h.
const double EcalShowerContainmentCorrections::correction3x3 | ( | const EBDetId & | xtal, |
const math::XYZPoint & | pos | ||
) | 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 100 of file EcalShowerContainmentCorrections.cc.
References correctionXY(), e3x3, eX, eY, x, and detailsBasic3DVector::y.
const double EcalShowerContainmentCorrections::correction5x5 | ( | const EBDetId & | xtal, |
const math::XYZPoint & | pos | ||
) | 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 116 of file EcalShowerContainmentCorrections.cc.
References correctionXY(), e5x5, eX, eY, x, and detailsBasic3DVector::y.
const EcalShowerContainmentCorrections::Coefficients EcalShowerContainmentCorrections::correctionCoefficients | ( | const EBDetId & | centerxtal | ) | const |
Get the correction coefficients for the given xtal.
Return zero coefficients in case the correction is not available for that xtal
Definition at line 12 of file EcalShowerContainmentCorrections.cc.
References coefficients_, groupmap_, and DetId::rawId().
|
private |
Calculate the correction for the given direction and type
Definition at line 70 of file EcalShowerContainmentCorrections.cc.
References coefficients_, corr, EcalShowerContainmentCorrections::Coefficients::data, e5x5, eY, groupmap_, i, EcalShowerContainmentCorrections::Coefficients::kPolynomialDegree, evf::evtn::offset(), and funct::pow().
Referenced by correction3x3(), and correction5x5().
void EcalShowerContainmentCorrections::fillCorrectionCoefficients | ( | const EBDetId & | xtal, |
int | group, | ||
const Coefficients & | coefficients | ||
) |
Fill the correction coefficients for a given xtal, part of group .
Do not replace if xtal is already there
Definition at line 28 of file EcalShowerContainmentCorrections.cc.
References coefficients_, and groupmap_.
Referenced by fillCorrectionCoefficients().
void EcalShowerContainmentCorrections::fillCorrectionCoefficients | ( | const int | supermodule, |
const int | module, | ||
const Coefficients & | coefficients | ||
) |
Fill the correction coefficients for a given Ecal module.
Assume that corresponding modules in different supermodules use the same coefficients
Definition at line 47 of file EcalShowerContainmentCorrections.cc.
References cond::rpcobgas::detid, fillCorrectionCoefficients(), EBDetId::kModulesPerSM, and EBDetId::SMCRYSTALMODE.
|
private |
Holds the coeffiecients. The index corresponds to the group.
Definition at line 143 of file EcalShowerContainmentCorrections.h.
Referenced by correctionCoefficients(), correctionXY(), and fillCorrectionCoefficients().
|
private |
Maps in which group a particular xtal has been placed.
Definition at line 139 of file EcalShowerContainmentCorrections.h.
Referenced by correctionCoefficients(), correctionXY(), and fillCorrectionCoefficients().