#include <MdcTCount.h>
Public Member Functions | |
MdcTCount () | |
~MdcTCount () | |
void | GetTCount () |
int | GetstrackNo () |
int | GetltrackNo () |
int | GetnItrkSL1 () |
int | GetnItrkSL2 () |
std::vector< int > & | GetstrackId () |
std::vector< int > & | GetltrackId () |
std::vector< int > & | GetintrkId1 () |
std::vector< int > & | GetintrkId2 () |
Private Attributes | |
MdcTF * | m_MdcTF |
BesGlobalTrigSvc * | m_pIBGT |
IBesGlobalTrigSvc * | m_tmpSvc |
int | strackNo |
int | ltrackNo |
int | nItrkSL1 |
int | nItrkSL2 |
std::vector< int > | strackId |
std::vector< int > | ltrackId |
std::vector< int > | intrkId1 |
std::vector< int > | intrkId2 |
Definition at line 9 of file MdcTCount.h.
MdcTCount::MdcTCount | ( | ) |
MdcTCount::~MdcTCount | ( | ) |
std::vector<int>& MdcTCount::GetintrkId1 | ( | ) | [inline] |
std::vector<int>& MdcTCount::GetintrkId2 | ( | ) | [inline] |
std::vector<int>& MdcTCount::GetltrackId | ( | ) | [inline] |
Definition at line 19 of file MdcTCount.h.
References ltrackId.
Referenced by BesMdcTrig::startMdcTrig().
00019 { return ltrackId; }
int MdcTCount::GetltrackNo | ( | ) | [inline] |
int MdcTCount::GetnItrkSL1 | ( | ) | [inline] |
Definition at line 16 of file MdcTCount.h.
References nItrkSL1.
Referenced by BesMdcTrig::startMdcTrig().
00016 { return nItrkSL1; }
int MdcTCount::GetnItrkSL2 | ( | ) | [inline] |
Definition at line 17 of file MdcTCount.h.
References nItrkSL2.
Referenced by BesMdcTrig::startMdcTrig().
00017 { return nItrkSL2; }
std::vector<int>& MdcTCount::GetstrackId | ( | ) | [inline] |
Definition at line 18 of file MdcTCount.h.
References strackId.
Referenced by BesMdcTrig::startMdcTrig().
00018 { return strackId; }
int MdcTCount::GetstrackNo | ( | ) | [inline] |
void MdcTCount::GetTCount | ( | ) |
Definition at line 31 of file MdcTCount.cxx.
References MdcTF::GetintrkSL1(), MdcTF::GetintrkSL2(), MdcTF::GetltrackId(), MdcTF::GetstrackId(), MdcTF::GetTrack(), genRecEmupikp::i, intrkId1, intrkId2, ganga-rec::j, ltrackId, ltrackNo, m_MdcTF, m_pIBGT, m_tmpSvc, nItrkSL1, nItrkSL2, BesGlobalTrigSvc::setMdcLtrkId(), BesGlobalTrigSvc::setMdcStrkId(), strackId, and strackNo.
Referenced by BesMdcTrig::startMdcTrig().
00032 { 00033 if(m_MdcTF) m_MdcTF->GetTrack(); 00034 //reset values 00035 strackNo = 0; 00036 ltrackNo = 0; 00037 nItrkSL1 = 0; 00038 nItrkSL2 = 0; 00039 strackId.clear(); 00040 ltrackId.clear(); 00041 intrkId1.clear(); 00042 intrkId2.clear(); 00043 00044 intrkId1 = m_MdcTF->GetintrkSL1(); 00045 intrkId2 = m_MdcTF->GetintrkSL2(); 00046 nItrkSL1 = intrkId1.size(); 00047 nItrkSL2 = intrkId2.size(); 00048 00049 //Get short and long track information 00050 for(int i = 0;i<128;i++) 00051 { 00052 int stId = 0, ltId = 0; 00053 //find short track 00054 if(m_MdcTF->GetstrackId(i) != 0) { 00055 //cout<<"TCount Cell ID "<<i<<endl; 00056 //for(int j = 1; j < 128; j++) { 00057 for(int j = 1; j < 17; j++) { 00058 if((i-j) < 0) stId = m_MdcTF->GetstrackId(128-j+i); 00059 else stId = m_MdcTF->GetstrackId(i-j); 00060 //cout<<"stId is "<<stId<<" j is "<<j<<" j%2 is "<<j%2<<endl; 00061 if(stId == 0) { 00062 if(j%2 != 0) { strackId.push_back(i); strackNo+=1; }//cout<<"short track count id : "<<i<<endl; } 00063 break; 00064 } 00065 } 00066 } 00067 //find long track 00068 if(m_MdcTF->GetltrackId(i) != 0) { 00069 //for(int j = 1; j < 128; j++) { 00070 for(int j = 1; j < 17; j++) { 00071 if((i-j) < 0) ltId = m_MdcTF->GetltrackId(128-j+i); 00072 else ltId = m_MdcTF->GetltrackId(i-j); 00073 if(ltId == 0) { 00074 if(j%2 != 0) { ltrackId.push_back(i); ltrackNo+=1; }// cout<<"long track count id : "<<i<<endl; } 00075 break; 00076 } 00077 } 00078 } 00079 } 00080 /* 00081 //No track combination 00082 for(int i = 0;i<128;i++) 00083 { 00084 //find short track 00085 if(m_MdcTF->GetstrackId(i) != 0) { 00086 strackId.push_back(i); 00087 } 00088 //find long track 00089 if(m_MdcTF->GetltrackId(i) != 0) { 00090 ltrackId.push_back(i); 00091 } 00092 } 00093 */ 00094 ISvcLocator* svcLocator = Gaudi::svcLocator(); 00095 StatusCode sc = svcLocator->service("BesGlobalTrigSvc", m_tmpSvc); 00096 m_pIBGT = dynamic_cast<BesGlobalTrigSvc* >(m_tmpSvc); 00097 00098 //set short and long track Id in service 00099 m_pIBGT->setMdcStrkId(strackId); 00100 m_pIBGT->setMdcLtrkId(ltrackId); 00101 }
std::vector<int> MdcTCount::intrkId1 [private] |
std::vector<int> MdcTCount::intrkId2 [private] |
std::vector<int> MdcTCount::ltrackId [private] |
int MdcTCount::ltrackNo [private] |
MdcTF* MdcTCount::m_MdcTF [private] |
Definition at line 23 of file MdcTCount.h.
Referenced by GetTCount(), MdcTCount(), and ~MdcTCount().
BesGlobalTrigSvc* MdcTCount::m_pIBGT [private] |
IBesGlobalTrigSvc* MdcTCount::m_tmpSvc [private] |
int MdcTCount::nItrkSL1 [private] |
int MdcTCount::nItrkSL2 [private] |
std::vector<int> MdcTCount::strackId [private] |
int MdcTCount::strackNo [private] |