|
ATLAS Offline Software
|
Go to the documentation of this file.
8 const std::string&
name,
13 declareInterface<LArPhysWaveTool>(
this);
16 bool injPcorr[4] = { false , true , true ,
false } ;
20 bool injPtaur[4] = { false , false , true ,
false } ;
41 float& MphysMcali)
const {
60 ATH_MSG_VERBOSE (
"*** Normalisation \t|-> YES (CaliWave peak = " << peak <<
")" );
64 gCaliMB = gCaliMB * (1./peak) ;
79 && larWFParam.
omega0() != 0. ) ;
81 const unsigned N = gCaliMB.
getSize();
82 const double dt = gCaliMB.
getDt() ;
85 if ( ! doInjPointCorr ) {
112 ATH_MSG_VERBOSE (
"*** Physics waveform\t|-> m_MphysMcali = " << MphysMcali );
116 return StatusCode::SUCCESS;
126 for (
unsigned i=0 ;
i<
N ;
i++ ) {
136 const double fstep =
params.fstep() ;
137 const double Tc =
params.tcal() ;
138 const double Td =
params.tdrift() ;
140 if ( fstep==0. )
return ((1.-Tc/Td)-
t/Td)/Tc ;
141 return (1.-fstep)/Tc *
exp (-fstep*
t/Tc)
142 +1./(fstep*Td) * ((1.-fstep)*
exp(-fstep*
t/Tc)-1.);
145 if ( fstep==0. )
return ((1.-Tc/Td)-
t/Td)/Tc
146 + ((
t-Td)/Td+Tc/Td)/Tc ;
147 return (1.-fstep)/Tc *
exp (-fstep*
t/Tc)
148 +1./(fstep*Td) * ( (1.-fstep)*
exp(-fstep*
t/Tc) - 1. )
149 -1./(fstep*Td) * ( (1.-fstep)*
exp(-fstep*(
t-Td)/Tc) - 1. ) ;
189 if ( t<0. || t>=Td )
return 0. ;
205 const double fstep =
params.fstep();
206 const double Tc =
params.tcal();
207 return (1.-fstep)/Tc *
exp( -fstep*
t/Tc );
220 const double tau0 = 1./
params.omega0();
221 const double taur =
params.taur();
224 double sqrtDelta = std::sqrt(Delta) ;
225 double taup = 0.5*( taur + sqrtDelta ) ;
226 double taum = 0.5*( taur - sqrtDelta ) ;
227 return (
exp(-
t/taup) -
exp(-
t/taum) ) / ( taup - taum ) ;
228 }
else if ( Delta < 0 ) {
229 double T = std::sqrt(-Delta) ;
230 double A = 2 * taur / (
std::pow(taur,2) - Delta ) ;
231 double B = 2 *
T / (
std::pow(taur,2) - Delta ) ;
234 double tau = 0.5 * taur ;
238 double taur2 = taur*taur, tau02 = tau0*tau0 ;
239 double taua = sqrt( 4.*tau02 - taur2 );
240 return (2./taua)*
exp(-
t*taur/(2.*tau02))*
sin(
t*taua/(2.*tau02));
size_t getSize() const
number of time samples
unsigned getStart(const LArWave &theWave) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::vector< double > & getWave() const
Wave parameters.
double getBaseline(const LArWave &theWave, unsigned nBase) const
const double & getDt() const
delta time
LArWave translate(const LArWave &theWave, int nShift, double baseline=0.) const
#define ATH_MSG_VERBOSE(x)
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
const double & getSample(const unsigned int i) const
Amplitude per time bin.
::StatusCode StatusCode
StatusCode definition for legacy code.
void setTaur(double taur)
#define ATH_MSG_WARNING(x)
constexpr int pow(int base, int exp) noexcept