CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
EBShape Class Reference

#include <EBShape.h>

Inheritance diagram for EBShape:
EcalShapeBase CaloVShape

Public Member Functions

 EBShape ()
 
 EBShape (edm::ConsumesCollector iC)
 
- Public Member Functions inherited from EcalShapeBase
double derivative (double time) const
 
 EcalShapeBase (bool)
 
void m_shape_print (const char *fileName) const
 
double operator() (double aTime) const override
 
void setEventSetup (const edm::EventSetup &evtSetup, bool normalize=true)
 
double threshold () const
 
double timeOfMax () const
 
double timeOfThr () const
 
double timeToRise () const override
 
 ~EcalShapeBase () override
 
- Public Member Functions inherited from CaloVShape
 CaloVShape ()
 
virtual ~CaloVShape ()
 

Protected Member Functions

void fillShape (float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const override
 
- Protected Member Functions inherited from EcalShapeBase
void buildMe (const edm::EventSetup *=nullptr, bool normalize=true)
 
unsigned int timeIndex (double aTime) const
 

Private Attributes

edm::ESGetToken< EcalSimPulseShape, EcalSimPulseShapeRcdespsToken_
 

Additional Inherited Members

- Public Types inherited from EcalShapeBase
typedef std::vector< double > DVec
 
- Protected Attributes inherited from EcalShapeBase
bool m_useDBShape
 

Detailed Description

Definition at line 7 of file EBShape.h.

Constructor & Destructor Documentation

◆ EBShape() [1/2]

EBShape::EBShape ( )
inline

Definition at line 10 of file EBShape.h.

References EcalShapeBase::buildMe().

10 : EcalShapeBase(false) { buildMe(); }
void buildMe(const edm::EventSetup *=nullptr, bool normalize=true)

◆ EBShape() [2/2]

EBShape::EBShape ( edm::ConsumesCollector  iC)
inline

Definition at line 12 of file EBShape.h.

12 : EcalShapeBase(true), espsToken_(iC.esConsumes()) {}
edm::ESGetToken< EcalSimPulseShape, EcalSimPulseShapeRcd > espsToken_
Definition: EBShape.h:21

Member Function Documentation

◆ fillShape()

void EBShape::fillShape ( float &  time_interval,
double &  m_thresh,
EcalShapeBase::DVec aVec,
const edm::EventSetup es 
) const
overrideprotectedvirtual

Implements EcalShapeBase.

Definition at line 5 of file EBShape.cc.

References espsToken_, Exception, JetChargeProducer_cfi::exp, edm::EventSetup::getData(), mps_fire::i, EcalShapeBase::m_thresh, and EcalShapeBase::m_useDBShape.

8  {
9  if (m_useDBShape) {
10  if (es == nullptr) {
11  throw cms::Exception("EcalShapeBase:: DB conditions are not available, const edm::EventSetup* es == nullptr ");
12  }
13  auto const& esps = es->getData(espsToken_);
14 
15  aVec = esps.barrel_shape;
16  time_interval = esps.time_interval;
17  m_thresh = esps.barrel_thresh;
18 
19  } else // use old hardcoded arrays
20  {
21  m_thresh = 0.00013;
22  time_interval = 1.0;
23  aVec.reserve(500);
24  aVec = {
25  6.94068e-05, -5.03304e-05, -2.13404e-05, 6.017e-05, 2.01697e-05, 0.000114845, 2.13998e-05, 2.74476e-05,
26  5.2824e-05, 8.754e-05, 2.95346e-06, -7.58699e-05, -2.72224e-05, 3.10997e-06, -3.97771e-05, -1.06916e-05,
27  -0.000113865, 6.05044e-05, -5.81202e-05, -6.58974e-06, 5.37494e-05, -0.000123729, 7.50938e-06, -1.35628e-05,
28  8.33725e-05, 3.19299e-05, -3.09232e-05, -7.0086e-05, 1.78937e-06, -2.20365e-05, 7.68054e-05, -2.5368e-05,
29  5.67291e-06, 5.87096e-05, -2.62771e-06, 4.31832e-05, 8.33616e-06, 7.27813e-05, 7.6159e-05, -1.60446e-05,
30  -4.12127e-06, -5.93381e-05, 1.61444e-05, -5.49559e-05, 5.55254e-05, 3.32251e-05, -3.15897e-05, 7.86588e-05,
31  -2.9704e-05, 5.66838e-05, 2.85281e-05, -3.02436e-05, -4.16265e-05, -1.63191e-05, 6.61193e-05, 9.23766e-05,
32  6.68903e-05, -3.20994e-05, 0.00011082, -4.07997e-05, -8.29046e-06, -7.42197e-05, -1.64386e-05, 1.02508e-05,
33  7.10995e-06, -5.87486e-05, -0.000101201, 1.62003e-05, -2.53093e-05, 2.65239e-05, -2.68722e-05, -4.02001e-05,
34  5.0674e-05, -1.75884e-05, 4.7902e-05, -1.01079e-05, 1.08427e-05, -0.000112906, 3.33076e-05, 0.000181201,
35  0.000426875, 0.00114222, 0.00237804, 0.00541858, 0.0089021, 0.0149157, 0.0231397, 0.0344671,
36  0.0471013, 0.0625517, 0.0857351, 0.108561, 0.133481, 0.163557, 0.200243, 0.225919,
37  0.269213, 0.302929, 0.342722, 0.378522, 0.436563, 0.467581, 0.510133, 0.550063,
38  0.583509, 0.619187, 0.653245, 0.686101, 0.721178, 0.745129, 0.774163, 0.799011,
39  0.822177, 0.838315, 0.858847, 0.875559, 0.891294, 0.90537, 0.919617, 0.930632,
40  0.936216, 0.947739, 0.955306, 0.961876, 0.968124, 0.97327, 0.977513, 0.984885,
41  0.986497, 0.990039, 0.994798, 0.994884, 0.99795, 0.99834, 0.999607, 1,
42  0.999047, 0.998745, 0.999219, 0.99814, 0.995082, 0.992449, 0.990418, 0.985032,
43  0.982308, 0.978696, 0.975656, 0.971027, 0.964811, 0.959428, 0.95096, 0.947428,
44  0.9419, 0.933223, 0.926482, 0.922172, 0.912777, 0.907388, 0.897289, 0.891889,
45  0.882056, 0.873382, 0.865442, 0.860032, 0.85202, 0.841013, 0.833802, 0.825259,
46  0.815013, 0.807465, 0.799428, 0.792165, 0.783088, 0.773392, 0.764982, 0.752174,
47  0.746487, 0.737678, 0.727396, 0.718692, 0.712737, 0.702738, 0.69559, 0.684389,
48  0.677989, 0.667643, 0.659009, 0.650217, 0.644479, 0.636017, 0.625257, 0.618507,
49  0.609798, 0.600097, 0.592788, 0.584895, 0.578228, 0.569299, 0.560576, 0.552404,
50  0.541405, 0.536271, 0.528734, 0.519813, 0.512264, 0.507001, 0.49828, 0.492416,
51  0.483181, 0.477907, 0.469623, 0.462528, 0.455099, 0.45055, 0.443576, 0.435364,
52  0.429789, 0.422724, 0.415621, 0.409469, 0.40401, 0.398121, 0.391079, 0.384414,
53  0.378214, 0.369851, 0.365966, 0.359865, 0.353505, 0.347899, 0.343829, 0.337585,
54  0.333089, 0.326289, 0.322249, 0.316079, 0.31061, 0.305426, 0.301885, 0.296753,
55  0.290931, 0.286877, 0.281831, 0.276633, 0.272283, 0.268069, 0.26399, 0.258457,
56  0.253549, 0.249493};
57 
58  for (unsigned int i(250); i != 500; ++i)
59  aVec.push_back(exp(2.39735 - 0.0151053 * ((double)i + 1.0)));
60  }
61 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< EcalSimPulseShape, EcalSimPulseShapeRcd > espsToken_
Definition: EBShape.h:21

Member Data Documentation

◆ espsToken_

Definition at line 21 of file EBShape.h.

Referenced by fillShape().