#include <TMom.h>
Public Member Functions | |
void | addEntry (double val) |
void | addEntry (double val, std::vector< double > valcut) |
double | getM3 () |
double | getMax () |
double | getMean () |
double | getMean2 () |
double | getMean3 () |
double | getMin () |
int | getNevt () |
std::vector< double > | getPeak () |
double | getRMS () |
void | setCut (double, double) |
void | setCut (std::vector< double >, std::vector< double >) |
TMom () | |
TMom (std::vector< double >, std::vector< double >) | |
TMom (double, double) | |
virtual | ~TMom () |
Public Attributes | |
int | _dimCut |
Private Member Functions | |
void | init (double, double) |
void | init (std::vector< double >, std::vector< double >) |
Private Attributes | |
std::vector< double > | _ampl |
std::vector< double > | _cutHigh |
std::vector< double > | _cutLow |
int | bing [101] |
double | M3 |
double | max |
double | mean |
double | mean2 |
double | mean3 |
double | min |
int | nevt |
double | peak |
double | rms |
double | sum |
double | sum2 |
double | sum3 |
TMom::TMom | ( | double | cutlow, |
double | cuthigh | ||
) |
TMom::TMom | ( | std::vector< double > | cutlow, |
std::vector< double > | cuthigh | ||
) |
void TMom::addEntry | ( | double | val | ) |
Definition at line 111 of file TMom.cc.
References revisionDML::addEntry().
Referenced by EcalABAnalyzer::analyze(), EcalLaserAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), and EcalTestPulseAnalyzer::endJob().
{ std::vector<double> dumb; dumb.push_back(val); addEntry(val,dumb); }
void TMom::addEntry | ( | double | val, |
std::vector< double > | valcut | ||
) |
Definition at line 118 of file TMom.cc.
{ int passingAllCuts=1; for (int iCut=0;iCut<_dimCut;iCut++){ int passing; if( valcut.at(iCut)>_cutLow.at(iCut) && valcut.at(iCut) <=_cutHigh.at(iCut) ){ passing=1; }else passing=0; passingAllCuts*=passing; } if( passingAllCuts == 1 ){ nevt+=1; sum+=val; sum2+=val*val; sum3+=val*val*val; if(val>max) max=val; if(val<min) min=val; // for peak stuff _ampl.push_back(val); } }
double TMom::getM3 | ( | ) |
double TMom::getMax | ( | ) |
Definition at line 188 of file TMom.cc.
References max().
Referenced by EcalTestPulseAnalyzer::endJob().
{return max;}
double TMom::getMean | ( | ) |
Definition at line 148 of file TMom.cc.
References plotscripts::mean().
Referenced by EcalTestPulseAnalyzer::endJob(), EcalLaserAnalyzer2::endJob(), EcalLaserAnalyzer::endJob(), and EcalABAnalyzer::endJob().
double TMom::getMean2 | ( | ) |
double TMom::getMean3 | ( | ) |
double TMom::getMin | ( | ) |
Definition at line 187 of file TMom.cc.
References min.
Referenced by EcalTestPulseAnalyzer::endJob().
{return min;}
int TMom::getNevt | ( | ) |
Definition at line 165 of file TMom.cc.
Referenced by EcalTestPulseAnalyzer::endJob().
{ return nevt;}
std::vector< double > TMom::getPeak | ( | ) |
Definition at line 190 of file TMom.cc.
References i, gen::k, max(), min, and L1TEmulatorMonitor_cff::p.
{ std::vector<double> p; double wbin=(max-min)/100.; int bung; for(unsigned int i=0;i<_ampl.size();i++){ if(wbin <= 0.0) bung=1; else bung= (int) ((_ampl.at(i)-min)/wbin)+1; if(1 <= bung && bung <= 100) bing[bung]++; } TMarkov *peakM = new TMarkov(); int nbmax=0; int popmax=0; for(int k=1;k<101;k++) { if(bing[k] > popmax) { popmax=bing[k]; nbmax=k; } } peakM -> peakFinder(&bing[0]); p.push_back(peakM -> getPeakValue(0)); p.push_back(peakM -> getPeakValue(1)); return p; }
double TMom::getRMS | ( | ) |
void TMom::init | ( | std::vector< double > | cutlow, |
std::vector< double > | cuthigh | ||
) | [private] |
Definition at line 65 of file TMom.cc.
References i, max(), plotscripts::mean(), min, and plotscripts::rms().
void TMom::init | ( | double | cutlow, |
double | cuthigh | ||
) | [private] |
Definition at line 40 of file TMom.cc.
References i, max(), plotscripts::mean(), min, and plotscripts::rms().
void TMom::setCut | ( | std::vector< double > | cutlow, |
std::vector< double > | cuthigh | ||
) |
void TMom::setCut | ( | double | cutlow, |
double | cuthigh | ||
) |
std::vector<double> TMom::_ampl [private] |
std::vector<double> TMom::_cutHigh [private] |
std::vector<double> TMom::_cutLow [private] |
int TMom::_dimCut |
int TMom::bing[101] [private] |
double TMom::mean [private] |
double TMom::mean2 [private] |
double TMom::mean3 [private] |
int TMom::nevt [private] |
double TMom::peak [private] |
double TMom::sum2 [private] |
double TMom::sum3 [private] |