ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardDetectors
ZDC
ZdcUtils
ZdcUtils
ZDCWaveformFermiExp.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ZDCUTILS_ZDCWAVEFORMFERMIEXP_H
6
#define ZDCUTILS_ZDCWAVEFORMFERMIEXP_H
7
8
#include "
ZDCWaveform.h
"
9
10
//
11
// The Fermi*negative exponential that we have used since the start of Run 2 to
12
// parameterize ZDC pulses
13
//
14
class
ZDCWaveformFermiExp
:
public
ZDCWaveformBase
15
{
16
protected
:
17
double
doEvaluate
(
double
time)
const override
;
18
19
virtual
std::string
name
()
const override
{
return
"FermiExp"
;}
20
21
public
:
22
ZDCWaveformFermiExp
() =
delete
;
23
24
ZDCWaveformFermiExp
(
const
std::string& tag,
double
initialTauRise,
double
initialTauFall) :
25
ZDCWaveformBase
(tag, initialTauRise, initialTauFall,
std
::
vector
<
std
::
string
>(),
std
::
vector
<double>())
26
{}
27
28
explicit
ZDCWaveformFermiExp
(
const
ZDCWaveformFermiExp
&
instance
) :
29
ZDCWaveformBase
(
instance
.
getTag
(),
instance
.
getTauRise
(),
instance
.
getTauFall
(),
std
::
vector
<
std
::
string
>(),
std
::
vector
<double>()) {};
30
};
31
32
//
33
// A version of the Fermi*negative exponential that has a shift in baseline before and after T0
34
// to describe a small (few %) long tail seen in pulses in the Run 3 data
35
//
36
//
37
class
ZDCWaveformFermiExpTail
:
public
ZDCWaveformFermiExp
38
{
39
double
doEvaluate
(
double
time)
const override
40
{
41
double
tailShift =
getAddtlShapeValue
(0);
42
if
(time <= 0)
return
ZDCWaveformFermiExp::doEvaluate
(time);
43
else
return
ZDCWaveformFermiExp::doEvaluate
(time) + tailShift;
44
}
45
46
virtual
std::string
name
()
const override
{
return
"FermiExpTail"
;}
47
48
public
:
49
ZDCWaveformFermiExpTail
() =
delete
;
50
51
ZDCWaveformFermiExpTail
(
const
std::string& tag,
double
initialTauRise,
double
initialTauFall,
double
tailShiftFrac) :
52
ZDCWaveformFermiExp
(tag, initialTauRise, initialTauFall)
53
{
54
double
tailShiftScaled = tailShiftFrac*
ZDCWaveformFermiExp::doEvaluate
(0);
55
setAddtlShapeParameters
(std::vector<std::string>({
"tailFrac"
}), std::vector<double>({tailShiftScaled}));
56
}
57
58
void
setTailParameter
(
double
tailShiftFrac) {
59
double
tailShiftScaled = tailShiftFrac*
ZDCWaveformFermiExp::doEvaluate
(0);
60
setAddtlShapeValue
(0, tailShiftScaled);
61
}
62
63
};
64
#endif
instance
std::map< std::string, double > instance
Definition
Run_To_Get_Tags.h:8
ZDCWaveform.h
ZDCWaveformBase::getAddtlShapeValue
double getAddtlShapeValue(const std::string &name) const
Definition
ZDCWaveform.h:108
ZDCWaveformBase::setAddtlShapeValue
void setAddtlShapeValue(std::string name, double value)
ZDCWaveformBase::getTauFall
double getTauFall() const
Definition
ZDCWaveform.h:105
ZDCWaveformBase::getTauRise
double getTauRise() const
Definition
ZDCWaveform.h:104
ZDCWaveformBase::getTag
const std::string & getTag() const
Definition
ZDCWaveform.h:101
ZDCWaveformBase::setAddtlShapeParameters
void setAddtlShapeParameters(const std::vector< std::string > &addtlShapeNames, const std::vector< double > &addtlShapeValues)
Definition
ZDCWaveform.cxx:32
ZDCWaveformBase::ZDCWaveformBase
ZDCWaveformBase()=delete
ZDCWaveformFermiExpTail::ZDCWaveformFermiExpTail
ZDCWaveformFermiExpTail()=delete
ZDCWaveformFermiExpTail::name
virtual std::string name() const override
Definition
ZDCWaveformFermiExp.h:46
ZDCWaveformFermiExpTail::doEvaluate
double doEvaluate(double time) const override
Definition
ZDCWaveformFermiExp.h:39
ZDCWaveformFermiExpTail::ZDCWaveformFermiExpTail
ZDCWaveformFermiExpTail(const std::string &tag, double initialTauRise, double initialTauFall, double tailShiftFrac)
Definition
ZDCWaveformFermiExp.h:51
ZDCWaveformFermiExpTail::setTailParameter
void setTailParameter(double tailShiftFrac)
Definition
ZDCWaveformFermiExp.h:58
ZDCWaveformFermiExp::ZDCWaveformFermiExp
ZDCWaveformFermiExp()=delete
ZDCWaveformFermiExp::doEvaluate
double doEvaluate(double time) const override
Definition
ZDCWaveformFermiExp.cxx:7
ZDCWaveformFermiExp::name
virtual std::string name() const override
Definition
ZDCWaveformFermiExp.h:19
ZDCWaveformFermiExp::ZDCWaveformFermiExp
ZDCWaveformFermiExp(const ZDCWaveformFermiExp &instance)
Definition
ZDCWaveformFermiExp.h:28
ZDCWaveformFermiExp::ZDCWaveformFermiExp
ZDCWaveformFermiExp(const std::string &tag, double initialTauRise, double initialTauFall)
Definition
ZDCWaveformFermiExp.h:24
string
STL class.
vector
Definition
MultiHisto.h:13
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.14.0