CMS 3D CMS Logo

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

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.

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().

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 }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
Coefficients coefficients_
Holds the coeffiecients. The index corresponds to the group.
dictionary corr
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static const int kCoefficients
The degree of the polynomial used as correction function plus one.
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ 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.

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.

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.

References coefficients_.

12  {
13  return coefficients_;
14 }
Coefficients coefficients_
Holds the coeffiecients. The index corresponds to the group.

◆ fillCorrectionCoefficients()

void EcalGlobalShowerContainmentCorrectionsVsEta::fillCorrectionCoefficients ( const Coefficients coefficients)

Fill the correction coefficients.

Definition at line 16 of file EcalGlobalShowerContainmentCorrectionsVsEta.cc.

References coefficients_.

16  {
17  coefficients_ = coefficients;
18 }
Coefficients coefficients_
Holds the coeffiecients. The index corresponds to the group.

◆ 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().