ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
LArOFC Class Reference

#include <LArOFC.h>

Inheritance diagram for LArOFC:
Collaboration diagram for LArOFC:

Public Types

typedef LArVectorProxy OFCRef_t
 This class defines the interface for accessing Optimal Filtering coefficients for each channel provide both offline and online ID access. More...
 

Public Member Functions

 LArOFC (const LArOnlineID_Base *onlineID, const LArOnOffIdMapping *cabling, const size_t nGains)
 
virtual ~LArOFC ()
 
bool setOFC (const IdentifierHash &hid, const int gain, std::pair< std::vector< float >, std::vector< float >> ofcab)
 
virtual ILArOFC::OFCRef_t OFC_a (const HWIdentifier &id, int gain, int tbin=0) const
 access to OFCs by online ID, gain, and tbin (!=0 for testbeam) More...
 
virtual ILArOFC::OFCRef_t OFC_b (const HWIdentifier &id, int gain, int tbin=0) const
 
virtual ILArOFC::OFCRef_t OFC_a (const Identifier &id, int gain, int tbin=0) const
 
virtual ILArOFC::OFCRef_t OFC_b (const Identifier &id, int gain, int tbin=0) const
 
virtual float timeOffset (const HWIdentifier &id, int gain) const
 
virtual float timeOffset (const Identifier &CellID, int gain) const
 
virtual unsigned nTimeBins (const HWIdentifier &id, int gain) const
 
virtual unsigned nTimeBins (const Identifier &CellID, int gain) const
 
virtual float timeBinWidth (const HWIdentifier &id, int gain) const
 
virtual float timeBinWidth (const Identifier &CellID, int gain) const
 

Private Types

typedef std::vector< std::vector< float > > vecOFCa
 
typedef std::vector< std::vector< float > > vecOFCb
 

Private Attributes

std::array< vecOFCa, CaloGain::LARNGAINm_OFCa
 
std::array< vecOFCa, CaloGain::LARNGAINm_OFCb
 
const LArOnlineID_Basem_onlineID
 
const LArOnOffIdMappingm_cabling
 

Detailed Description

Definition at line 19 of file LArOFC.h.

Member Typedef Documentation

◆ OFCRef_t

typedef LArVectorProxy ILArOFC::OFCRef_t
inherited

This class defines the interface for accessing Optimal Filtering coefficients for each channel provide both offline and online ID access.

Author
W.Lampl, S.Laplace
Version
0-0-1 , 10/12/2003

History:

  • 08/02/2004, S. Laplace: new online ID

Definition at line 26 of file ILArOFC.h.

◆ vecOFCa

typedef std::vector<std::vector<float> > LArOFC::vecOFCa
private

Definition at line 56 of file LArOFC.h.

◆ vecOFCb

typedef std::vector<std::vector<float> > LArOFC::vecOFCb
private

Definition at line 57 of file LArOFC.h.

Constructor & Destructor Documentation

◆ LArOFC()

LArOFC::LArOFC ( const LArOnlineID_Base onlineID,
const LArOnOffIdMapping cabling,
const size_t  nGains 
)

Definition at line 10 of file LArOFC.cxx.

10  :
11  m_onlineID(onlineID),
13 
14  assert(m_onlineID);
15  assert(nGains<=CaloGain::LARNGAIN && nGains>0);
16 
17  for (size_t i=0;i<nGains;++i) {
18  m_OFCa[i].resize(onlineID->channelHashMax());
19  m_OFCb[i].resize(onlineID->channelHashMax());
20  }
21 
22 }

◆ ~LArOFC()

LArOFC::~LArOFC ( )
virtual

Definition at line 24 of file LArOFC.cxx.

24 {}

Member Function Documentation

◆ nTimeBins() [1/2]

unsigned LArOFC::nTimeBins ( const HWIdentifier id,
int  gain 
) const
virtual

Implements ILArOFC.

Definition at line 59 of file LArOFC.cxx.

59  {
60  return 1;
61 }

◆ nTimeBins() [2/2]

unsigned LArOFC::nTimeBins ( const Identifier CellID,
int  gain 
) const
virtual

Definition at line 62 of file LArOFC.cxx.

62  {
63  return 1;
64 }

◆ OFC_a() [1/2]

ILArOFC::OFCRef_t LArOFC::OFC_a ( const HWIdentifier id,
int  gain,
int  tbin = 0 
) const
virtual

access to OFCs by online ID, gain, and tbin (!=0 for testbeam)

Implements ILArOFC.

Definition at line 33 of file LArOFC.cxx.

33  {
34  const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
35  return m_OFCa[gain][hid];
36 }

◆ OFC_a() [2/2]

ILArOFC::OFCRef_t LArOFC::OFC_a ( const Identifier id,
int  gain,
int  tbin = 0 
) const
virtual

Definition at line 38 of file LArOFC.cxx.

38  {
40  return this->OFC_a(hwid, gain);
41 }

◆ OFC_b() [1/2]

ILArOFC::OFCRef_t LArOFC::OFC_b ( const HWIdentifier id,
int  gain,
int  tbin = 0 
) const
virtual

Implements ILArOFC.

Definition at line 43 of file LArOFC.cxx.

43  {
44  const IdentifierHash hid = m_onlineID->channel_Hash(hwid);
45  return m_OFCb[gain][hid];
46 }

◆ OFC_b() [2/2]

ILArOFC::OFCRef_t LArOFC::OFC_b ( const Identifier id,
int  gain,
int  tbin = 0 
) const
virtual

Definition at line 48 of file LArOFC.cxx.

48  {
50  return this->OFC_b(hwid, gain);
51 }

◆ setOFC()

bool LArOFC::setOFC ( const IdentifierHash hid,
const int  gain,
std::pair< std::vector< float >, std::vector< float >>  ofcab 
)

Definition at line 26 of file LArOFC.cxx.

26  {
27  if (gain >= CaloGain::LARNGAIN || hid >= m_OFCa[gain].size()) return false;
28  m_OFCa[gain][hid].swap(ofcab.first);
29  m_OFCb[gain][hid].swap(ofcab.second);
30  return true;
31 }

◆ timeBinWidth() [1/2]

float LArOFC::timeBinWidth ( const HWIdentifier id,
int  gain 
) const
virtual

Implements ILArOFC.

Definition at line 65 of file LArOFC.cxx.

65  {
66  return 1;
67 }

◆ timeBinWidth() [2/2]

float LArOFC::timeBinWidth ( const Identifier CellID,
int  gain 
) const
virtual

Definition at line 68 of file LArOFC.cxx.

68  {
69  return 1;
70 }

◆ timeOffset() [1/2]

float LArOFC::timeOffset ( const HWIdentifier id,
int  gain 
) const
virtual

Implements ILArOFC.

Definition at line 53 of file LArOFC.cxx.

53  {
54  return 0;
55 }

◆ timeOffset() [2/2]

float LArOFC::timeOffset ( const Identifier CellID,
int  gain 
) const
virtual

Definition at line 56 of file LArOFC.cxx.

56  {
57  return 0;
58 }

Member Data Documentation

◆ m_cabling

const LArOnOffIdMapping* LArOFC::m_cabling
private

Definition at line 65 of file LArOFC.h.

◆ m_OFCa

std::array<vecOFCa, CaloGain::LARNGAIN> LArOFC::m_OFCa
private

Definition at line 61 of file LArOFC.h.

◆ m_OFCb

std::array<vecOFCa, CaloGain::LARNGAIN> LArOFC::m_OFCb
private

Definition at line 62 of file LArOFC.h.

◆ m_onlineID

const LArOnlineID_Base* LArOFC::m_onlineID
private

Definition at line 64 of file LArOFC.h.


The documentation for this class was generated from the following files:
LArOnlineID_Base::channel_Hash
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
Definition: LArOnlineID_Base.cxx:1632
LArOFC::m_cabling
const LArOnOffIdMapping * m_cabling
Definition: LArOFC.h:65
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArOFC::OFC_b
virtual ILArOFC::OFCRef_t OFC_b(const HWIdentifier &id, int gain, int tbin=0) const
Definition: LArOFC.cxx:43
HWIdentifier
Definition: HWIdentifier.h:13
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArOFC::m_onlineID
const LArOnlineID_Base * m_onlineID
Definition: LArOFC.h:64
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArOnOffIdMapping::createSignalChannelID
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
Definition: LArOnOffIdMapping.h:126
LArOnlineID_Base::channelHashMax
size_type channelHashMax(void) const
Define channel hash tables max size.
Definition: LArOnlineID_Base.cxx:1897
LArOFC::m_OFCb
std::array< vecOFCa, CaloGain::LARNGAIN > m_OFCb
Definition: LArOFC.h:62
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
LArOFC::OFC_a
virtual ILArOFC::OFCRef_t OFC_a(const HWIdentifier &id, int gain, int tbin=0) const
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
Definition: LArOFC.cxx:33
LArOFC::m_OFCa
std::array< vecOFCa, CaloGain::LARNGAIN > m_OFCa
Definition: LArOFC.h:61