Public Member Functions | |
void | add_statistics (unsigned int val) |
void | change_status (int val) |
bool | get_average (double *ave, double *rms) |
int | get_overflow () |
bool | get_reference (double *val, double *rms) |
int | get_statistics () |
int | get_status () |
HcalDetDiagPedestalData () | |
void | reset () |
void | set_data (float val, float rms) |
void | set_reference (float val, float rms) |
void | set_statistics (int stat) |
Public Attributes | |
float | nBadPed |
float | nBadRms |
float | nChecks |
float | nMissing |
float | nUnstable |
Private Attributes | |
int | adc [128] |
float | ds_ped |
float | ds_rms |
bool | IsReference |
int | n |
int | overflow |
float | ref_ped |
float | ref_rms |
int | status |
Definition at line 59 of file HcalDetDiagPedestalMonitor.cc.
HcalDetDiagPedestalData::HcalDetDiagPedestalData | ( | ) | [inline] |
void HcalDetDiagPedestalData::add_statistics | ( | unsigned int | val | ) | [inline] |
Definition at line 72 of file HcalDetDiagPedestalMonitor.cc.
References adc, n, and overflow.
Referenced by HcalDetDiagPedestalMonitor::analyze().
void HcalDetDiagPedestalData::change_status | ( | int | val | ) | [inline] |
Definition at line 82 of file HcalDetDiagPedestalMonitor.cc.
References status.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus().
{ status|=val; }
bool HcalDetDiagPedestalData::get_average | ( | double * | ave, |
double * | rms | ||
) | [inline] |
Definition at line 92 of file HcalDetDiagPedestalMonitor.cc.
References adc, ds_ped, ds_rms, Capri::details::from(), i, max(), mathSSE::sqrt(), and Sum.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::fillHistos(), and HcalDetDiagPedestalMonitor::SaveReference().
{ if(ds_ped>-100){ *ave=ds_ped; *rms=ds_rms; return true;} double Sum=0,nSum=0; int from,to,max=adc[0],maxi=0; for(int i=1;i<128;i++) if(adc[i]>max){ max=adc[i]; maxi=i;} from=0; to=maxi+6; if(to>127) to=127; for(int i=from;i<=to;i++){ Sum+=i*adc[i]; nSum+=adc[i]; } if(nSum>0) *ave=Sum/nSum; else return false; Sum=0; for(int i=from;i<=to;i++) Sum+=adc[i]*(i-*ave)*(i-*ave); *rms=sqrt(Sum/nSum); return true; }
int HcalDetDiagPedestalData::get_overflow | ( | ) | [inline] |
Definition at line 114 of file HcalDetDiagPedestalMonitor.cc.
References overflow.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus().
{ return overflow; }
bool HcalDetDiagPedestalData::get_reference | ( | double * | val, |
double * | rms | ||
) | [inline] |
Definition at line 88 of file HcalDetDiagPedestalMonitor.cc.
References IsReference, ref_ped, and ref_rms.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus().
{ *val=ref_ped; *rms=ref_rms; return IsReference; }
int HcalDetDiagPedestalData::get_statistics | ( | ) | [inline] |
Definition at line 108 of file HcalDetDiagPedestalMonitor.cc.
References n.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalMonitor::SaveReference().
{ return n; }
int HcalDetDiagPedestalData::get_status | ( | ) | [inline] |
Definition at line 85 of file HcalDetDiagPedestalMonitor.cc.
References status.
Referenced by HcalDetDiagPedestalMonitor::SaveReference().
{ return status; }
void HcalDetDiagPedestalData::reset | ( | void | ) | [inline] |
void HcalDetDiagPedestalData::set_data | ( | float | val, |
float | rms | ||
) | [inline] |
Definition at line 79 of file HcalDetDiagPedestalMonitor.cc.
References ds_ped, ds_rms, and plotscripts::rms().
Referenced by HcalDetDiagPedestalMonitor::LoadDataset().
void HcalDetDiagPedestalData::set_reference | ( | float | val, |
float | rms | ||
) | [inline] |
Definition at line 75 of file HcalDetDiagPedestalMonitor.cc.
References IsReference, ref_ped, ref_rms, and plotscripts::rms().
Referenced by HcalDetDiagPedestalMonitor::LoadReference().
{ ref_ped=val; ref_rms=rms; IsReference=true; }
void HcalDetDiagPedestalData::set_statistics | ( | int | stat | ) | [inline] |
Definition at line 111 of file HcalDetDiagPedestalMonitor.cc.
References n, and testRegression::stat.
Referenced by HcalDetDiagPedestalMonitor::LoadDataset().
int HcalDetDiagPedestalData::adc[128] [private] |
Definition at line 123 of file HcalDetDiagPedestalMonitor.cc.
Referenced by add_statistics(), get_average(), and reset().
float HcalDetDiagPedestalData::ds_ped [private] |
Definition at line 128 of file HcalDetDiagPedestalMonitor.cc.
Referenced by get_average(), HcalDetDiagPedestalData(), and set_data().
float HcalDetDiagPedestalData::ds_rms [private] |
Definition at line 129 of file HcalDetDiagPedestalMonitor.cc.
Referenced by get_average(), HcalDetDiagPedestalData(), and set_data().
bool HcalDetDiagPedestalData::IsReference [private] |
Definition at line 125 of file HcalDetDiagPedestalMonitor.cc.
Referenced by get_reference(), HcalDetDiagPedestalData(), and set_reference().
int HcalDetDiagPedestalData::n [private] |
Definition at line 130 of file HcalDetDiagPedestalMonitor.cc.
Referenced by add_statistics(), get_statistics(), HcalDetDiagPedestalData(), and set_statistics().
Definition at line 120 of file HcalDetDiagPedestalMonitor.cc.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalData().
Definition at line 121 of file HcalDetDiagPedestalMonitor.cc.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalData().
Definition at line 117 of file HcalDetDiagPedestalMonitor.cc.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalData().
Definition at line 118 of file HcalDetDiagPedestalMonitor.cc.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalData().
Definition at line 119 of file HcalDetDiagPedestalMonitor.cc.
Referenced by HcalDetDiagPedestalMonitor::CheckStatus(), and HcalDetDiagPedestalData().
int HcalDetDiagPedestalData::overflow [private] |
Definition at line 124 of file HcalDetDiagPedestalMonitor.cc.
Referenced by add_statistics(), get_overflow(), and reset().
float HcalDetDiagPedestalData::ref_ped [private] |
Definition at line 126 of file HcalDetDiagPedestalMonitor.cc.
Referenced by get_reference(), and set_reference().
float HcalDetDiagPedestalData::ref_rms [private] |
Definition at line 127 of file HcalDetDiagPedestalMonitor.cc.
Referenced by get_reference(), and set_reference().
int HcalDetDiagPedestalData::status [private] |
Definition at line 131 of file HcalDetDiagPedestalMonitor.cc.
Referenced by change_status(), get_status(), and HcalDetDiagPedestalData().