1 #ifndef CALIBCALORIMETRY_HCALALGOS_HCALPULSESHAPES_H
2 #define CALIBCALORIMETRY_HCALALGOS_HCALPULSESHAPES_H 1
20 class HepRandomEngine;
56 static double generatePhotonTime(CLHEP::HepRandomEngine* engine,
unsigned int signalShape);
60 template <
class F1,
class F2>
62 std::vector<double>
result(2 * nbin - 1, 0.);
63 for (
unsigned i = 0;
i < 2 * nbin - 1; ++
i) {
73 static std::vector<double>
normalize(std::vector<double>
nt,
unsigned nbin) {
76 for (
unsigned int j = 1;
j <= nbin; ++
j) {
77 norm += (nt[
j] > 0) ? nt[
j] : 0.;
80 double normInv = 1. / norm;
81 for (
unsigned int j = 1;
j <= nbin; ++
j) {
90 for (
unsigned int j =
std::max(1, -1 * shift);
j <= nbin;
j++) {
93 double normInv = 1. / norm;
94 std::vector<double> nt2(nt.size(), 0);
95 for (
int j = 1;
j <= (int)nbin;
j++) {
97 nt2[
j] = nt[
j -
shift] * normInv;
const Shape & getShape(int shapeType) const
const Shape & heShape() const
static std::vector< double > normalizeShift(std::vector< double > nt, unsigned nbin, int shift)
void computeSiPMShapeHO()
void computeSiPMShapeMCRecoRun3()
const Shape & hoShape(bool sipm=false) const
constexpr bool isNotFinite(T x)
void beginRun(edm::EventSetup const &es)
static double generatePhotonTime206(CLHEP::HepRandomEngine *engine)
static const int nBinsSiPM_
const Shape & shapeForReco(const HcalDetId &detId) const
static double analyticPulseShapeSiPMHE(double t)
static std::vector< double > normalize(std::vector< double > nt, unsigned nbin)
const Shape & shape(const HcalDetId &detId) const
automatically figures out which shape to return
const HcalPulseShape & computeSiPMShapeHE206()
static std::vector< double > convolve(unsigned nbin, F1 f1, F2 f2)
static constexpr float Y11MAX206_
edm::ESGetToken< HcalDbService, HcalDbRecord > theDbServiceToken
static double Y11206(double t)
void computeSiPMShapeData2017()
const HcalPulseShape & computeSiPMShapeHE203()
void computeSiPMShapeData2018()
const HcalDbService * theDbService
static constexpr float invDeltaTSiPM_
const Shape & defaultShape(const HcalDetId &detId) const
in case of conditions problems
static constexpr float deltaTSiPM_
const Shape & hfShape() const
static constexpr float Y11MAX203_
void computeHPDShape(float, float, float, float, float, float, float, float, Shape &)
static double generatePhotonTime(CLHEP::HepRandomEngine *engine, unsigned int signalShape)
std::map< int, Shape const * > const & get_all_shapes() const
std::map< int, const Shape * > ShapeMap
const Shape & hbShape() const
static double Y11203(double t)
static constexpr float Y11RANGE_
static unsigned int const shift
Shape siPMShapeMCRecoRun3_
static double generatePhotonTime203(CLHEP::HepRandomEngine *engine)
static double analyticPulseShapeSiPMHO(double t)