BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcBhabha.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3//
4// Description:
5// Class EmcBhabha - see header
6//
7// Environment:
8// Software developed for the BESIII Detector at the BEPCII.
9//
10// Author List:
11// ChunXiu Liu IHEP
12//
13//------------------------------------------------------------------------
14
15//-----------------------
16// This Class's Header --
17//-----------------------
19
20//---------------
21// C++ Headers --
22//---------------
23#include <iostream>
24#include <list>
25
26using namespace std;
27//----------------
28// Constructors --
29//----------------
31 :m_calibEnergy(0),
32 m_errCalibEnergy(0),
33 m_shower(EmcShower()),
34 m_theta(-1.),
35 m_found(false),
36 m_thetaIndex(9999),
37 m_phiIndex(9999)
38{
39
40}
41
42//copy constructor
43EmcBhabha::EmcBhabha(const EmcBhabha& otherBhabha) {
44 m_calibEnergy = otherBhabha.m_calibEnergy;
45 m_errCalibEnergy = otherBhabha.m_errCalibEnergy;
46 m_shower = otherBhabha.m_shower;
47 m_theta = otherBhabha.m_theta;
48 m_found = otherBhabha.m_found;
49 m_thetaIndex = otherBhabha.m_thetaIndex;
50 m_phiIndex = otherBhabha.m_phiIndex;
51}
52
53//--------------
54// Destructor --
55//--------------
59
60double
62
63 double sig=0,sig1=0,sig2=0;
64
65 //energy measurement error of calorimeter
66 /*
67 sig1 = 0.0034/shower().energy();
68 sig1 *= sig1;
69 sig2 = (0.0070/pow(shower().energy(),0.25));
70 sig2 *= sig2;
71 sig = sig1+sig2;
72 sig += (0.0134*0.0134);
73 sig = sqrt(sig) * shower().energy();
74 */
75 return sig;
76}
77
78double
80
81 double sigSh=0., sigDepo=0., sig2=0.;
82
83 //error on measured shower energy
84 sigSh = errorOnShowerEnergy();
85
86 //error of energy to calibrate on
87 sigDepo = errorOnCalibEnergy();
88
89 sig2 = (sigSh * sigSh) + (sigDepo * sigDepo);
90 return sig2;
91}
92
93//Acessor
94void
96
97 cout << "EmcBhabha: " << endl
98 << "Energies: calib: " << calibEnergy()
99 << " shower: " << m_shower.energy()
100 << " Theta: " << theta()
101 << " nr Xtals: " << m_shower.digiList().size()
102 << endl
103 << "Errors: calibEne: " << errorOnCalibEnergy()
104 << " shower: " << errorOnShowerEnergy()
105 << " sum: " << sigma2()
106 << endl;
107
108}
109
const double & theta() const
Definition EmcBhabha.h:59
void print()
Definition EmcBhabha.cxx:95
double sigma2() const
Definition EmcBhabha.cxx:79
const double & calibEnergy() const
Definition EmcBhabha.h:46
double errorOnShowerEnergy() const
Definition EmcBhabha.cxx:61
const double & errorOnCalibEnergy() const
Definition EmcBhabha.h:49
const double & energy() const
Definition EmcShower.h:38
const std::list< EmcShDigi > digiList() const
Definition EmcShower.h:45