ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCOOLConditions
LArCOOLConditions
LArOFCSC.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//Dear emacs, this is -*-c++-*-
6
#ifndef LARCOOLCONDITIONS_LAROFCSC_H
7
#define LARCOOLCONDITIONS_LAROFCSC_H
8
9
#include "
LArElecCalib/ILArOFC.h
"
10
#include "
LArCOOLConditions/LArCondSuperCellBase.h
"
11
#include "
Identifier/IdentifierHash.h
"
12
#include "
LArIdentifier/LArOnlineID.h
"
13
#include "
LArElecCalib/LArCalibErrorCode.h
"
14
#include <vector>
15
16
class
CondAttrListCollection
;
17
18
class
LArOFCSC
:
public
ILArOFC
,
public
LArCondSuperCellBase
{
19
20
private
:
21
LArOFCSC
();
22
23
public
:
24
typedef
ILArOFC::OFCRef_t
OFCRef_t
;
25
enum
{
ERRORCODE
=
LArElecCalib::ERRORCODE
};
26
27
LArOFCSC
(
const
CondAttrListCollection
* attrList);
28
virtual
~LArOFCSC
( );
29
30
bool
good
()
const
{
return
m_isInitialized
&&
m_nChannels
>0; }
31
32
33
34
// retrieving coefficients using online ID
35
36
virtual
OFCRef_t
OFC_a
(
const
HWIdentifier
& CellID,
37
int
gain,
38
int
tbin=0)
const
;
39
40
virtual
OFCRef_t
OFC_b
(
const
HWIdentifier
& CellID,
41
int
gain,
42
int
tbin=0)
const
;
43
44
45
46
OFCRef_t
OFC_a
(
const
IdentifierHash
& hs,
int
gain)
const
{
47
const
float
* pStart=
m_pOFCa
[gain]+(hs*
m_nSamples
);
48
if
(*pStart==
ERRORCODE
)
49
return
OFCRef_t
(NULL,NULL);
50
else
51
return
OFCRef_t
(pStart,pStart+
m_nSamples
);
52
}
53
54
OFCRef_t
OFC_b
(
const
IdentifierHash
& hs,
int
gain)
const
{
55
const
float
* pStart=
m_pOFCb
[gain]+(hs*
m_nSamples
);
56
if
(*pStart==
ERRORCODE
)
57
return
OFCRef_t
(NULL,NULL);
58
else
59
return
OFCRef_t
(pStart,pStart+
m_nSamples
);
60
}
61
62
63
// retrieving time offset using online/offline ID
64
65
virtual
float
timeOffset
(
const
HWIdentifier
& CellID,
int
gain)
const
;
66
67
//For the TB / cosmic case: retrieve the number of time-bins (aka "phases")
68
virtual
unsigned
nTimeBins
(
const
HWIdentifier
& CellID,
int
gain)
const
;
69
70
//For the TB / cosmic case: retrieve the witdth of the time bin (default 24 bins in 25 ns)
71
virtual
float
timeBinWidth
(
const
HWIdentifier
& CellID,
int
gain)
const
;
72
73
74
private
:
75
std::vector<const float*>
m_pOFCa
;
76
std::vector<const float*>
m_pOFCb
;
77
std::vector<const float*>
m_pTimeOffset
;
78
79
unsigned
m_nChannels
;
80
unsigned
m_nSamples
;
81
};
82
83
#include "
AthenaKernel/CondCont.h
"
84
CLASS_DEF
(
LArOFCSC
, 12142771, 1)
85
CONDCONT_DEF
(
LArOFCSC
, 41952481,
ILArOFC
);
86
87
88
#endif
CondCont.h
Hold mappings of ranges to condition objects.
CONDCONT_DEF
#define CONDCONT_DEF(...)
Definition
CondCont.h:1413
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
ILArOFC.h
IdentifierHash.h
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
LArCondSuperCellBase.h
LArOnlineID.h
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number.
Definition
CondAttrListCollection.h:51
HWIdentifier
Definition
HWIdentifier.h:13
ILArOFC
Definition
ILArOFC.h:14
ILArOFC::OFCRef_t
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
Definition
ILArOFC.h:26
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
LArCondSuperCellBase::m_isInitialized
bool m_isInitialized
Definition
LArCondSuperCellBase.h:22
LArCondSuperCellBase::LArCondSuperCellBase
LArCondSuperCellBase(const std::string &name)
Definition
LArCondSuperCellBase.cxx:14
LArOFCSC
Definition
LArOFCSC.h:18
LArOFCSC::m_nChannels
unsigned m_nChannels
Definition
LArOFCSC.h:79
LArOFCSC::m_nSamples
unsigned m_nSamples
Definition
LArOFCSC.h:80
LArOFCSC::OFC_b
virtual OFCRef_t OFC_b(const HWIdentifier &CellID, int gain, int tbin=0) const
Definition
LArOFCSC.cxx:85
LArOFCSC::timeOffset
virtual float timeOffset(const HWIdentifier &CellID, int gain) const
Definition
LArOFCSC.cxx:90
LArOFCSC::m_pTimeOffset
std::vector< const float * > m_pTimeOffset
Definition
LArOFCSC.h:77
LArOFCSC::nTimeBins
virtual unsigned nTimeBins(const HWIdentifier &CellID, int gain) const
Definition
LArOFCSC.cxx:96
LArOFCSC::~LArOFCSC
virtual ~LArOFCSC()
Definition
LArOFCSC.cxx:16
LArOFCSC::good
bool good() const
Definition
LArOFCSC.h:30
LArOFCSC::OFC_a
virtual OFCRef_t OFC_a(const HWIdentifier &CellID, int gain, int tbin=0) const
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
Definition
LArOFCSC.cxx:80
LArOFCSC::OFCRef_t
ILArOFC::OFCRef_t OFCRef_t
Definition
LArOFCSC.h:24
LArOFCSC::m_pOFCb
std::vector< const float * > m_pOFCb
Definition
LArOFCSC.h:76
LArOFCSC::LArOFCSC
LArOFCSC()
Definition
LArOFCSC.cxx:9
LArOFCSC::timeBinWidth
virtual float timeBinWidth(const HWIdentifier &CellID, int gain) const
Definition
LArOFCSC.cxx:101
LArOFCSC::OFC_a
OFCRef_t OFC_a(const IdentifierHash &hs, int gain) const
Definition
LArOFCSC.h:46
LArOFCSC::m_pOFCa
std::vector< const float * > m_pOFCa
Definition
LArOFCSC.h:75
LArOFCSC::OFC_b
OFCRef_t OFC_b(const IdentifierHash &hs, int gain) const
Definition
LArOFCSC.h:54
LArOFCSC::ERRORCODE
@ ERRORCODE
Definition
LArOFCSC.h:25
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition
LArCalibErrorCode.h:17
Generated on
for ATLAS Offline Software by
1.17.0