ATLAS Offline Software
LArAutoCorrTotal.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARRAWCONDITIONS_LARAUTOCORRTOTAL
6 #define LARRAWCONDITIONS_LARAUTOCORRTOTAL
7 
13 
14 #include <vector>
15 #include <array>
16 
17 class LArOnlineID_Base;
18 
20 
21 public:
22  LArAutoCorrTotal() = delete;
23  LArAutoCorrTotal(const LArOnlineID_Base *onlineID, const LArOnOffIdMapping *cabling, const size_t nGains);
25 
26  // FIXME: Tool implementation indexes float vector by an unsigned int id32
27  // derived from HWIdentifier
28  // here, IdentifierHash is used, which is certainly indexed from 0. This makes
29  // it possible to be used
30  // as the index for vecAutoCorrTotal.
31  // is id32 indexed from 0? if id32 is used, we may need to change the data
32  // structure.
33  // and modify the accessors.
34 
35  bool set(const IdentifierHash &hid, const int gain,
36  std::vector<float> &autocorrtotal);
37 
38  const std::vector<double> computeAutoCorr(const std::vector<float>& terms,
39  float Nminbias) const;
40 
41  const std::vector<double> autoCorrTotal(const IdentifierHash &hid, int gain,
42  float Nminbias) const;
43  const std::vector<double> autoCorrTotal(const HWIdentifier &hwid, int gain,
44  float Nminbias) const;
45  const std::vector<double> autoCorrTotal(const Identifier &id, int gain,
46  float Nminbias) const;
47 
48  const std::vector<double> computeRMS(const std::vector<float>& terms,
49  float Nminbias) const;
50 
51  const std::vector<double> samplRMS(const IdentifierHash &hid, int gain,
52  float Nminbias) const;
53  const std::vector<double> samplRMS(const HWIdentifier &hwid, int gain,
54  float Nminbias) const;
55  const std::vector<double> samplRMS(const Identifier &id, int gain,
56  float Nminbias) const;
57 
58 private:
59  // dimensions n x m
60  // n: number of IDs
61  // m: number of possible non-trivial N(N-1)/2 terms of the autocorr matrix
62  typedef std::vector<std::vector<float> > vecAutoCorrTotal;
63 
64  // dimensions k x (n x m)
65  // k: 3 (value of enum LARNGAIN)
66  std::array<vecAutoCorrTotal, CaloGain::LARNGAIN> m_AutoCorrTotal;
67 
70 };
71 
72 #include "AthenaKernel/CLASS_DEF.h"
73 CLASS_DEF(LArAutoCorrTotal, 204702932, 1)
74 #include "AthenaKernel/CondCont.h"
76 
77 #endif
LArAutoCorrTotal::m_onlineID
const LArOnlineID_Base * m_onlineID
Definition: LArAutoCorrTotal.h:68
LArOnlineID_Base.h
LArAutoCorrTotal::set
bool set(const IdentifierHash &hid, const int gain, std::vector< float > &autocorrtotal)
Definition: LArAutoCorrTotal.cxx:23
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArAutoCorrTotal
Definition: LArAutoCorrTotal.h:19
HWIdentifier
Definition: HWIdentifier.h:13
LArAutoCorrTotal::autoCorrTotal
const std::vector< double > autoCorrTotal(const IdentifierHash &hid, int gain, float Nminbias) const
Definition: LArAutoCorrTotal.cxx:58
LArAutoCorrTotal::vecAutoCorrTotal
std::vector< std::vector< float > > vecAutoCorrTotal
Definition: LArAutoCorrTotal.h:62
LArAutoCorrTotal::m_cabling
const LArOnOffIdMapping * m_cabling
Definition: LArAutoCorrTotal.h:69
LArAutoCorrTotal::computeRMS
const std::vector< double > computeRMS(const std::vector< float > &terms, float Nminbias) const
Definition: LArAutoCorrTotal.cxx:77
LArOnOffIdMapping.h
LArAutoCorrTotal::computeAutoCorr
const std::vector< double > computeAutoCorr(const std::vector< float > &terms, float Nminbias) const
Definition: LArAutoCorrTotal.cxx:35
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
CONDCONT_DEF
CONDCONT_DEF(LArAutoCorrTotal, 194641932)
LArAutoCorrTotal::samplRMS
const std::vector< double > samplRMS(const IdentifierHash &hid, int gain, float Nminbias) const
Definition: LArAutoCorrTotal.cxx:90
LArAutoCorrTotal::LArAutoCorrTotal
LArAutoCorrTotal()=delete
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
HWIdentifier.h
IdentifierHash.h
LArAutoCorrTotal::~LArAutoCorrTotal
~LArAutoCorrTotal()
Definition: LArAutoCorrTotal.cxx:21
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:64
IdentifierHash
Definition: IdentifierHash.h:38
CaloGain.h
LArAutoCorrTotal::m_AutoCorrTotal
std::array< vecAutoCorrTotal, CaloGain::LARNGAIN > m_AutoCorrTotal
Definition: LArAutoCorrTotal.h:66
CLASS_DEF.h
macros to associate a CLID to a type
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20