19#include "CLHEP/Vector/LorentzVector.h"
20#include "CLHEP/Vector/ThreeVector.h"
21#include "CLHEP/Vector/TwoVector.h"
22using CLHEP::Hep2Vector;
23using CLHEP::Hep3Vector;
24using CLHEP::HepLorentzVector;
38bool EmcBhabhaEvent::m_initialized =
true;
39int EmcBhabhaEvent::m_selectedMDCType = -1;
40int EmcBhabhaEvent::m_selectedEmcType = -1;
49 assert( 0 != m_positron );
51 assert( 0 != m_electron );
91 cout <<
"Positron: " << endl;
97 <<
"No positron found ! " << endl;
102 cout <<
"Electron: " << endl;
108 <<
"No electron found ! " << endl;
158 double ePeak,
double beamEnergy )
const {
160 if ( !m_initialized )
163 <<
" EmcBhabhaEvent not initialized ! " << endl
164 <<
" Is EmcLoadBhabhaData included in the path ? " << endl;
173 if ( theEmcStruc->
isOutofAccep( thetaIndex, phiIndex ) )
176 <<
"EmcBhabhaEvent: Theta " << thetaIndex <<
" or phi " << phiIndex
177 <<
" out of the calorimeter acceptance !"
178 <<
"Return 0 !" << endl;
184 depoEne = ePeak * beamEnergy;
192 unsigned int thetaIndex,
193 unsigned int phiIndex,
double ePeak,
194 double beamEnergy )
const {
196 if ( !m_initialized )
199 <<
" EmcBhabhaEvent not initialized ! " << endl
200 <<
" Is EmcLoadBhabhaData included in the path ? " << endl;
209 if ( theEmcStruc->
isOutofAccep( thetaIndex, phiIndex ) )
212 <<
"EmcBhabhaEvent: Theta " << thetaIndex <<
" or phi " << phiIndex
213 <<
" out of the calorimeter acceptance !"
214 <<
"Return 0 !" << endl;
221 HepLorentzVector ptrk;
222 ptrk.setPx( beamEnergy *
sin( theta ) *
cos( phi ) );
223 ptrk.setPy( beamEnergy *
sin( theta ) *
sin( phi ) );
224 ptrk.setPz( beamEnergy *
cos( theta ) );
225 ptrk.setE( beamEnergy );
227 ptrk = ptrk.boost( 0.011, 0, 0 );
230 double depoEne_lab = ePeak * ptrk.e();
237 unsigned int phiIndex,
238 double eSigma )
const {
240 if ( !m_initialized )
243 <<
" EmcBhabhaEvent not initialized ! " << endl
244 <<
" Is EmcLoadBhabhaData included in the path ? " << endl;
251 if ( theEmcStruc->
isOutofAccep( thetaIndex, phiIndex ) )
254 <<
"EmcBhabhaEvent: Theta " << thetaIndex <<
" or phi " << phiIndex
255 <<
" out of the calorimeter acceptance !"
256 <<
"Return 0 !" << endl;
274 Hep3Vector theShowerVector( 1, 1, 1 );
275 theShowerVector.setTheta( theShower.
theta() );
276 theShowerVector.setPhi( theShower.
phi() );
277 theShowerVector.setMag( theShower.
energy() );
279 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