ATLAS Offline Software
ZDCWaveformLTLinStep.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 {
9  double tauRise = getTauRise();
10  double tauFall = getTauFall();
11  double tauLin = getAddtlShapeValue(0);
12 
13  // The maximum occurs after the turnon of the pulse, that should be t = 0
14  //
15  double timeMax = std::log((1.0 - std::exp(tauLin/tauRise))/(1.0 - std::exp(tauLin/tauFall)))/(1./tauRise-1./tauFall);
16  double timeAdj = time + timeMax;
17 
18  if (timeAdj < 0) return 0;
19 
20  double term1 = (tauFall*(1.0 - std::exp(-timeAdj/tauFall)) - tauRise*(1.0 - std::exp(-timeAdj/tauRise)));
21  double term2 = 0.;
22 
23  if (timeAdj > tauLin) term2 = (-tauFall*(1.0 - std::exp(-(timeAdj-tauLin)/tauFall)) +
24  tauRise*(1.0 - std::exp(-(timeAdj-tauLin)/tauRise)));
25 
26  return tauRise/tauLin*(term1 + term2)/ (tauFall-tauRise);
27 }
28 
ZDCWaveformLTLinStep::doEvaluate
double doEvaluate(double time) const override
Definition: ZDCWaveformLTLinStep.cxx:7
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
ZDCWaveformBase::getTauRise
double getTauRise() const
Definition: ZDCWaveform.h:104
ZDCWaveformBase::getAddtlShapeValue
double getAddtlShapeValue(const std::string &name) const
Definition: ZDCWaveform.h:108
ZDCWaveformLTLinStep.h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ZDCWaveformBase::getTauFall
double getTauFall() const
Definition: ZDCWaveform.h:105