ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
LArBadChannelHunter::Average Class Reference
Collaboration diagram for LArBadChannelHunter::Average:

Public Member Functions

 Average ()
 
void finish (float)
 

Public Attributes

float m_avPedRMS [CaloGain::LARNGAIN] {}
 
float m_avPedRMSSD [CaloGain::LARNGAIN] {}
 
unsigned m_nPed [CaloGain::LARNGAIN] {}
 
float m_avAmpl [CaloGain::LARNGAIN] {}
 
float m_avAmplSD [CaloGain::LARNGAIN] {}
 
unsigned m_nAmpls [CaloGain::LARNGAIN] {}
 
float m_avWid [CaloGain::LARNGAIN] {}
 
float m_avWidSD [CaloGain::LARNGAIN] {}
 
unsigned m_nWids [CaloGain::LARNGAIN] {}
 
float m_avTmax [CaloGain::LARNGAIN] {}
 
float m_avTmaxSD [CaloGain::LARNGAIN] {}
 
unsigned m_nTmaxs [CaloGain::LARNGAIN] {}
 
std::vector< float > m_vmedTmax [CaloGain::LARNGAIN]
 
std::vector< float > m_vmedWid [CaloGain::LARNGAIN]
 
std::vector< float > m_vmedAmpl [CaloGain::LARNGAIN]
 
std::vector< float > m_vmedPedRMS [CaloGain::LARNGAIN]
 
float m_medTmax [CaloGain::LARNGAIN] {}
 
float m_medWid [CaloGain::LARNGAIN] {}
 
float m_medAmpl [CaloGain::LARNGAIN] {}
 
float m_medPedRMS [CaloGain::LARNGAIN] {}
 

Detailed Description

Definition at line 103 of file LArBadChannelHunter.h.

Constructor & Destructor Documentation

◆ Average()

LArBadChannelHunter::Average::Average ( )

Definition at line 489 of file LArBadChannelHunter.cxx.

489  {
491  m_nPed[igain]=0;
492  m_avPedRMS[igain]=0;
493  m_avPedRMSSD[igain]=0;
494 
495  m_nAmpls[igain]=0;
496  m_avAmpl[igain]=0.;
497  m_avAmplSD[igain]=0.;
498 
499  m_nWids[igain]=0;
500  m_avWid[igain]=0.;
501  m_avWidSD[igain]=0.;
502 
503  m_nTmaxs[igain]=0;
504  m_avTmax[igain]=0.;
505  m_avTmaxSD[igain]=0.;
506 
507  m_medPedRMS[igain]=0;
508  m_medAmpl[igain]=0;
509  m_medWid[igain]=0;
510  m_medTmax[igain]=0;
511  }
512 }

Member Function Documentation

◆ finish()

void LArBadChannelHunter::Average::finish ( float  my_recalcPer)

Definition at line 515 of file LArBadChannelHunter.cxx.

515  {
517 
518  if (m_nPed[igain]) {
520  //sample standard deviation of average
523  //Find median
526  }
527  if (m_nAmpls[igain]) {
529  //sample standard deviation of average
532  //Find median
535  }
536  if (m_nWids[igain]) {
538  //sample standard deviation of average
540  m_avWidSD[igain]=sqrt(m_avWidSD[igain]);
541  //Find median
544  }
545  if (m_nTmaxs[igain]) {
547  //sample standard deviation of average
550  //Find median
553  }
554 
555 
558 
559  if (my_recalcPer>=0.){
561  if ( m_avPedRMSSD[igain]>my_recalcPer*m_avPedRMS[igain]) {
562  float re_avPed=0.; float re_avPedSD=0.; int re_nPed=0;
565  for (;p_loop!=p_loop_e; ++p_loop){
566  if ( fabs(*p_loop-m_medPedRMS[igain])<my_recalcPer*m_medPedRMS[igain] ){
567  re_avPed+=*p_loop;
568  re_avPedSD+=*p_loop*(*p_loop);
569  re_nPed++;
570  }
571  }
572  if (re_nPed > 0) {
573  re_avPed/=re_nPed;
574  re_avPedSD=(re_avPedSD- re_nPed*re_avPed*re_avPed)/(re_nPed);
575  }
576  re_avPedSD=sqrt(re_avPedSD);
577  std::cout <<" PedRMS mean && RMS are recalc: Orig (recalc) are: "<< m_avPedRMS[igain]<< " ( "<< re_avPed
578  <<" ) and "<< m_avPedRMSSD[igain]<<" ( "<<re_avPedSD<<" )"<<std::endl;
579  m_avPedRMS[igain]=re_avPed; m_avPedRMSSD[igain]=re_avPedSD;
580  }
582  if ( m_avAmplSD[igain]>my_recalcPer*m_avAmpl[igain] ) {
583  float re_avAmpl=0.; float re_avAmplSD=0.; int re_nAmpl=0;
584  std::vector<float>::iterator re_loop = m_vmedAmpl[igain].begin();
586  for (;re_loop!=re_loop_e; ++re_loop){
587  if ( fabs(*re_loop-m_medAmpl[igain])<my_recalcPer*m_medAmpl[igain] ){
588  re_avAmpl+=*re_loop;
589  re_avAmplSD+=*re_loop*(*re_loop);
590  re_nAmpl++;
591  }
592  }
593  if (re_nAmpl > 0) {
594  re_avAmpl/=re_nAmpl;
595  re_avAmplSD=(re_avAmplSD- re_nAmpl*re_avAmpl*re_avAmpl)/(re_nAmpl);
596  }
597  re_avAmplSD=sqrt(re_avAmplSD);
598  std::cout <<" MaxAmp mean && RMS are recalc: Orig (recalc) are: "<< m_avAmpl[igain]<< " ( "<< re_avAmpl
599  <<" ) and "<< m_avAmplSD[igain]<<" ( "<<re_avAmplSD<<" )"<<std::endl;
600  m_avAmpl[igain]=re_avAmpl; m_avAmplSD[igain]=re_avAmplSD;
601  }
603  if ( m_avWidSD[igain]>my_recalcPer*m_avWid[igain] ) {
604  float re_avWid=0.; float re_avWidSD=0.; int re_nWid=0;
605  std::vector<float>::iterator w_loop = m_vmedWid[igain].begin();
607  for (;w_loop!=w_loop_e; ++w_loop){
608  if ( fabs(*w_loop-m_medWid[igain])<my_recalcPer*m_medWid[igain] ){
609  re_avWid+=*w_loop;
610  re_avWidSD+=*w_loop*(*w_loop);
611  re_nWid++;
612  }
613  }
614  if (re_nWid > 0) {
615  re_avWid/=re_nWid;
616  re_avWidSD=(re_avWidSD- re_nWid*re_avWid*re_avWid)/(re_nWid);
617  }
618  re_avWidSD=sqrt(re_avWidSD);
619  std::cout <<" FWHM mean && RMS are recalc: Orig (recalc) are: "<< m_avWid[igain]<< " ( "<< re_avWid
620  <<" ) and "<< m_avWidSD[igain]<<" ( "<<re_avWidSD<<" )"<<std::endl;
621  m_avWid[igain]=re_avWid; m_avWidSD[igain]=re_avWidSD;
622  }
624  if ( m_avTmaxSD[igain]>my_recalcPer*m_avTmax[igain] ) {
625  float re_avTmax=0.; float re_avTmaxSD=0.; int re_nTmax=0;
628  for (;t_loop!=t_loop_e; ++t_loop){
629  if ( fabs(*t_loop-m_medTmax[igain])<my_recalcPer*m_medTmax[igain] ){
630  re_avTmax+=*t_loop;
631  re_avTmaxSD+=*t_loop*(*t_loop);
632  re_nTmax++;
633  }
634  }
635  if (re_nTmax > 0) {
636  re_avTmax/=re_nTmax;
637  re_avTmaxSD=(re_avTmaxSD- re_nTmax*re_avTmax*re_avTmax)/(re_nTmax);
638  }
639  re_avTmaxSD=sqrt(re_avTmaxSD);
640  std::cout <<"TmaxAmp mean && RMS are recalc: Orig (recalc) are: "<< m_avTmax[igain]<< " ( "<< re_avTmax
641  <<" ) and "<< m_avTmaxSD[igain]<<" ( "<<re_avTmaxSD<<" )"<<std::endl;
642  m_avTmax[igain]=re_avTmax; m_avTmaxSD[igain]=re_avTmaxSD;
643  }
644  }
645 
646  }//end loop over gains
647 }

Member Data Documentation

◆ m_avAmpl

float LArBadChannelHunter::Average::m_avAmpl[CaloGain::LARNGAIN] {}

Definition at line 108 of file LArBadChannelHunter.h.

◆ m_avAmplSD

float LArBadChannelHunter::Average::m_avAmplSD[CaloGain::LARNGAIN] {}

Definition at line 109 of file LArBadChannelHunter.h.

◆ m_avPedRMS

float LArBadChannelHunter::Average::m_avPedRMS[CaloGain::LARNGAIN] {}

Definition at line 105 of file LArBadChannelHunter.h.

◆ m_avPedRMSSD

float LArBadChannelHunter::Average::m_avPedRMSSD[CaloGain::LARNGAIN] {}

Definition at line 106 of file LArBadChannelHunter.h.

◆ m_avTmax

float LArBadChannelHunter::Average::m_avTmax[CaloGain::LARNGAIN] {}

Definition at line 114 of file LArBadChannelHunter.h.

◆ m_avTmaxSD

float LArBadChannelHunter::Average::m_avTmaxSD[CaloGain::LARNGAIN] {}

Definition at line 115 of file LArBadChannelHunter.h.

◆ m_avWid

float LArBadChannelHunter::Average::m_avWid[CaloGain::LARNGAIN] {}

Definition at line 111 of file LArBadChannelHunter.h.

◆ m_avWidSD

float LArBadChannelHunter::Average::m_avWidSD[CaloGain::LARNGAIN] {}

Definition at line 112 of file LArBadChannelHunter.h.

◆ m_medAmpl

float LArBadChannelHunter::Average::m_medAmpl[CaloGain::LARNGAIN] {}

Definition at line 124 of file LArBadChannelHunter.h.

◆ m_medPedRMS

float LArBadChannelHunter::Average::m_medPedRMS[CaloGain::LARNGAIN] {}

Definition at line 125 of file LArBadChannelHunter.h.

◆ m_medTmax

float LArBadChannelHunter::Average::m_medTmax[CaloGain::LARNGAIN] {}

Definition at line 122 of file LArBadChannelHunter.h.

◆ m_medWid

float LArBadChannelHunter::Average::m_medWid[CaloGain::LARNGAIN] {}

Definition at line 123 of file LArBadChannelHunter.h.

◆ m_nAmpls

unsigned LArBadChannelHunter::Average::m_nAmpls[CaloGain::LARNGAIN] {}

Definition at line 110 of file LArBadChannelHunter.h.

◆ m_nPed

unsigned LArBadChannelHunter::Average::m_nPed[CaloGain::LARNGAIN] {}

Definition at line 107 of file LArBadChannelHunter.h.

◆ m_nTmaxs

unsigned LArBadChannelHunter::Average::m_nTmaxs[CaloGain::LARNGAIN] {}

Definition at line 116 of file LArBadChannelHunter.h.

◆ m_nWids

unsigned LArBadChannelHunter::Average::m_nWids[CaloGain::LARNGAIN] {}

Definition at line 113 of file LArBadChannelHunter.h.

◆ m_vmedAmpl

std::vector<float> LArBadChannelHunter::Average::m_vmedAmpl[CaloGain::LARNGAIN]

Definition at line 120 of file LArBadChannelHunter.h.

◆ m_vmedPedRMS

std::vector<float> LArBadChannelHunter::Average::m_vmedPedRMS[CaloGain::LARNGAIN]

Definition at line 121 of file LArBadChannelHunter.h.

◆ m_vmedTmax

std::vector<float> LArBadChannelHunter::Average::m_vmedTmax[CaloGain::LARNGAIN]

Definition at line 118 of file LArBadChannelHunter.h.

◆ m_vmedWid

std::vector<float> LArBadChannelHunter::Average::m_vmedWid[CaloGain::LARNGAIN]

Definition at line 119 of file LArBadChannelHunter.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LArBadChannelHunter::Average::m_vmedAmpl
std::vector< float > m_vmedAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:120
LArBadChannelHunter::Average::m_medTmax
float m_medTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:122
LArBadChannelHunter::Average::m_vmedPedRMS
std::vector< float > m_vmedPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:121
LArBadChannelHunter::Average::m_avAmpl
float m_avAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:108
LArBadChannelHunter::Average::m_avTmaxSD
float m_avTmaxSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:115
LArBadChannelHunter::Average::m_avWid
float m_avWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:111
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArBadChannelHunter::Average::m_avPedRMSSD
float m_avPedRMSSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:106
LArBadChannelHunter::Average::m_nPed
unsigned m_nPed[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:107
WriteCellNoiseToCool.igain
igain
Definition: WriteCellNoiseToCool.py:338
LArBadChannelHunter::Average::m_nAmpls
unsigned m_nAmpls[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:110
LArBadChannelHunter::Average::m_medAmpl
float m_medAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:124
LArBadChannelHunter::Average::m_vmedTmax
std::vector< float > m_vmedTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:118
LArBadChannelHunter::Average::m_avWidSD
float m_avWidSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:112
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArBadChannelHunter::Average::m_medPedRMS
float m_medPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:125
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
LArBadChannelHunter::Average::m_avAmplSD
float m_avAmplSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:109
LArBadChannelHunter::Average::m_avPedRMS
float m_avPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:105
LArBadChannelHunter::Average::m_nTmaxs
unsigned m_nTmaxs[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:116
LArBadChannelHunter::Average::m_nWids
unsigned m_nWids[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:113
LArBadChannelHunter::Average::m_vmedWid
std::vector< float > m_vmedWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:119
LArBadChannelHunter::Average::m_avTmax
float m_avTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:114
LArBadChannelHunter::Average::m_medWid
float m_medWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:123