BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcTCount Class Reference

#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 ()
 

Detailed Description

Definition at line 9 of file MdcTCount.h.

Constructor & Destructor Documentation

◆ MdcTCount()

MdcTCount::MdcTCount ( )

Definition at line 23 of file MdcTCount.cxx.

24{
25 m_MdcTF = new MdcTF();
26}
Definition: MdcTF.h:6

◆ ~MdcTCount()

MdcTCount::~MdcTCount ( )

Definition at line 27 of file MdcTCount.cxx.

28{
29 if(m_MdcTF) delete m_MdcTF;
30}

Member Function Documentation

◆ GetintrkId1()

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

Definition at line 20 of file MdcTCount.h.

20{ return intrkId1; }

◆ GetintrkId2()

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

Definition at line 21 of file MdcTCount.h.

21{ return intrkId2; }

◆ GetltrackId()

std::vector< int > & MdcTCount::GetltrackId ( )
inline

Definition at line 19 of file MdcTCount.h.

19{ return ltrackId; }

Referenced by BesMdcTrig::startMdcTrig().

◆ GetltrackNo()

int MdcTCount::GetltrackNo ( )
inline

Definition at line 15 of file MdcTCount.h.

15{ return ltrackNo; }

◆ GetnItrkSL1()

int MdcTCount::GetnItrkSL1 ( )
inline

Definition at line 16 of file MdcTCount.h.

16{ return nItrkSL1; }

Referenced by BesMdcTrig::startMdcTrig().

◆ GetnItrkSL2()

int MdcTCount::GetnItrkSL2 ( )
inline

Definition at line 17 of file MdcTCount.h.

17{ return nItrkSL2; }

Referenced by BesMdcTrig::startMdcTrig().

◆ GetstrackId()

std::vector< int > & MdcTCount::GetstrackId ( )
inline

Definition at line 18 of file MdcTCount.h.

18{ return strackId; }

Referenced by BesMdcTrig::startMdcTrig().

◆ GetstrackNo()

int MdcTCount::GetstrackNo ( )
inline

Definition at line 14 of file MdcTCount.h.

14{ return strackNo; }

◆ GetTCount()

void MdcTCount::GetTCount ( )

Definition at line 31 of file MdcTCount.cxx.

32{
33 if(m_MdcTF) m_MdcTF->GetTrack();
34 //reset values
35 strackNo = 0;
36 ltrackNo = 0;
37 nItrkSL1 = 0;
38 nItrkSL2 = 0;
39 strackId.clear();
40 ltrackId.clear();
41 intrkId1.clear();
42 intrkId2.clear();
43
44 intrkId1 = m_MdcTF->GetintrkSL1();
45 intrkId2 = m_MdcTF->GetintrkSL2();
46 nItrkSL1 = intrkId1.size();
47 nItrkSL2 = intrkId2.size();
48
49 //Get short and long track information
50 for(int i = 0;i<128;i++)
51 {
52 int stId = 0, ltId = 0;
53 //find short track
54 if(m_MdcTF->GetstrackId(i) != 0) {
55 //cout<<"TCount Cell ID "<<i<<endl;
56 //for(int j = 1; j < 128; j++) {
57 for(int j = 1; j < 17; j++) {
58 if((i-j) < 0) stId = m_MdcTF->GetstrackId(128-j+i);
59 else stId = m_MdcTF->GetstrackId(i-j);
60 //cout<<"stId is "<<stId<<" j is "<<j<<" j%2 is "<<j%2<<endl;
61 if(stId == 0) {
62 if(j%2 != 0) { strackId.push_back(i); strackNo+=1; }//cout<<"short track count id : "<<i<<endl; }
63 break;
64 }
65 }
66 }
67 //find long track
68 if(m_MdcTF->GetltrackId(i) != 0) {
69 //for(int j = 1; j < 128; j++) {
70 for(int j = 1; j < 17; j++) {
71 if((i-j) < 0) ltId = m_MdcTF->GetltrackId(128-j+i);
72 else ltId = m_MdcTF->GetltrackId(i-j);
73 if(ltId == 0) {
74 if(j%2 != 0) { ltrackId.push_back(i); ltrackNo+=1; }// cout<<"long track count id : "<<i<<endl; }
75 break;
76 }
77 }
78 }
79 }
80/*
81 //No track combination
82 for(int i = 0;i<128;i++)
83 {
84 //find short track
85 if(m_MdcTF->GetstrackId(i) != 0) {
86 strackId.push_back(i);
87 }
88 //find long track
89 if(m_MdcTF->GetltrackId(i) != 0) {
90 ltrackId.push_back(i);
91 }
92 }
93*/
94 ISvcLocator* svcLocator = Gaudi::svcLocator();
95 StatusCode sc = svcLocator->service("BesGlobalTrigSvc", m_tmpSvc);
96 m_pIBGT = dynamic_cast<BesGlobalTrigSvc* >(m_tmpSvc);
97
98 //set short and long track Id in service
99 m_pIBGT->setMdcStrkId(strackId);
100 m_pIBGT->setMdcLtrkId(ltrackId);
101}
void setMdcStrkId(std::vector< int > i)
void setMdcLtrkId(std::vector< int > i)
std::vector< int > & GetintrkSL1()
Definition: MdcTF.h:16
std::vector< int > & GetintrkSL2()
Definition: MdcTF.h:17
void GetTrack()
Definition: MdcTF.cxx:29
int GetstrackId(int i)
Definition: MdcTF.h:14
int GetltrackId(int i)
Definition: MdcTF.h:15

Referenced by BesMdcTrig::startMdcTrig().


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