CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
EcalGlobalShowerContainmentCorrectionsVsEta Class Reference

#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. More...
 
const double correction5x5 (const DetId &xtal) const
 The correction factor for 5x5 matrix. More...
 
const Coefficients correctionCoefficients () const
 Get the correction coefficients for the given xtal. More...
 
void fillCorrectionCoefficients (const Coefficients &coefficients)
 Fill the correction coefficients. More...
 

Private Types

enum  Type { e3x3, e5x5 }
 

Private Member Functions

const double correction (const DetId &xtal, Type type) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

Coefficients coefficients_
 Holds the coeffiecients. The index corresponds to the group. More...
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

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) :

double correction3x3 = pGapCorr->correction3x3(centerXtal,mathpoint);
double correction5x5 = pGapCorr->correction5x5(centerXtal,mathpoint);
Author
Paolo Meridiani \id
Id
EcalGlobalShowerContainmentCorrectionsVsEta.h,v 1.1 2007/07/13 17:37:06 meridian Exp

Definition at line 36 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.

Member Enumeration Documentation

◆ Type

Enumerator
e3x3 
e5x5 

Definition at line 92 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.

92 { e3x3, e5x5 };

Member Function Documentation

◆ correction()

const double EcalGlobalShowerContainmentCorrectionsVsEta::correction ( const DetId xtal,
EcalGlobalShowerContainmentCorrectionsVsEta::Type  type 
) const
private

Calculate the correction for the given direction and type

Definition at line 21 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

22  {
23  if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalBarrel) {
24  int offset = 0;
25 
26  if (type == e5x5)
28 
29  double corr = 0;
30 
31  if (EBDetId(xtal).ieta() < coefficients_.data[0])
32  corr = coefficients_.data[1];
33  else
35 
36  return corr;
37  } else if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalEndcap)
38  return 1.;
39  else
40  return -1;
41 }

References coefficients_, alignCSCRings::corr, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::data, DetId::det(), e5x5, DetId::Ecal, EcalBarrel, EcalEndcap, EBDetId::ieta(), EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::kCoefficients, hltrates_dqm_sourceclient-live_cfg::offset, funct::pow(), and DetId::subdetId().

Referenced by correction3x3(), and correction5x5().

◆ correction3x3()

const double EcalGlobalShowerContainmentCorrectionsVsEta::correction3x3 ( const DetId xtal) const

The correction factor for 3x3 matrix.

Parameters
posis 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 43 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

43  {
44  double corr = correction(xtal, e3x3);
45  return corr;
46 }

References alignCSCRings::corr, correction(), and e3x3.

◆ correction5x5()

const double EcalGlobalShowerContainmentCorrectionsVsEta::correction5x5 ( const DetId xtal) const

The correction factor for 5x5 matrix.

Parameters
posis 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 48 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

48  {
49  double corr = correction(xtal, e5x5);
50  return corr;
51 }

References alignCSCRings::corr, correction(), and e5x5.

◆ correctionCoefficients()

const EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients EcalGlobalShowerContainmentCorrectionsVsEta::correctionCoefficients ( ) const

Get the correction coefficients for the given xtal.

Definition at line 12 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

12  {
13  return coefficients_;
14 }

References coefficients_.

◆ fillCorrectionCoefficients()

void EcalGlobalShowerContainmentCorrectionsVsEta::fillCorrectionCoefficients ( const Coefficients coefficients)

Fill the correction coefficients.

Definition at line 16 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

16  {
17  coefficients_ = coefficients;
18 }

References coefficients_.

◆ serialize()

template<class Archive >
void EcalGlobalShowerContainmentCorrectionsVsEta::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Member Data Documentation

◆ coefficients_

Coefficients EcalGlobalShowerContainmentCorrectionsVsEta::coefficients_
private

Holds the coeffiecients. The index corresponds to the group.

Definition at line 98 of file EcalGlobalShowerContainmentCorrectionsVsEta.h.

Referenced by correction(), correctionCoefficients(), and fillCorrectionCoefficients().

EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EcalGlobalShowerContainmentCorrectionsVsEta::coefficients_
Coefficients coefficients_
Holds the coeffiecients. The index corresponds to the group.
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.h:98
EcalGlobalShowerContainmentCorrectionsVsEta::correction3x3
const double correction3x3(const DetId &xtal) const
The correction factor for 3x3 matrix.
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.cc:43
EBDetId
Definition: EBDetId.h:17
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::kCoefficients
static const int kCoefficients
The degree of the polynomial used as correction function plus one.
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.h:58
ESHandle
EcalBarrel
Definition: EcalSubdetector.h:10
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
EcalGlobalShowerContainmentCorrectionsVsEta::e3x3
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.h:92
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EcalGlobalShowerContainmentCorrectionsVsEtaRcd
Definition: EcalGlobalShowerContainmentCorrectionsVsEtaRcd.h:5
EcalEndcap
Definition: EcalSubdetector.h:10
EcalGlobalShowerContainmentCorrectionsVsEta::correction5x5
const double correction5x5(const DetId &xtal) const
The correction factor for 5x5 matrix.
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.cc:48
EcalGlobalShowerContainmentCorrectionsVsEta::e5x5
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.h:92
EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients::data
double data[kSize]
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.h:64
DetId::Ecal
Definition: DetId.h:27
get
#define get
type
type
Definition: HCALResponse.h:21
EcalGlobalShowerContainmentCorrectionsVsEta::correction
const double correction(const DetId &xtal, Type type) const
Definition: EcalGlobalShowerContainmentCorrectionsVsEta.cc:21
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82