MdcTCount Class Reference

#include <MdcTCount.h>

List of all members.

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

MdcTFm_MdcTF
BesGlobalTrigSvcm_pIBGT
IBesGlobalTrigSvcm_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


Detailed Description

Definition at line 9 of file MdcTCount.h.


Constructor & Destructor Documentation

MdcTCount::MdcTCount (  ) 

Definition at line 23 of file MdcTCount.cxx.

References m_MdcTF.

00024 {
00025   m_MdcTF = new MdcTF();
00026 }

MdcTCount::~MdcTCount (  ) 

Definition at line 27 of file MdcTCount.cxx.

References m_MdcTF.

00028 {
00029   if(m_MdcTF) delete m_MdcTF;
00030 }


Member Function Documentation

std::vector<int>& MdcTCount::GetintrkId1 (  )  [inline]

Definition at line 20 of file MdcTCount.h.

References intrkId1.

00020 { return intrkId1; }

std::vector<int>& MdcTCount::GetintrkId2 (  )  [inline]

Definition at line 21 of file MdcTCount.h.

References intrkId2.

00021 { return intrkId2; }

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]

Definition at line 15 of file MdcTCount.h.

References ltrackNo.

00015 { return ltrackNo; }

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]

Definition at line 14 of file MdcTCount.h.

References strackNo.

00014 { return strackNo; }

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 }


Member Data Documentation

std::vector<int> MdcTCount::intrkId1 [private]

Definition at line 33 of file MdcTCount.h.

Referenced by GetintrkId1(), and GetTCount().

std::vector<int> MdcTCount::intrkId2 [private]

Definition at line 34 of file MdcTCount.h.

Referenced by GetintrkId2(), and GetTCount().

std::vector<int> MdcTCount::ltrackId [private]

Definition at line 32 of file MdcTCount.h.

Referenced by GetltrackId(), and GetTCount().

int MdcTCount::ltrackNo [private]

Definition at line 28 of file MdcTCount.h.

Referenced by GetltrackNo(), and GetTCount().

MdcTF* MdcTCount::m_MdcTF [private]

Definition at line 23 of file MdcTCount.h.

Referenced by GetTCount(), MdcTCount(), and ~MdcTCount().

BesGlobalTrigSvc* MdcTCount::m_pIBGT [private]

Definition at line 24 of file MdcTCount.h.

Referenced by GetTCount().

IBesGlobalTrigSvc* MdcTCount::m_tmpSvc [private]

Definition at line 25 of file MdcTCount.h.

Referenced by GetTCount().

int MdcTCount::nItrkSL1 [private]

Definition at line 29 of file MdcTCount.h.

Referenced by GetnItrkSL1(), and GetTCount().

int MdcTCount::nItrkSL2 [private]

Definition at line 30 of file MdcTCount.h.

Referenced by GetnItrkSL2(), and GetTCount().

std::vector<int> MdcTCount::strackId [private]

Definition at line 31 of file MdcTCount.h.

Referenced by GetstrackId(), and GetTCount().

int MdcTCount::strackNo [private]

Definition at line 27 of file MdcTCount.h.

Referenced by GetstrackNo(), and GetTCount().


Generated on Tue Nov 29 23:20:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7