ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
LArNoiseCorrelationMonAlg::perFeb_t Struct Reference

Internally used data structure. More...

Collaboration diagram for LArNoiseCorrelationMonAlg::perFeb_t:

Public Member Functions

 perFeb_t (const std::string &n)
 
void sumSamples (const LArOnlineID *lArOnlineIDHelper)
 

Public Attributes

std::string m_febName
 
std::vector< std::pair< const LArDigit *, double > > m_digitsAndPed
 
std::vector< std::pair< int, double > > m_meanSum
 
std::vector< std::pair< std::pair< int, int >, double > > m_partSum
 

Detailed Description

Internally used data structure.

Definition at line 93 of file LArNoiseCorrelationMonAlg.h.

Constructor & Destructor Documentation

◆ perFeb_t()

LArNoiseCorrelationMonAlg::perFeb_t::perFeb_t ( const std::string &  n)
inline

Definition at line 94 of file LArNoiseCorrelationMonAlg.h.

94 : m_febName(n) {};

Member Function Documentation

◆ sumSamples()

void LArNoiseCorrelationMonAlg::perFeb_t::sumSamples ( const LArOnlineID lArOnlineIDHelper)

Definition at line 206 of file LArNoiseCorrelationMonAlg.cxx.

206  {
207  const size_t S=m_digitsAndPed.size();
208  for (size_t i1=0;i1<S;++i1) {
209  const auto& [pDig1,pedestal1]=m_digitsAndPed[i1];
210  const int ch1 = lArOnlineIDHelper->channel(pDig1->channelID());
211  //Sum mean:
212  for (const short adc : pDig1->samples()) {
213  m_meanSum.emplace_back(ch1,adc-pedestal1);
214  }
215  //sum of squares
216  for (size_t i2=i1;i2<S;++i2) {
217  const auto& [pDig2,pedestal2]=m_digitsAndPed[i2];
218  const int ch2 = lArOnlineIDHelper->channel(pDig2->channelID());
219  double sumSquare=0;
220  const unsigned nADC=std::min(pDig1->nsamples(),pDig2->nsamples());
221  for (unsigned i=0;i<nADC;++i) {
222  sumSquare+=((pDig1->samples().at(i)-pedestal1)*(pDig2->samples().at(i)-pedestal2));
223  }//end loop over samples
224  m_partSum.emplace_back(std::make_pair(std::make_pair(ch1,ch2),sumSquare));
225  }//end loop pDig2
226  }//end loop pDig1
227 }

Member Data Documentation

◆ m_digitsAndPed

std::vector<std::pair<const LArDigit*,double> > LArNoiseCorrelationMonAlg::perFeb_t::m_digitsAndPed

Definition at line 96 of file LArNoiseCorrelationMonAlg.h.

◆ m_febName

std::string LArNoiseCorrelationMonAlg::perFeb_t::m_febName

Definition at line 95 of file LArNoiseCorrelationMonAlg.h.

◆ m_meanSum

std::vector<std::pair<int,double> > LArNoiseCorrelationMonAlg::perFeb_t::m_meanSum

Definition at line 97 of file LArNoiseCorrelationMonAlg.h.

◆ m_partSum

std::vector<std::pair<std::pair<int,int>,double> > LArNoiseCorrelationMonAlg::perFeb_t::m_partSum

Definition at line 98 of file LArNoiseCorrelationMonAlg.h.


The documentation for this struct was generated from the following files:
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
LArOnlineID_Base::channel
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Definition: LArOnlineID_Base.cxx:1963
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
LArNoiseCorrelationMonAlg::perFeb_t::m_digitsAndPed
std::vector< std::pair< const LArDigit *, double > > m_digitsAndPed
Definition: LArNoiseCorrelationMonAlg.h:96
LArNoiseCorrelationMonAlg::perFeb_t::m_meanSum
std::vector< std::pair< int, double > > m_meanSum
Definition: LArNoiseCorrelationMonAlg.h:97
LArNoiseCorrelationMonAlg::perFeb_t::m_partSum
std::vector< std::pair< std::pair< int, int >, double > > m_partSum
Definition: LArNoiseCorrelationMonAlg.h:98
min
#define min(a, b)
Definition: cfImp.cxx:40
LArNoiseCorrelationMonAlg::perFeb_t::m_febName
std::string m_febName
Definition: LArNoiseCorrelationMonAlg.h:94
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48