15#include "GaudiKernel/IMessageSvc.h"
16#include "GaudiKernel/GaudiException.h"
53 throw GaudiException(std::string(
"could not load pulseshape from file: ") + fileName.Data(),
54 "TilePulseShape", StatusCode::FAILURE);
55 }
else ATH_MSG_INFO(
"Loaded pulseshape from file: " << fileName);
65 for(std::vector<double>::size_type i = 0; i != shapevec.size(); i++) {
100 y = 0.00196 * (1 - exp(-
x / 20664.59) ) - 0.00217;
104 ATH_MSG_DEBUG(
"Right out of bounds. Replacing y = " << (
m_deformedShape->GetY())[0] <<
" with y = 0. (idx = " << idx <<
", x = " <<
x <<
")");
113 double yLinear = yLo + (yHi-yLo)/(xHi-xLo) * (
x-xLo);
117 if(useSpline)
y = ySpline;
143 ATH_MSG_WARNING(
"Attempted pulse shape scaling before loading pulse shape");
152 else if(
x>0.)
x*=rightSF;
168 for(
int i=0; i<
gr->GetN(); i++){
#define ATH_MSG_WARNING(x)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
double eval(double x, bool useSpline=true, bool useUndershoot=false)
void setPulseShape(const std::vector< double > &shapevec)
TGraph * getGraph(double t0=0., double ped=0., double amp=1.)
virtual ~TilePulseShape()
TSpline * m_deformedSpline
int scalePulse(double leftSF=1., double rightSF=1.)
void loadPulseShape(const TString &fileName)
TilePulseShape(IMessageSvc *msgSvc, const std::string &name)