#include <MdcCalRecTrk.h>
Public Member Functions | |
double | getChisq () const |
double | getChisq () const |
double | getDr () const |
double | getDr () const |
double | getDz () const |
double | getDz () const |
HepVector | getHelix () const |
HepVector | getHelix () const |
HepSymMatrix | getHelixErr () const |
HepSymMatrix | getHelixErr () const |
double | getKappa () const |
double | getKappa () const |
int | getNHits () const |
int | getNHits () const |
double | getP () const |
double | getP () const |
HepLorentzVector | getP4 () const |
HepLorentzVector | getP4 () const |
double | getPhi0 () const |
double | getPhi0 () const |
double | getPt () const |
double | getPt () const |
MdcCalRecHit * | getRecHit (int index) const |
MdcCalRecHit * | getRecHit (int index) const |
double | getTanLamda () const |
double | getTanLamda () const |
MdcCalRecTrk (int pid) | |
MdcCalRecTrk (int pid) | |
void | setKalTrk (RecMdcKalTrackCol::iterator it_trk) |
void | setKalTrk (RecMdcKalTrackCol::iterator it_trk) |
void | setRecTrk (RecMdcTrackCol::iterator it_trk) |
void | setRecTrk (RecMdcTrackCol::iterator it_trk) |
~MdcCalRecTrk () | |
~MdcCalRecTrk () | |
Private Attributes | |
double | m_chisq |
double | m_dr |
double | m_dz |
HepVector | m_helix |
HepSymMatrix | m_helixerr |
double | m_kappa |
int | m_nhits |
double | m_p |
HepLorentzVector | m_p4 |
double | m_phi0 |
int | m_pid |
double | m_pt |
std::vector< MdcCalRecHit * > | m_rechit |
std::vector< MdcCalRecHit * > | m_rechit |
double | m_tanl |
|
00011 { 00012 m_pid = pid; 00013 }
|
|
00015 { 00016 unsigned int i; 00017 for(i=0; i<m_rechit.size(); i++){ 00018 delete m_rechit[i]; 00019 } 00020 m_rechit.clear(); 00021 }
|
|
|
|
|
|
00033 { return m_chisq; }
|
|
00033 { return m_chisq; }
|
|
00026 { return m_dr; }
|
|
00026 { return m_dr; }
|
|
00029 { return m_dz; }
|
|
00029 { return m_dz; }
|
|
00037 { return m_helix; }
|
|
00037 { return m_helix; }
|
|
00038 { return m_helixerr; }
|
|
00038 { return m_helixerr; }
|
|
00028 { return m_kappa; }
|
|
00028 { return m_kappa; }
|
|
00034 { return m_nhits; }
|
|
00034 { return m_nhits; }
|
|
00032 { return m_p; }
|
|
00032 { return m_p; }
|
|
00035 {return m_p4;}
|
|
00035 {return m_p4;}
|
|
00027 { return m_phi0; }
|
|
00027 { return m_phi0; }
|
|
00031 { return m_pt; }
|
|
00031 { return m_pt; }
|
|
00036 { return m_rechit[index]; }
|
|
00036 { return m_rechit[index]; }
|
|
00030 { return m_tanl; }
|
|
00030 { return m_tanl; }
|
|
|
|
00065 { 00066 IMessageSvc *msgSvc; 00067 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00068 MsgStream log(msgSvc, "MdcCalRecTrk"); 00069 log << MSG::DEBUG << "MdcCalRecTrk::setKalTrk()" << endreq; 00070 00071 if(0 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::electron); 00072 else if(1 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::muon); 00073 else if(2 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::pion); 00074 else if(3 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::kaon); 00075 else if(4 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::proton); 00076 else if(5 == m_pid) RecMdcKalTrack::setPidType(RecMdcKalTrack::muon); // cosmic-ray 00077 else log << MSG::FATAL << "wrong particle type" << endreq; 00078 00079 m_dr = (*it_trk)->dr(); 00080 m_phi0 = (*it_trk)->fi0(); 00081 m_kappa = (*it_trk)->kappa(); 00082 m_dz = (*it_trk)->dz(); 00083 m_tanl = (*it_trk)->tanl(); 00084 m_chisq = (*it_trk)->chi2(); 00085 00086 m_p4.setPx(- sin(m_phi0) / fabs(m_kappa)); 00087 m_p4.setPy(cos(m_phi0) / fabs(m_kappa)); 00088 m_p4.setPz(m_tanl / fabs(m_kappa)); 00089 double p3 = m_p4.mag(); 00090 double mass; 00091 if(0 == m_pid) mass = 0.000511; 00092 else if(1 == m_pid) mass = 0.105658; 00093 else if(2 == m_pid) mass = 0.139570; 00094 else if(3 == m_pid) mass = 0.493677; 00095 else if(4 == m_pid) mass = 0.938272; 00096 else if(5 == m_pid) mass = 0.139570; // cosmic-ray 00097 m_p4.setE(sqrt(p3 * p3 + mass * mass)); 00098 00099 m_dr *= 10.0; // cm -> mm 00100 m_dz *= 10.0; // cm -> mm 00101 00102 m_pt = 1.0 / m_kappa; 00103 m_p = m_pt * sqrt( m_tanl * m_tanl + 1.0 ); 00104 00105 // cout << setw(15) << m_p << setw(15) << m_dr << setw(15) << m_phi0 00106 // << setw(15) << m_kappa << setw(15) << m_dz << setw(15) << m_tanl << endl; 00107 00108 HelixSegRefVec gothelixsegs = (*it_trk)->getVecHelixSegs(); 00109 HelixSegRefVec::iterator it_hit = gothelixsegs.begin(); 00110 MdcCalRecHit* rechit; 00111 00112 int k = 0; 00113 for(; it_hit != gothelixsegs.end(); it_hit++){ 00114 rechit = new MdcCalRecHit(); 00115 rechit->setKalHit(it_hit); 00116 m_rechit.push_back(rechit); 00117 00118 k++; 00119 } 00120 m_nhits = k; 00121 // cout<<"hits "<<m_nhits <<endl; 00122 }
|
|
|
|
00023 { 00024 IMessageSvc *msgSvc; 00025 Gaudi::svcLocator()->service("MessageSvc", msgSvc); 00026 MsgStream log(msgSvc, "MdcCalRecTrk"); 00027 log << MSG::DEBUG << "MdcCalRecTrk::setRecTrk()" << endreq; 00028 00029 m_dr = (*it_trk)->helix(0); 00030 m_phi0 = (*it_trk)->helix(1); 00031 m_kappa = (*it_trk)->helix(2); 00032 m_dz = (*it_trk)->helix(3); 00033 m_tanl = (*it_trk)->helix(4); 00034 m_chisq = (*it_trk)->chi2(); 00035 m_nhits = (*it_trk)->getNhits(); 00036 m_helix = (*it_trk)->helix(); 00037 m_helixerr = (*it_trk)->err(); 00038 00039 double mass; 00040 if(0 == m_pid) mass = 0.000511; 00041 else if(1 == m_pid) mass = 0.105658; 00042 else if(2 == m_pid) mass = 0.139570; 00043 else if(3 == m_pid) mass = 0.493677; 00044 else if(4 == m_pid) mass = 0.938272; 00045 else if(5 == m_pid) mass = 0.139570; // cosmic-ray 00046 else log << MSG::FATAL << "wrong particle type" << endreq; 00047 m_p4 = (*it_trk)->p4(mass); 00048 00049 m_dr *= 10.0; // cm -> mm 00050 m_dz *= 10.0; // cm -> mm 00051 00052 m_pt = 1.0 / m_kappa; 00053 m_p = m_pt * sqrt( m_tanl * m_tanl + 1.0 ); 00054 00055 HitRefVec gothits = (*it_trk) -> getVecHits(); 00056 HitRefVec::iterator it_hit = gothits.begin(); 00057 MdcCalRecHit* rechit; 00058 for(; it_hit != gothits.end(); it_hit++){ 00059 rechit = new MdcCalRecHit(); 00060 rechit->setRecHit(it_hit); 00061 m_rechit.push_back(rechit); 00062 } 00063 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|