#include <HcalPulseShapes.h>
Classes | |
class | Shape |
Public Member Functions | |
const Shape & | hbShape () const |
HcalPulseShapes () | |
const Shape & | heShape () const |
const Shape & | hfShape () const |
const Shape & | hoShape (bool sipm=false) const |
Private Member Functions | |
void | computeHFShape (Shape &s) |
void | computeHPDShape (Shape &s) |
Private Attributes | |
Shape | hfShape_ |
Shape | hpdShape_ |
HcalPulseShapes::HcalPulseShapes | ( | ) |
Definition at line 4 of file HcalPulseShapes.cc.
References computeHFShape(), computeHPDShape(), hfShape_, and hpdShape_.
void HcalPulseShapes::computeHFShape | ( | HcalPulseShapes::Shape & | sh | ) | [private] |
Definition at line 110 of file HcalPulseShapes.cc.
References funct::exp(), j, lumiNorm::norm, HcalPulseShapes::Shape::setNBin(), and HcalPulseShapes::Shape::setShapeBin().
Referenced by HcalPulseShapes().
{ // cout << endl << " ===== computeShapeHF !!! " << endl << endl; const float ts = 3.0; // time constant in t * exp(-(t/ts)**2) // first create pulse shape over a range of time 0 ns to 255 ns in 1 ns steps int nbin = 256; sh.setNBin(nbin); std::vector<float> ntmp(nbin,0.0); // int j; float norm; // HF SHAPE norm = 0.0; for( j = 0; j < 3 * ts && j < nbin; j++){ ntmp[j] = ((float)j)*exp(-((float)(j*j))/(ts*ts)); norm += ntmp[j]; } // normalize pulse area to 1.0 for( j = 0; j < 3 * ts && j < nbin; j++){ ntmp[j] /= norm; // cout << " nt [" << j << "] = " << ntmp[j] << endl; sh.setShapeBin(j,ntmp[j]); } }
void HcalPulseShapes::computeHPDShape | ( | HcalPulseShapes::Shape & | sh | ) | [private] |
Definition at line 10 of file HcalPulseShapes.cc.
References funct::exp(), i, j, gen::k, lumiNorm::norm, HcalPulseShapes::Shape::setNBin(), HcalPulseShapes::Shape::setShapeBin(), and tmax.
Referenced by HcalPulseShapes().
{ // pulse shape time constants in ns const float ts1 = 8.; // scintillation time constants : 1,2,3 const float ts2 = 10.; const float ts3 = 29.3; const float thpd = 4.; // HPD current collection drift time const float tpre = 9.; // preamp time constant (refit on TB04 data) const float wd1 = 2.; // relative weights of decay exponents const float wd2 = 0.7; const float wd3 = 1.; // pulse shape componnts over a range of time 0 ns to 255 ns in 1 ns steps int nbin = 256; sh.setNBin(nbin); std::vector<float> ntmp(nbin,0.0); // zeroing output pulse shape std::vector<float> nth(nbin,0.0); // zeroing HPD drift shape std::vector<float> ntp(nbin,0.0); // zeroing Binkley preamp shape std::vector<float> ntd(nbin,0.0); // zeroing Scintillator decay shape int i,j,k; float norm; // HPD starts at I and rises to 2I in thpd of time norm=0.0; for(j=0;j<thpd && j<nbin;j++){ nth[j] = 1.0 + ((float)j)/thpd; norm += nth[j]; } // normalize integrated current to 1.0 for(j=0;j<thpd && j<nbin;j++){ nth[j] /= norm; } // Binkley shape over 6 time constants norm=0.0; for(j=0;j<6*tpre && j<nbin;j++){ ntp[j] = ((float)j)*exp(-((float)(j*j))/(tpre*tpre)); norm += ntp[j]; } // normalize pulse area to 1.0 for(j=0;j<6*tpre && j<nbin;j++){ ntp[j] /= norm; } // ignore stochastic variation of photoelectron emission // <...> // effective tile plus wave-length shifter decay time over 4 time constants int tmax = 6 * (int)ts3; norm=0.0; for(j=0;j<tmax && j<nbin;j++){ ntd[j] = wd1 * exp(-((float)j)/ts1) + wd2 * exp(-((float)j)/ts2) + wd3 * exp(-((float)j)/ts3) ; norm += ntd[j]; } // normalize pulse area to 1.0 for(j=0;j<tmax && j<nbin;j++){ ntd[j] /= norm; } int t1,t2,t3,t4; for(i=0;i<tmax && i<nbin;i++){ t1 = i; // t2 = t1 + top*rand; // ignoring jitter from optical path length t2 = t1; for(j=0;j<thpd && j<nbin;j++){ t3 = t2 + j; for(k=0;k<4*tpre && k<nbin;k++){ // here "4" is set deliberately, t4 = t3 + k; // as in test fortran toy MC ... if(t4<nbin){ int ntb=t4; ntmp[ntb] += ntd[i]*nth[j]*ntp[k]; } } } } // normalize for 1 GeV pulse height norm = 0.; for(i=0;i<nbin;i++){ norm += ntmp[i]; } //cout << " Convoluted SHAPE ============== " << endl; for(i=0; i<nbin; i++){ ntmp[i] /= norm; // cout << " shape " << i << " = " << ntmp[i] << endl; } for(i=0; i<nbin; i++){ sh.setShapeBin(i,ntmp[i]); } }
const Shape& HcalPulseShapes::hbShape | ( | ) | const [inline] |
Definition at line 32 of file HcalPulseShapes.h.
References hpdShape_.
Referenced by HBHEPulseShapeFlagSetter::Initialize(), HcalNoiseMonitor::ReadHcalPulse(), and RecoFCcorFactorAlgo< S >::RecoFCcorFactorAlgo().
{ return hpdShape_; }
const Shape& HcalPulseShapes::heShape | ( | ) | const [inline] |
const Shape& HcalPulseShapes::hfShape | ( | ) | const [inline] |
const Shape& HcalPulseShapes::hoShape | ( | bool | sipm = false | ) | const [inline] |
Shape HcalPulseShapes::hfShape_ [private] |
Definition at line 38 of file HcalPulseShapes.h.
Referenced by HcalPulseShapes(), and hfShape().
Shape HcalPulseShapes::hpdShape_ [private] |
Definition at line 38 of file HcalPulseShapes.h.
Referenced by hbShape(), HcalPulseShapes(), heShape(), and hoShape().