ATLAS Offline Software
Loading...
Searching...
No Matches
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.

Member Function Documentation

◆ sumSamples()

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

Definition at line 207 of file LArNoiseCorrelationMonAlg.cxx.

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

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: