BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DedxCalibLayerGain.cxx File Reference
#include "GaudiKernel/MsgStream.h"
#include "TCanvas.h"
#include "TF1.h"
#include "TFile.h"
#include "TH1F.h"
#include "TStyle.h"
#include "TTree.h"
#include <sstream>
#include <string>
#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 21 of file DedxCalibLayerGain.cxx.

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

Referenced by DedxCalibLayerGain::AnalyseHists().

◆ getMean()

double getMean ( )

Definition at line 32 of file DedxCalibLayerGain.cxx.

32{ return m_mean; }

Referenced by DedxCalibLayerGain::AnalyseHists().

◆ getRms()

double getRms ( )

Definition at line 33 of file DedxCalibLayerGain.cxx.

33{ return m_rms; }

Referenced by DedxCalibLayerGain::AnalyseHists().

Variable Documentation

◆ layNo

◆ m_mean

double m_mean

Definition at line 20 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), and getMean().

◆ m_rms

double m_rms

Definition at line 20 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), and getRms().