ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloTools
src
L1DynamicPedestalProviderTxt.h
Go to the documentation of this file.
1
2
/*
3
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4
*/
5
/*
6
* @file L1DynamicPedestalProviderTxt.h
7
* @author V. Scharf <vscharf@kip.uni-heidelberg.de>
8
* @date June 2014
9
* @brief Tool to retrieve dynamic pedestal values from a text file.
10
*/
11
12
#ifndef TRIGT1CALOTOOLS_L1DYNAMICPEDESTALPYTHON_H
13
#define TRIGT1CALOTOOLS_L1DYNAMICPEDESTALPYTHON_H
14
15
#include "
TrigT1CaloToolInterfaces/IL1DynamicPedestalProvider.h
"
16
17
#include "
AthenaBaseComps/AthAlgTool.h
"
18
#include "GaudiKernel/ToolHandle.h"
19
#include "
LumiBlockData/BunchCrossingCondData.h
"
20
#include "
StoreGate/ReadCondHandleKey.h
"
21
22
#include <cstdint>
// for guaranteed size-types
23
#include <memory>
24
#include <stdexcept>
25
#include <string>
26
#include <utility>
// std::pair
27
#include <vector>
28
#include <array>
29
30
namespace
LVL1
31
{
35
class
ParseException
:
public
std::runtime_error
36
{
37
public
:
38
ParseException
(
const
std::string& what) :
std
::
runtime_error
(what)
39
{}
40
};
41
53
class
L1DynamicPedestalProviderTxt
:
public
AthAlgTool
,
54
virtual
public
IL1DynamicPedestalProvider
55
{
56
public
:
58
L1DynamicPedestalProviderTxt
(
const
std::string&,
const
std::string&,
const
IInterface*);
59
61
virtual
~L1DynamicPedestalProviderTxt
();
62
64
virtual
StatusCode
initialize
()
override
;
65
67
virtual
int
dynamicPedestal
(
int
iEta,
int
layer,
int
pedestal,
int
iBCID,
float
mu)
const override
;
68
69
// forward declaration for a function that evaluates the correction as function of mu
70
class
ParamFunc
;
71
private
:
72
73
// Stores the the correction for each eta-slice (the "outer" index of the vector) and bcid (the "inner" index).
74
// The first entry of the array is for trains after short gaps, the second for trains after long gaps.
75
std::array<std::vector<std::vector<std::unique_ptr<ParamFunc>>>, 2>
m_emParameterizations
;
76
std::array<std::vector<std::vector<std::unique_ptr<ParamFunc>>>, 2>
m_hadParameterizations
;
77
79
SG::ReadCondHandleKey<BunchCrossingCondData>
m_bcDataKey
80
{
this
,
"BunchCrossingCondDataKey"
,
"BunchCrossingData"
,
"SG Key of BunchCrossing CDO"
};
81
82
std::string
m_inputFileEMShort
;
83
std::string
m_inputFileHADShort
;
84
std::string
m_inputFileEMLong
;
85
std::string
m_inputFileHADLong
;
86
87
// maps the BCID (index) to the distance from the head of the train (after short or long gap)
88
// bool: long-gap train (true); short-gap train (false)
89
std::pair<bool, int>
distanceFromHeadOfTrain
(
int
bcid)
const
;
90
91
// parses the input file
92
void
parseInputFile
(
const
std::string& fileName, std::vector<std::vector<std::unique_ptr<ParamFunc>>>& params);
93
94
static
const
unsigned
s_nElements
= 33;
95
static
const
unsigned
s_nBCIDPerTrain
= 74;
// actually 72 filled BCIDs + one before and one after
96
};
// end of class L1DynamicPedestalProviderTxt
97
}
// end of namespace
98
99
#endif
// TRIGT1CALOTOOLS_L1DYNAMICPEDESTALPYTHON_H
AthAlgTool.h
BunchCrossingCondData.h
Replaces the BunchCrossing AlgTool used in run1/2.
IL1DynamicPedestalProvider.h
ReadCondHandleKey.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
LVL1::IL1DynamicPedestalProvider
Definition
IL1DynamicPedestalProvider.h:22
LVL1::L1DynamicPedestalProviderTxt::ParamFunc
Definition
L1DynamicPedestalProviderTxt.cxx:29
LVL1::L1DynamicPedestalProviderTxt::m_inputFileEMShort
std::string m_inputFileEMShort
Definition
L1DynamicPedestalProviderTxt.h:82
LVL1::L1DynamicPedestalProviderTxt::s_nElements
static const unsigned s_nElements
Definition
L1DynamicPedestalProviderTxt.h:94
LVL1::L1DynamicPedestalProviderTxt::parseInputFile
void parseInputFile(const std::string &fileName, std::vector< std::vector< std::unique_ptr< ParamFunc > > > ¶ms)
Definition
L1DynamicPedestalProviderTxt.cxx:295
LVL1::L1DynamicPedestalProviderTxt::m_inputFileEMLong
std::string m_inputFileEMLong
Definition
L1DynamicPedestalProviderTxt.h:84
LVL1::L1DynamicPedestalProviderTxt::dynamicPedestal
virtual int dynamicPedestal(int iEta, int layer, int pedestal, int iBCID, float mu) const override
retrieve the bcidCorrection value
Definition
L1DynamicPedestalProviderTxt.cxx:205
LVL1::L1DynamicPedestalProviderTxt::L1DynamicPedestalProviderTxt
L1DynamicPedestalProviderTxt(const std::string &, const std::string &, const IInterface *)
constructor
Definition
L1DynamicPedestalProviderTxt.cxx:52
LVL1::L1DynamicPedestalProviderTxt::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition
L1DynamicPedestalProviderTxt.cxx:87
LVL1::L1DynamicPedestalProviderTxt::~L1DynamicPedestalProviderTxt
virtual ~L1DynamicPedestalProviderTxt()
default destructor
Definition
L1DynamicPedestalProviderTxt.cxx:80
LVL1::L1DynamicPedestalProviderTxt::s_nBCIDPerTrain
static const unsigned s_nBCIDPerTrain
Definition
L1DynamicPedestalProviderTxt.h:95
LVL1::L1DynamicPedestalProviderTxt::distanceFromHeadOfTrain
std::pair< bool, int > distanceFromHeadOfTrain(int bcid) const
Definition
L1DynamicPedestalProviderTxt.cxx:179
LVL1::L1DynamicPedestalProviderTxt::m_emParameterizations
std::array< std::vector< std::vector< std::unique_ptr< ParamFunc > > >, 2 > m_emParameterizations
Definition
L1DynamicPedestalProviderTxt.h:75
LVL1::L1DynamicPedestalProviderTxt::m_inputFileHADShort
std::string m_inputFileHADShort
Definition
L1DynamicPedestalProviderTxt.h:83
LVL1::L1DynamicPedestalProviderTxt::m_inputFileHADLong
std::string m_inputFileHADLong
Definition
L1DynamicPedestalProviderTxt.h:85
LVL1::L1DynamicPedestalProviderTxt::m_bcDataKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Definition
L1DynamicPedestalProviderTxt.h:80
LVL1::L1DynamicPedestalProviderTxt::m_hadParameterizations
std::array< std::vector< std::vector< std::unique_ptr< ParamFunc > > >, 2 > m_hadParameterizations
Definition
L1DynamicPedestalProviderTxt.h:76
LVL1::ParseException::ParseException
ParseException(const std::string &what)
Definition
L1DynamicPedestalProviderTxt.h:38
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
runtime_error
STL class.
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0