CMS 3D CMS Logo

EcalShowerContainmentCorrections.h
Go to the documentation of this file.
1 #ifndef CondFormats_EcalShowerContainmentCorrections_h
2 #define CondFormats_EcalShowerContainmentCorrections_h
3 // -*- C++ -*-
4 //
5 // Package: CondFormats
6 // Class : EcalShowerContainmentCorrections
7 //
36 
37 #include <vector>
38 #include <algorithm>
39 #include <map>
40 #include <boost/cstdint.hpp>
41 
43 
44 class EBDetId;
45 
47 
48  public:
49 
51 
61  struct Coefficients{
62 
63  Coefficients(){for(unsigned int i=0; i<Coefficients::kSize; ++i) data[i]=0;}
64  Coefficients(const Coefficients& coeff){
65  std::copy(coeff.data,
67  data);
68  }
69 
71  if (this == &coeff) return *this;
73  return *this;
74  }
75 
77  static const int kPolynomialDegree = 4;
78 
80  static const int kNTypes = 8;
81  static const unsigned int kSize = kPolynomialDegree* kNTypes ;
82 
83  double data[kSize];
84 
85 
87 };
88 
89 
91 
93  const Coefficients correctionCoefficients(const EBDetId& centerxtal) const;
94 
96 
97  void fillCorrectionCoefficients(const EBDetId& xtal,
98  int group,
99  const Coefficients& coefficients);
100 
102 
104  void fillCorrectionCoefficients(const int supermodule, const int module,
105  const Coefficients& coefficients);
106 
107 
109 
114  const double correction3x3(const EBDetId& xtal,
115  const math::XYZPoint& pos) const;
116 
117 
119 
124  const double correction5x5(const EBDetId& xtal,
125  const math::XYZPoint& pos) const;
126 
127 
128 
129  private:
130  enum Direction{eX,eY};
131  enum Type{e3x3,e5x5};
132 
134  const double correctionXY(const EBDetId& xtal,
135  double position,
136  Direction dir,
137  Type type) const ;
138 
139 
140  typedef std::map<EBDetId,int> GroupMap;
141 
143  GroupMap groupmap_;
144 
145 
147  std::vector<Coefficients> coefficients_;
148 
149 
151 };
152 
153 #endif
type
Definition: HCALResponse.h:21
def copy(args, dbName)
const double correctionXY(const EBDetId &xtal, double position, Direction dir, Type type) const
static const int kNTypes
Number of types of correction: Left, right, 3x3, 5x5, x, y.
GroupMap groupmap_
Maps in which group a particular xtal has been placed.
Structure defining the container for correction coefficients.
std::vector< Coefficients > coefficients_
Holds the coeffiecients. The index corresponds to the group.
static const int kPolynomialDegree
The degree of the polynomial used as correction function plus one.
const double correction3x3(const EBDetId &xtal, const math::XYZPoint &pos) const
The correction factor for 3x3 matrix.
Coefficients & operator=(const Coefficients &coeff)
const double correction5x5(const EBDetId &xtal, const math::XYZPoint &pos) const
The correction factor for 5x5 matrix.
const Coefficients correctionCoefficients(const EBDetId &centerxtal) const
Get the correction coefficients for the given xtal.
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
#define COND_SERIALIZABLE
Definition: Serializable.h:38
static int position[264][3]
Definition: ReadPGInfo.cc:509
dbl *** dir
Definition: mlp_gen.cc:35
Definition: vlib.h:208
void fillCorrectionCoefficients(const EBDetId &xtal, int group, const Coefficients &coefficients)
Fill the correction coefficients for a given xtal, part of group .