CMS 3D CMS Logo

EcalGlobalShowerContainmentCorrectionsVsEta.h
Go to the documentation of this file.
1 #ifndef CondFormats_EcalGlobalShowerContainmentCorrectionsVsEta_h
2 #define CondFormats_EcalGlobalShowerContainmentCorrectionsVsEta_h
3 // -*- C++ -*-
4 //
5 // Package: CondFormats
6 // Class : EcalGlobalShowerContainmentCorrectionsVsEta
7 //
29 
30 #include <vector>
31 #include <algorithm>
32 #include <map>
33 #include <boost/cstdint.hpp>
34 
35 class DetId;
36 
38 
39  public:
40 
42 
46  struct Coefficients{
47 
48  Coefficients(){for(unsigned int i=0; i<Coefficients::kSize; ++i) data[i]=0;}
49  Coefficients(const Coefficients& coeff){
50  std::copy(coeff.data,
52  data);
53  }
54 
56  if (this == &coeff) return *this;
58  return *this;
59  }
60 
62  static const int kCoefficients = 3;
63 
65  static const int kNTypes = 2;
66  static const unsigned int kSize = kCoefficients * kNTypes ;
67 
68  double data[kSize];
69 
70 
72 };
73 
74 
76 
81  const double correction3x3(const DetId& xtal) const;
82 
83 
85 
90  const double correction5x5(const DetId& xtal) const;
91 
94 
96  void fillCorrectionCoefficients(const Coefficients& coefficients);
97 
98 
99  private:
100  enum Type{e3x3,e5x5};
101 
103  const double correction(const DetId& xtal,
104  Type type) const ;
105 
108 
109 
111 };
112 
113 #endif
type
Definition: HCALResponse.h:21
const double correction3x3(const DetId &xtal) const
The correction factor for 3x3 matrix.
def copy(args, dbName)
const double correction(const DetId &xtal, Type type) const
const Coefficients correctionCoefficients() const
Get the correction coefficients for the given xtal.
Coefficients coefficients_
Holds the coeffiecients. The index corresponds to the group.
Structure defining the container for correction coefficients.
const double correction5x5(const DetId &xtal) const
The correction factor for 5x5 matrix.
static const int kNTypes
Number of types of correction: 3x3, 5x5.
static const int kCoefficients
The degree of the polynomial used as correction function plus one.
Definition: DetId.h:18
#define COND_SERIALIZABLE
Definition: Serializable.h:38
void fillCorrectionCoefficients(const Coefficients &coefficients)
Fill the correction coefficients.