BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
DedxCalibLayerGain.cxx File Reference
#include "GaudiKernel/MsgStream.h"
#include <sstream>
#include <string>
#include "TTree.h"
#include "TH1F.h"
#include "TF1.h"
#include "TFile.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "DedxCalibAlg/DedxCalibLayerGain.h"

Go to the source code of this file.

Functions

void calculate (vector< double > phlist)
 
double getMean ()
 
double getRms ()
 

Variables

const int layNo = 43
 
double m_mean
 
double m_rms
 

Function Documentation

◆ calculate()

void calculate ( vector< double >  phlist)

Definition at line 20 of file DedxCalibLayerGain.cxx.

21{
22 double mean=0,rms=0;
23 for(int i=0;i<phlist.size();i++)
24 {
25 mean+=phlist[i];
26 }
27 mean/=phlist.size();
28 for(int i=0;i<phlist.size();i++)
29 {
30 rms += pow((phlist[i]-mean),2);
31 }
32 //cout<<"phlist.size()= "<<phlist.size()<<" rms= "<<rms<<endl;
33 rms = sqrt(rms/phlist.size());
34 //cout<<"mean = "<<mean<<" rms= "<<rms<<endl;
35 m_mean = mean;
36 m_rms = rms;
37}
double m_rms
double m_mean

Referenced by DedxCalibLayerGain::AnalyseHists().

◆ getMean()

double getMean ( )

Definition at line 38 of file DedxCalibLayerGain.cxx.

38{return m_mean;}

Referenced by DedxCalibLayerGain::AnalyseHists().

◆ getRms()

double getRms ( )

Definition at line 39 of file DedxCalibLayerGain.cxx.

39{return m_rms;}

Referenced by DedxCalibLayerGain::AnalyseHists().

Variable Documentation

◆ layNo

◆ m_mean

double m_mean

Definition at line 19 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), getMean(), and BesTimer::stop().

◆ m_rms

double m_rms

Definition at line 19 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), and getRms().