BOSS 8.0.0
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//-----------------------
18#include "EmcBhabha.h"
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// copy constructor
40EmcBhabha::EmcBhabha( const EmcBhabha& otherBhabha ) {
41 m_calibEnergy = otherBhabha.m_calibEnergy;
42 m_errCalibEnergy = otherBhabha.m_errCalibEnergy;
43 m_shower = otherBhabha.m_shower;
44 m_theta = otherBhabha.m_theta;
45 m_found = otherBhabha.m_found;
46 m_thetaIndex = otherBhabha.m_thetaIndex;
47 m_phiIndex = otherBhabha.m_phiIndex;
48}
49
50//--------------
51// Destructor --
52//--------------
54
56
57 double sig = 0, sig1 = 0, sig2 = 0;
58
59 // energy measurement error of calorimeter
60 /*
61 sig1 = 0.0034/shower().energy();
62 sig1 *= sig1;
63 sig2 = (0.0070/pow(shower().energy(),0.25));
64 sig2 *= sig2;
65 sig = sig1+sig2;
66 sig += (0.0134*0.0134);
67 sig = sqrt(sig) * shower().energy();
68 */
69 return sig;
70}
71
72double EmcBhabha::sigma2() const {
73
74 double sigSh = 0., sigDepo = 0., sig2 = 0.;
75
76 // error on measured shower energy
77 sigSh = errorOnShowerEnergy();
78
79 // error of energy to calibrate on
80 sigDepo = errorOnCalibEnergy();
81
82 sig2 = ( sigSh * sigSh ) + ( sigDepo * sigDepo );
83 return sig2;
84}
85
86// Acessor
88
89 cout << "EmcBhabha: " << endl
90 << "Energies: calib: " << calibEnergy() << " shower: " << m_shower.energy()
91 << " Theta: " << theta() << " nr Xtals: " << m_shower.digiList().size() << endl
92 << "Errors: calibEne: " << errorOnCalibEnergy() << " shower: " << errorOnShowerEnergy()
93 << " sum: " << sigma2() << endl;
94}
const double & theta() const
Definition EmcBhabha.h:57
void print()
Definition EmcBhabha.cxx:87
double sigma2() const
Definition EmcBhabha.cxx:72
const double & calibEnergy() const
Definition EmcBhabha.h:44
double errorOnShowerEnergy() const
Definition EmcBhabha.cxx:55
const double & errorOnCalibEnergy() const
Definition EmcBhabha.h:47