18#include "EmcBhaCalib/EmcBhabhaEvent.h"
19#include "CLHEP/Vector/ThreeVector.h"
20#include "CLHEP/Vector/LorentzVector.h"
21#include "CLHEP/Vector/TwoVector.h"
22using CLHEP::Hep3Vector;
23using CLHEP::Hep2Vector;
24using CLHEP::HepLorentzVector;
38bool EmcBhabhaEvent::m_initialized =
true;
39int EmcBhabhaEvent::m_selectedMDCType = -1;
40int EmcBhabhaEvent::m_selectedEmcType = -1;
50 assert( 0 != m_positron );
52 assert( 0 != m_electron );
101 cout <<
"Positron: " << endl;
106 cout<<
"routine "<<
"No positron found ! " << endl;
111 cout <<
"Electron: " << endl;
116 cout<<
"routine "<<
"No electron found ! " << endl;
168 unsigned int phiIndex,
170 double beamEnergy)
const {
172 if ( ! m_initialized )
174 cout<<
"error "<<
" EmcBhabhaEvent not initialized ! " << endl
175 <<
" Is EmcLoadBhabhaData included in the path ? "
188 cout<<
"warning "<<
"EmcBhabhaEvent: Theta " << thetaIndex
189 <<
" or phi " << phiIndex
190 <<
" out of the calorimeter acceptance !"
199 depoEne =ePeak*beamEnergy;
213 unsigned int thetaIndex,
214 unsigned int phiIndex,
216 double beamEnergy)
const {
218 if ( ! m_initialized )
220 cout<<
"error "<<
" EmcBhabhaEvent not initialized ! " << endl
221 <<
" Is EmcLoadBhabhaData included in the path ? "
234 cout<<
"warning "<<
"EmcBhabhaEvent: Theta " << thetaIndex
235 <<
" or phi " << phiIndex
236 <<
" out of the calorimeter acceptance !"
246 HepLorentzVector ptrk;
247 ptrk.setPx(beamEnergy*
sin(theta)*
cos(phi));
248 ptrk.setPy(beamEnergy*
sin(theta)*
sin(phi));
249 ptrk.setPz(beamEnergy*
cos(theta));
250 ptrk.setE(beamEnergy);
252 ptrk=ptrk.boost(0.011,0,0);
255 double depoEne_lab =ePeak*ptrk.e();
265 unsigned int phiIndex,
266 double eSigma)
const {
268 if ( ! m_initialized )
270 cout<<
"error "<<
" EmcBhabhaEvent not initialized ! " << endl
271 <<
" Is EmcLoadBhabhaData included in the path ? "
281 cout<<
"warning "<<
"EmcBhabhaEvent: Theta " << thetaIndex
282 <<
" or phi " << phiIndex
283 <<
" out of the calorimeter acceptance !"
316 Hep3Vector theShowerVector(1,1,1);
317 theShowerVector.setTheta(theShower.
theta());
318 theShowerVector.setPhi(theShower.
phi());
319 theShowerVector.setMag(theShower.
energy());
321 return theShowerVector;
double sin(const BesAngle a)
double cos(const BesAngle a)
EmcBhabha * positron() const
double getDepoMCShowerEnergy(unsigned int thetaIndex, unsigned int phiIndex, double ePeak, double beamEnergy) const
double getErrorDepoMCShowerEnergy(unsigned int thetaIndex, unsigned int phiIndex, double eSigma) const
double enLeakageTheta(double theta)
EmcBhabha * electron() const
double getDepoMCShowerEnergy_lab(double theta, double phi, unsigned int thetaIndex, unsigned int phiIndex, double ePeak, double beamEnergy) const
Hep3Vector showerVector(EmcShower theShower)
double enLeakageThetaErr(double theta)
const double & theta() const
const double & energy() const
const double & phi() const
bool isOutofAccep(unsigned int thetaIndex, unsigned int phiIndex) const