CMS 3D CMS Logo

EcalGlobalShowerContainmentCorrectionsVsEta.cc
Go to the documentation of this file.
1 // Implementation of class EcalGlobalShowerContainmentCorrectionsVsEta
2 // Author: Paolo Meridiani
3 // $Id: EcalGlobalShowerContainmentCorrectionsVsEta.cc,v 1.1 2007/07/13 17:37:04 meridian Exp $
4 
9 //#include <iostream>
10 
11 
14  return coefficients_;
15 }
16 
17 
18 void
20 {
21  coefficients_=coefficients;
22 }
23 
25 const double
28  ) const
29 {
30  if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalBarrel )
31  {
32  int offset=0;
33 
34  if (type==e5x5) offset+= Coefficients::kCoefficients;
35 
36  double corr=0;
37 
38  if (EBDetId(xtal).ieta() < coefficients_.data[0])
39  corr=coefficients_.data[1];
40  else
41  corr=coefficients_.data[1] + coefficients_.data[2] * pow ( EBDetId(xtal).ieta() - coefficients_.data[0] , 2);
42 
43  return corr;
44  }
45  else if (xtal.det() == DetId::Ecal && xtal.subdetId() == EcalEndcap )
46  return 1.;
47  else
48  return -1;
49 }
50 
51 const double
53 {
54  double corr = correction(xtal,e3x3);
55  return corr;
56 }
57 
58 
59 
60 
61 const double
63 {
64  double corr = correction(xtal,e5x5);
65  return corr;
66 }
67 
type
Definition: HCALResponse.h:21
const double correction3x3(const DetId &xtal) const
The correction factor for 3x3 matrix.
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.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
static const int kCoefficients
The degree of the polynomial used as correction function plus one.
JetCorrectorParameters corr
Definition: classes.h:5
Definition: DetId.h:18
void fillCorrectionCoefficients(const Coefficients &coefficients)
Fill the correction coefficients.
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39