/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/DedxCalibAlg/DedxCalibAlg-00-01-15/src/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

void calculate ( vector< double >  phlist  ) 

Definition at line 20 of file DedxCalibLayerGain.cxx.

References genRecEmupikp::i, m_mean, and m_rms.

Referenced by DedxCalibLayerGain::AnalyseHists().

00021 {
00022     double mean=0,rms=0;
00023     for(int i=0;i<phlist.size();i++)
00024     {
00025         mean+=phlist[i];
00026     }
00027     mean/=phlist.size();
00028     for(int i=0;i<phlist.size();i++)
00029     {
00030         rms += pow((phlist[i]-mean),2);
00031     }
00032     //cout<<"phlist.size()= "<<phlist.size()<<"  rms= "<<rms<<endl; 
00033     rms = sqrt(rms/phlist.size());
00034     //cout<<"mean = "<<mean<<"  rms= "<<rms<<endl;
00035     m_mean = mean;
00036     m_rms = rms;
00037 }

double getMean (  ) 

Definition at line 38 of file DedxCalibLayerGain.cxx.

References m_mean.

Referenced by DedxCalibLayerGain::AnalyseHists().

00038 {return m_mean;}

double getRms (  ) 

Definition at line 39 of file DedxCalibLayerGain.cxx.

References m_rms.

Referenced by DedxCalibLayerGain::AnalyseHists().

00039 {return m_rms;}


Variable Documentation

const int layNo = 43

Definition at line 18 of file DedxCalibLayerGain.cxx.

Referenced by DedxCalibLayerGain::AnalyseHists(), DedxCalibLayerGain::BookHists(), and DedxCalibLayerGain::WriteHists().

double m_mean

Definition at line 19 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), and getMean().

double m_rms

Definition at line 19 of file DedxCalibLayerGain.cxx.

Referenced by calculate(), and getRms().


Generated on Tue Nov 29 23:16:43 2016 for BOSS_7.0.2 by  doxygen 1.4.7