BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcBhabhaEvent Class Reference

#include <EmcBhabhaEvent.h>

Public Types

enum  Selection {
  Nothing = 0 , MDCOneProng = 1 , MDCTwoProngMatched = 2 , MDCTwoProngOneMatched = 3 ,
  EmcOneProng = 4 , EmcTwoProng = 5
}

Public Member Functions

 EmcBhabhaEvent ()
 ~EmcBhabhaEvent ()
EmcBhabhapositron () const
EmcBhabhaelectron () const
EmcBhabhasetPositron ()
EmcBhabhasetElectron ()
void initData ()
void deleteData ()
void print ()
double getDepoMCShowerEnergy (unsigned int thetaIndex, unsigned int phiIndex, double ePeak, double beamEnergy) const
double getDepoMCShowerEnergy_lab (double theta, double phi, 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)
double enLeakageThetaErr (double theta)
Hep3Vector showerVector (EmcShower theShower)

Static Public Member Functions

static int & selectedMDCType ()
static int & selectedEmcType ()

Detailed Description

This class holds a Bhabha event, a electron and/or a positron. It also knows about the true and the expected deposited energies of Bhabhas. ???whether need to do the energy correction of a Bhabha due to the tilt of BES3 to the beam line with 11mrad.

Definition at line 36 of file EmcBhabhaEvent.h.

Member Enumeration Documentation

◆ Selection

Enumerator
Nothing 
MDCOneProng 
MDCTwoProngMatched 
MDCTwoProngOneMatched 
EmcOneProng 
EmcTwoProng 

Definition at line 38 of file EmcBhabhaEvent.h.

Constructor & Destructor Documentation

◆ EmcBhabhaEvent()

EmcBhabhaEvent::EmcBhabhaEvent ( )

Definition at line 47 of file EmcBhabhaEvent.cxx.

47 {
48 m_positron = new EmcBhabha();
49 assert( 0 != m_positron );
50 m_electron = new EmcBhabha();
51 assert( 0 != m_electron );
52 /*
53 if (m_bhaEvList.empty()) {
54
55 m_bhaEvList.push_back(*m_positron);
56 m_bhaEvList.push_back(*m_electron);
57
58 }
59 else {
60 if (m_bhaEvList.size() != 2) {
61 cout<<"error " << "ERROR EmcBhabhaEvent: Length of event list != 2 !"
62 << endl
63 << " EmcBhabhaEvent: Length = "
64 << m_bhaEvList.size()
65 << endl;
66 }
67 }
68 */
69 initData();
70}

◆ ~EmcBhabhaEvent()

EmcBhabhaEvent::~EmcBhabhaEvent ( )

Definition at line 75 of file EmcBhabhaEvent.cxx.

75 {
76
77 delete m_positron;
78 delete m_electron;
79}

Member Function Documentation

◆ deleteData()

void EmcBhabhaEvent::deleteData ( )

Definition at line 84 of file EmcBhabhaEvent.cxx.

84{}

◆ electron()

EmcBhabha * EmcBhabhaEvent::electron ( ) const
inline

Definition at line 56 of file EmcBhabhaEvent.h.

56{ return m_electron; }

Referenced by print().

◆ enLeakageTheta()

double EmcBhabhaEvent::enLeakageTheta ( double theta)

Definition at line 269 of file EmcBhabhaEvent.cxx.

269{ return 1.0; }

◆ enLeakageThetaErr()

double EmcBhabhaEvent::enLeakageThetaErr ( double theta)

Definition at line 271 of file EmcBhabhaEvent.cxx.

271{ return 0.0; }

◆ getDepoMCShowerEnergy()

double EmcBhabhaEvent::getDepoMCShowerEnergy ( unsigned int thetaIndex,
unsigned int phiIndex,
double ePeak,
double beamEnergy ) const

Definition at line 157 of file EmcBhabhaEvent.cxx.

158 {
159
160 if ( !m_initialized )
161 {
162 cout << "error "
163 << " EmcBhabhaEvent not initialized ! " << endl
164 << " Is EmcLoadBhabhaData included in the path ? " << endl;
165 return 0;
166 }
167
168 // the deposited energy
169 double depoEne = 0.;
170
171 EmcStructure* theEmcStruc = new EmcStructure();
172
173 if ( theEmcStruc->isOutofAccep( thetaIndex, phiIndex ) )
174 {
175 cout << "warning "
176 << "EmcBhabhaEvent: Theta " << thetaIndex << " or phi " << phiIndex
177 << " out of the calorimeter acceptance !"
178 << "Return 0 !" << endl;
179 delete theEmcStruc;
180 return 0;
181 }
182 else
183 {
184 depoEne = ePeak * beamEnergy;
185
186 delete theEmcStruc;
187 return depoEne;
188 }
189}
bool isOutofAccep(unsigned int thetaIndex, unsigned int phiIndex) const

◆ getDepoMCShowerEnergy_lab()

double EmcBhabhaEvent::getDepoMCShowerEnergy_lab ( double theta,
double phi,
unsigned int thetaIndex,
unsigned int phiIndex,
double ePeak,
double beamEnergy ) const

Definition at line 191 of file EmcBhabhaEvent.cxx.

194 {
195
196 if ( !m_initialized )
197 {
198 cout << "error "
199 << " EmcBhabhaEvent not initialized ! " << endl
200 << " Is EmcLoadBhabhaData included in the path ? " << endl;
201 return 0;
202 }
203
204 // the deposited energy
205 double depoEne = 0.;
206
207 EmcStructure* theEmcStruc = new EmcStructure();
208
209 if ( theEmcStruc->isOutofAccep( thetaIndex, phiIndex ) )
210 {
211 cout << "warning "
212 << "EmcBhabhaEvent: Theta " << thetaIndex << " or phi " << phiIndex
213 << " out of the calorimeter acceptance !"
214 << "Return 0 !" << endl;
215 delete theEmcStruc;
216 return 0;
217 }
218 else
219 {
220
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 );
226
227 ptrk = ptrk.boost( 0.011, 0, 0 ); // boost from cms to lab
228 // double the_lab = ptrk.theta();
229 // double phi_lab = ptrk.phi();
230 double depoEne_lab = ePeak * ptrk.e();
231 delete theEmcStruc;
232 return depoEne_lab;
233 }
234}

◆ getErrorDepoMCShowerEnergy()

double EmcBhabhaEvent::getErrorDepoMCShowerEnergy ( unsigned int thetaIndex,
unsigned int phiIndex,
double eSigma ) const

Definition at line 236 of file EmcBhabhaEvent.cxx.

238 {
239
240 if ( !m_initialized )
241 {
242 cout << "error "
243 << " EmcBhabhaEvent not initialized ! " << endl
244 << " Is EmcLoadBhabhaData included in the path ? " << endl;
245 return 0;
246 }
247
248 double sig = 0.;
249 EmcStructure* theEmcStruc = new EmcStructure();
250
251 if ( theEmcStruc->isOutofAccep( thetaIndex, phiIndex ) )
252 {
253 cout << "warning "
254 << "EmcBhabhaEvent: Theta " << thetaIndex << " or phi " << phiIndex
255 << " out of the calorimeter acceptance !"
256 << "Return 0 !" << endl;
257
258 delete theEmcStruc;
259 return 0;
260 }
261 else
262 {
263 sig = eSigma;
264 delete theEmcStruc;
265 return sig;
266 }
267}

◆ initData()

void EmcBhabhaEvent::initData ( )

Definition at line 82 of file EmcBhabhaEvent.cxx.

82{ m_initialized = true; }

Referenced by EmcBhabhaEvent().

◆ positron()

EmcBhabha * EmcBhabhaEvent::positron ( ) const
inline

Definition at line 53 of file EmcBhabhaEvent.h.

53{ return m_positron; }

Referenced by print().

◆ print()

void EmcBhabhaEvent::print ( )

Definition at line 87 of file EmcBhabhaEvent.cxx.

87 {
88
89 if ( positron()->found() )
90 {
91 cout << "Positron: " << endl;
92 positron()->print();
93 }
94 else
95 {
96 cout << "routine "
97 << "No positron found ! " << endl;
98 }
99
100 if ( electron()->found() )
101 {
102 cout << "Electron: " << endl;
103 electron()->print();
104 }
105 else
106 {
107 cout << "routine "
108 << "No electron found ! " << endl;
109 }
110}
EmcBhabha * positron() const
EmcBhabha * electron() const
void print()
Definition EmcBhabha.cxx:87

◆ selectedEmcType()

int & EmcBhabhaEvent::selectedEmcType ( )
inlinestatic

Definition at line 94 of file EmcBhabhaEvent.h.

94{ return m_selectedEmcType; }

◆ selectedMDCType()

int & EmcBhabhaEvent::selectedMDCType ( )
inlinestatic

Definition at line 92 of file EmcBhabhaEvent.h.

92{ return m_selectedMDCType; }

◆ setElectron()

EmcBhabha * EmcBhabhaEvent::setElectron ( )
inline

Definition at line 60 of file EmcBhabhaEvent.h.

60{ return m_electron; }

◆ setPositron()

EmcBhabha * EmcBhabhaEvent::setPositron ( )
inline

Definition at line 58 of file EmcBhabhaEvent.h.

58{ return m_positron; }

◆ showerVector()

Hep3Vector EmcBhabhaEvent::showerVector ( EmcShower theShower)

Definition at line 273 of file EmcBhabhaEvent.cxx.

273 {
274 Hep3Vector theShowerVector( 1, 1, 1 );
275 theShowerVector.setTheta( theShower.theta() );
276 theShowerVector.setPhi( theShower.phi() );
277 theShowerVector.setMag( theShower.energy() );
278
279 return theShowerVector;
280}
const double & theta() const
Definition EmcShower.h:37
const double & energy() const
Definition EmcShower.h:36
const double & phi() const
Definition EmcShower.h:38

The documentation for this class was generated from the following files: