ATLAS Offline Software
Loading...
Searching...
No Matches
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//
15{
16protected:
17 double doEvaluate(double time) const override;
18
19 virtual std::string name() const override {return "FermiExp";}
20
21public:
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
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//
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
48public:
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
std::map< std::string, double > instance
double getAddtlShapeValue(const std::string &name) const
void setAddtlShapeValue(std::string name, double value)
double getTauFall() const
double getTauRise() const
const std::string & getTag() const
void setAddtlShapeParameters(const std::vector< std::string > &addtlShapeNames, const std::vector< double > &addtlShapeValues)
ZDCWaveformBase()=delete
ZDCWaveformFermiExpTail()=delete
virtual std::string name() const override
double doEvaluate(double time) const override
ZDCWaveformFermiExpTail(const std::string &tag, double initialTauRise, double initialTauFall, double tailShiftFrac)
void setTailParameter(double tailShiftFrac)
ZDCWaveformFermiExp()=delete
double doEvaluate(double time) const override
virtual std::string name() const override
ZDCWaveformFermiExp(const ZDCWaveformFermiExp &instance)
ZDCWaveformFermiExp(const std::string &tag, double initialTauRise, double initialTauFall)
STL class.
STL namespace.