ATLAS Offline Software
Loading...
Searching...
No Matches
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
7double ZDCWaveformLTLinStep::doEvaluate(double time) const
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
double getAddtlShapeValue(const std::string &name) const
double getTauFall() const
double getTauRise() const
double doEvaluate(double time) const override