#include <DmxRMSStat.h>
Inheritance diagram for DmxRMSStat:

Public Member Functions | |
| DmxRMSStat () | |
| DmxRMSStat (Float_t *SignalW, Float_t *SignalE, Float_t CoG) | |
| virtual | ~DmxRMSStat () |
| Float_t | GetGoodness () const |
| Float_t | GetTieBreaker () const |
Private Attributes | |
| Float_t | fRms |
Definition at line 17 of file DmxRMSStat.h.
| DmxRMSStat::DmxRMSStat | ( | ) |
| DmxRMSStat::DmxRMSStat | ( | Float_t * | SignalW, | |
| Float_t * | SignalE, | |||
| Float_t | CoG | |||
| ) |
Definition at line 27 of file DmxRMSStat.cxx.
References fRms.
00027 : 00028 fRms(0.) 00029 { 00030 Float_t numerator = 0.; 00031 Float_t denominator = 0.; 00032 Float_t totalHits = 0.; 00033 00034 for(Int_t i = 0; i < 192; i++){ 00035 if( SignalW[i] > 0.){ 00036 totalHits += 1.; 00037 numerator += SignalW[i] * ((1. * i) - CoG) * ((1. * i) - CoG); 00038 denominator += SignalW[i]; 00039 } 00040 if( SignalE[i] > 0.){ 00041 totalHits += 1.; 00042 numerator += SignalE[i] * ((1. * i) - CoG) * ((1. * i) - CoG); 00043 denominator += SignalE[i]; 00044 } 00045 } 00046 00047 //find the RMS and return it 00048 00049 if(denominator != 0. && totalHits > 1.){ 00050 Float_t rmssqr = (numerator / denominator) * (totalHits/(totalHits - 1.)); 00051 fRms = TMath::Sqrt(rmssqr); 00052 //MSG("Dmx", Msg::kVerbose) << "rms = " << rms << endl; 00053 } 00054 00055 return; 00056 }
| DmxRMSStat::~DmxRMSStat | ( | ) | [virtual] |
| Float_t DmxRMSStat::GetGoodness | ( | ) | const [virtual] |
Implements DmxStatistic.
Definition at line 72 of file DmxRMSStat.cxx.
References fRms.
Referenced by DmxChiSqrStat::DmxChiSqrStat().
00073 { 00074 00075 return fRms; 00076 }
| Float_t DmxRMSStat::GetTieBreaker | ( | ) | const [inline, virtual] |
Float_t DmxRMSStat::fRms [private] |
1.4.7