BOSS 7.1.1
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 37 of file EmcBhabhaEvent.h.

Member Enumeration Documentation

◆ Selection

Enumerator
Nothing 
MDCOneProng 
MDCTwoProngMatched 
MDCTwoProngOneMatched 
EmcOneProng 
EmcTwoProng 

Definition at line 41 of file EmcBhabhaEvent.h.

Constructor & Destructor Documentation

◆ EmcBhabhaEvent()

EmcBhabhaEvent::EmcBhabhaEvent ( )

Definition at line 47 of file EmcBhabhaEvent.cxx.

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

◆ ~EmcBhabhaEvent()

EmcBhabhaEvent::~EmcBhabhaEvent ( )

Definition at line 76 of file EmcBhabhaEvent.cxx.

76 {
77
78 delete m_positron;
79 delete m_electron;
80
81}

Member Function Documentation

◆ deleteData()

void EmcBhabhaEvent::deleteData ( )

Definition at line 91 of file EmcBhabhaEvent.cxx.

92{
93}

◆ electron()

EmcBhabha * EmcBhabhaEvent::electron ( ) const
inline

Definition at line 57 of file EmcBhabhaEvent.h.

57{return m_electron;}

Referenced by EmcSelBhaEvent::CollectBhabha(), EmcSelBhaEvent::FillBhabha(), and print().

◆ enLeakageTheta()

double EmcBhabhaEvent::enLeakageTheta ( double theta)

Definition at line 302 of file EmcBhabhaEvent.cxx.

303{
304 return 1.0;
305}

◆ enLeakageThetaErr()

double EmcBhabhaEvent::enLeakageThetaErr ( double theta)

Definition at line 308 of file EmcBhabhaEvent.cxx.

309{
310 return 0.0;
311}

◆ getDepoMCShowerEnergy()

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

Definition at line 167 of file EmcBhabhaEvent.cxx.

170 {
171
172 if ( ! m_initialized )
173 {
174 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl
175 << " Is EmcLoadBhabhaData included in the path ? "
176 << endl;
177 return 0;
178 }
179
180 //the deposited energy
181 double depoEne = 0.;
182
183 EmcStructure* theEmcStruc=new EmcStructure();
184
185
186 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex ))
187 {
188 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex
189 << " or phi " << phiIndex
190 << " out of the calorimeter acceptance !"
191 << "Return 0 !"
192 << endl;
193 delete theEmcStruc;
194 return 0;
195
196 }
197 else
198 {
199 depoEne =ePeak*beamEnergy;
200
201
202 delete theEmcStruc;
203 return depoEne;
204
205 }
206
207}
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 211 of file EmcBhabhaEvent.cxx.

216 {
217
218 if ( ! m_initialized )
219 {
220 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl
221 << " Is EmcLoadBhabhaData included in the path ? "
222 << endl;
223 return 0;
224 }
225
226 //the deposited energy
227 double depoEne = 0.;
228
229 EmcStructure* theEmcStruc=new EmcStructure();
230
231
232 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex ))
233 {
234 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex
235 << " or phi " << phiIndex
236 << " out of the calorimeter acceptance !"
237 << "Return 0 !"
238 << endl;
239 delete theEmcStruc;
240 return 0;
241
242 }
243 else
244 {
245
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);
251
252 ptrk=ptrk.boost(0.011,0,0); //boost from cms to lab
253 //double the_lab = ptrk.theta();
254 //double phi_lab = ptrk.phi();
255 double depoEne_lab =ePeak*ptrk.e();
256 delete theEmcStruc;
257 return depoEne_lab;
258
259 }
260
261}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
float ptrk

◆ getErrorDepoMCShowerEnergy()

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

Definition at line 264 of file EmcBhabhaEvent.cxx.

266 {
267
268 if ( ! m_initialized )
269 {
270 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl
271 << " Is EmcLoadBhabhaData included in the path ? "
272 << endl;
273 return 0;
274 }
275
276 double sig=0.;
277 EmcStructure* theEmcStruc=new EmcStructure();
278
279 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex ))
280 {
281 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex
282 << " or phi " << phiIndex
283 << " out of the calorimeter acceptance !"
284 << "Return 0 !"
285 << endl;
286
287 delete theEmcStruc;
288 return 0;
289
290 }
291 else
292 {
293 sig=eSigma;
294 delete theEmcStruc;
295 return sig;
296
297 }
298
299}

◆ initData()

void EmcBhabhaEvent::initData ( )

Definition at line 85 of file EmcBhabhaEvent.cxx.

86{
87 m_initialized = true;
88}

Referenced by EmcBhabhaEvent().

◆ positron()

EmcBhabha * EmcBhabhaEvent::positron ( ) const
inline

Definition at line 54 of file EmcBhabhaEvent.h.

54{return m_positron;}

Referenced by EmcSelBhaEvent::CollectBhabha(), EmcSelBhaEvent::FillBhabha(), and print().

◆ print()

void EmcBhabhaEvent::print ( )

Definition at line 97 of file EmcBhabhaEvent.cxx.

97 {
98
99 if ( positron()->found() )
100 {
101 cout << "Positron: " << endl;
102 positron()->print( );
103 }
104 else
105 {
106 cout<<"routine "<< "No positron found ! " << endl;
107 }
108
109 if ( electron()->found() )
110 {
111 cout << "Electron: " << endl;
112 electron()->print( );
113 }
114 else
115 {
116 cout<<"routine "<< "No electron found ! " << endl;
117 }
118}
EmcBhabha * positron() const
EmcBhabha * electron() const
void print()
Definition EmcBhabha.cxx:95

◆ selectedEmcType()

static int & EmcBhabhaEvent::selectedEmcType ( )
inlinestatic

Definition at line 106 of file EmcBhabhaEvent.h.

107 {
108 return m_selectedEmcType;
109 }

◆ selectedMDCType()

static int & EmcBhabhaEvent::selectedMDCType ( )
inlinestatic

Definition at line 101 of file EmcBhabhaEvent.h.

102 {
103 return m_selectedMDCType;
104 }

◆ setElectron()

EmcBhabha * EmcBhabhaEvent::setElectron ( )
inline

Definition at line 61 of file EmcBhabhaEvent.h.

61{return m_electron;}

Referenced by EmcSelBhaEvent::CollectBhabha(), and EmcSelBhaEvent::FillBhabha().

◆ setPositron()

EmcBhabha * EmcBhabhaEvent::setPositron ( )
inline

Definition at line 59 of file EmcBhabhaEvent.h.

59{return m_positron;}

Referenced by EmcSelBhaEvent::CollectBhabha(), and EmcSelBhaEvent::FillBhabha().

◆ showerVector()

Hep3Vector EmcBhabhaEvent::showerVector ( EmcShower theShower)

Definition at line 314 of file EmcBhabhaEvent.cxx.

315{
316 Hep3Vector theShowerVector(1,1,1);
317 theShowerVector.setTheta(theShower.theta());
318 theShowerVector.setPhi(theShower.phi());
319 theShowerVector.setMag(theShower.energy());
320
321 return theShowerVector;
322}
const double & theta() const
Definition EmcShower.h:39
const double & energy() const
Definition EmcShower.h:38
const double & phi() const
Definition EmcShower.h:40

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