#include <EmcBhabhaEvent.h>
Public Types | |
Nothing = 0 | |
MDCOneProng = 1 | |
MDCTwoProngMatched = 2 | |
MDCTwoProngOneMatched = 3 | |
EmcOneProng = 4 | |
EmcTwoProng = 5 | |
enum | Selection { Nothing = 0, MDCOneProng = 1, MDCTwoProngMatched = 2, MDCTwoProngOneMatched = 3, EmcOneProng = 4, EmcTwoProng = 5 } |
Public Member Functions | |
EmcBhabhaEvent () | |
~EmcBhabhaEvent () | |
EmcBhabha * | positron () const |
EmcBhabha * | electron () const |
EmcBhabha * | setPositron () |
EmcBhabha * | setElectron () |
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 () |
Private Attributes | |
EmcBhabha * | m_positron |
EmcBhabha * | m_electron |
Static Private Attributes | |
static bool | m_initialized = true |
static int | m_selectedMDCType = -1 |
static int | m_selectedEmcType = -1 |
Definition at line 37 of file EmcBhabhaEvent.h.
Definition at line 41 of file EmcBhabhaEvent.h.
00041 {Nothing = 0, 00042 MDCOneProng=1, 00043 MDCTwoProngMatched=2, 00044 MDCTwoProngOneMatched=3, 00045 EmcOneProng=4, 00046 EmcTwoProng=5 };
EmcBhabhaEvent::EmcBhabhaEvent | ( | ) |
Definition at line 47 of file EmcBhabhaEvent.cxx.
References initData(), m_electron, and m_positron.
00048 { 00049 m_positron = new EmcBhabha(); 00050 assert( 0 != m_positron ); 00051 m_electron = new EmcBhabha(); 00052 assert( 0 != m_electron ); 00053 /* 00054 if (m_bhaEvList.empty()) { 00055 00056 m_bhaEvList.push_back(*m_positron); 00057 m_bhaEvList.push_back(*m_electron); 00058 00059 } 00060 else { 00061 if (m_bhaEvList.size() != 2) { 00062 cout<<"error " << "ERROR EmcBhabhaEvent: Length of event list != 2 !" 00063 << endl 00064 << " EmcBhabhaEvent: Length = " 00065 << m_bhaEvList.size() 00066 << endl; 00067 } 00068 } 00069 */ 00070 initData(); 00071 }
EmcBhabhaEvent::~EmcBhabhaEvent | ( | ) |
Definition at line 76 of file EmcBhabhaEvent.cxx.
References m_electron, and m_positron.
00076 { 00077 00078 delete m_positron; 00079 delete m_electron; 00080 00081 }
void EmcBhabhaEvent::deleteData | ( | ) |
EmcBhabha* EmcBhabhaEvent::electron | ( | ) | const [inline] |
Definition at line 57 of file EmcBhabhaEvent.h.
References m_electron.
Referenced by EmcSelBhaEvent::CollectBhabha(), EmcSelBhaEvent::FillBhabha(), EmcSelBhaEvent::fillMatrix(), and print().
00057 {return m_electron;}
double EmcBhabhaEvent::enLeakageTheta | ( | double | theta | ) |
double EmcBhabhaEvent::enLeakageThetaErr | ( | double | theta | ) |
double EmcBhabhaEvent::getDepoMCShowerEnergy | ( | unsigned int | thetaIndex, | |
unsigned int | phiIndex, | |||
double | ePeak, | |||
double | beamEnergy | |||
) | const |
Definition at line 167 of file EmcBhabhaEvent.cxx.
References EmcStructure::isOutofAccep(), and m_initialized.
00170 { 00171 00172 if ( ! m_initialized ) 00173 { 00174 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl 00175 << " Is EmcLoadBhabhaData included in the path ? " 00176 << endl; 00177 return 0; 00178 } 00179 00180 //the deposited energy 00181 double depoEne = 0.; 00182 00183 EmcStructure* theEmcStruc=new EmcStructure(); 00184 00185 00186 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex )) 00187 { 00188 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex 00189 << " or phi " << phiIndex 00190 << " out of the calorimeter acceptance !" 00191 << "Return 0 !" 00192 << endl; 00193 delete theEmcStruc; 00194 return 0; 00195 00196 } 00197 else 00198 { 00199 depoEne =ePeak*beamEnergy; 00200 00201 00202 delete theEmcStruc; 00203 return depoEne; 00204 00205 } 00206 00207 }
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.
References cos(), EmcStructure::isOutofAccep(), m_initialized, and sin().
00216 { 00217 00218 if ( ! m_initialized ) 00219 { 00220 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl 00221 << " Is EmcLoadBhabhaData included in the path ? " 00222 << endl; 00223 return 0; 00224 } 00225 00226 //the deposited energy 00227 double depoEne = 0.; 00228 00229 EmcStructure* theEmcStruc=new EmcStructure(); 00230 00231 00232 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex )) 00233 { 00234 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex 00235 << " or phi " << phiIndex 00236 << " out of the calorimeter acceptance !" 00237 << "Return 0 !" 00238 << endl; 00239 delete theEmcStruc; 00240 return 0; 00241 00242 } 00243 else 00244 { 00245 00246 HepLorentzVector ptrk; 00247 ptrk.setPx(beamEnergy*sin(theta)*cos(phi)); 00248 ptrk.setPy(beamEnergy*sin(theta)*sin(phi)); 00249 ptrk.setPz(beamEnergy*cos(theta)); 00250 ptrk.setE(beamEnergy); 00251 00252 ptrk=ptrk.boost(0.011,0,0); //boost from cms to lab 00253 //double the_lab = ptrk.theta(); 00254 //double phi_lab = ptrk.phi(); 00255 double depoEne_lab =ePeak*ptrk.e(); 00256 delete theEmcStruc; 00257 return depoEne_lab; 00258 00259 } 00260 00261 }
double EmcBhabhaEvent::getErrorDepoMCShowerEnergy | ( | unsigned int | thetaIndex, | |
unsigned int | phiIndex, | |||
double | eSigma | |||
) | const |
Definition at line 264 of file EmcBhabhaEvent.cxx.
References EmcStructure::isOutofAccep(), and m_initialized.
00266 { 00267 00268 if ( ! m_initialized ) 00269 { 00270 cout<<"error "<< " EmcBhabhaEvent not initialized ! " << endl 00271 << " Is EmcLoadBhabhaData included in the path ? " 00272 << endl; 00273 return 0; 00274 } 00275 00276 double sig=0.; 00277 EmcStructure* theEmcStruc=new EmcStructure(); 00278 00279 if (theEmcStruc->isOutofAccep(thetaIndex, phiIndex )) 00280 { 00281 cout<<"warning "<< "EmcBhabhaEvent: Theta " << thetaIndex 00282 << " or phi " << phiIndex 00283 << " out of the calorimeter acceptance !" 00284 << "Return 0 !" 00285 << endl; 00286 00287 delete theEmcStruc; 00288 return 0; 00289 00290 } 00291 else 00292 { 00293 sig=eSigma; 00294 delete theEmcStruc; 00295 return sig; 00296 00297 } 00298 00299 }
void EmcBhabhaEvent::initData | ( | ) |
Definition at line 85 of file EmcBhabhaEvent.cxx.
References m_initialized.
Referenced by EmcBhabhaEvent().
00086 { 00087 m_initialized = true; 00088 }
EmcBhabha* EmcBhabhaEvent::positron | ( | ) | const [inline] |
Definition at line 54 of file EmcBhabhaEvent.h.
References m_positron.
Referenced by EmcSelBhaEvent::CollectBhabha(), EmcSelBhaEvent::FillBhabha(), EmcSelBhaEvent::fillMatrix(), and print().
00054 {return m_positron;}
void EmcBhabhaEvent::print | ( | ) |
Definition at line 97 of file EmcBhabhaEvent.cxx.
References electron(), positron(), and EmcBhabha::print().
00097 { 00098 00099 if ( positron()->found() ) 00100 { 00101 cout << "Positron: " << endl; 00102 positron()->print( ); 00103 } 00104 else 00105 { 00106 cout<<"routine "<< "No positron found ! " << endl; 00107 } 00108 00109 if ( electron()->found() ) 00110 { 00111 cout << "Electron: " << endl; 00112 electron()->print( ); 00113 } 00114 else 00115 { 00116 cout<<"routine "<< "No electron found ! " << endl; 00117 } 00118 }
static int& EmcBhabhaEvent::selectedEmcType | ( | ) | [inline, static] |
Definition at line 106 of file EmcBhabhaEvent.h.
References m_selectedEmcType.
00107 { 00108 return m_selectedEmcType; 00109 }
static int& EmcBhabhaEvent::selectedMDCType | ( | ) | [inline, static] |
Definition at line 101 of file EmcBhabhaEvent.h.
References m_selectedMDCType.
00102 { 00103 return m_selectedMDCType; 00104 }
EmcBhabha* EmcBhabhaEvent::setElectron | ( | ) | [inline] |
Definition at line 61 of file EmcBhabhaEvent.h.
References m_electron.
Referenced by EmcSelBhaEvent::CollectBhabha(), and EmcSelBhaEvent::FillBhabha().
00061 {return m_electron;}
EmcBhabha* EmcBhabhaEvent::setPositron | ( | ) | [inline] |
Definition at line 59 of file EmcBhabhaEvent.h.
References m_positron.
Referenced by EmcSelBhaEvent::CollectBhabha(), and EmcSelBhaEvent::FillBhabha().
00059 {return m_positron;}
Hep3Vector EmcBhabhaEvent::showerVector | ( | EmcShower | theShower | ) |
Definition at line 314 of file EmcBhabhaEvent.cxx.
References EmcShower::energy(), EmcShower::phi(), and EmcShower::theta().
00315 { 00316 Hep3Vector theShowerVector(1,1,1); 00317 theShowerVector.setTheta(theShower.theta()); 00318 theShowerVector.setPhi(theShower.phi()); 00319 theShowerVector.setMag(theShower.energy()); 00320 00321 return theShowerVector; 00322 }
EmcBhabha* EmcBhabhaEvent::m_electron [private] |
Definition at line 146 of file EmcBhabhaEvent.h.
Referenced by electron(), EmcBhabhaEvent(), setElectron(), and ~EmcBhabhaEvent().
bool EmcBhabhaEvent::m_initialized = true [static, private] |
Definition at line 137 of file EmcBhabhaEvent.h.
Referenced by getDepoMCShowerEnergy(), getDepoMCShowerEnergy_lab(), getErrorDepoMCShowerEnergy(), and initData().
EmcBhabha* EmcBhabhaEvent::m_positron [private] |
Definition at line 145 of file EmcBhabhaEvent.h.
Referenced by EmcBhabhaEvent(), positron(), setPositron(), and ~EmcBhabhaEvent().
int EmcBhabhaEvent::m_selectedEmcType = -1 [static, private] |
int EmcBhabhaEvent::m_selectedMDCType = -1 [static, private] |