BOSS 8.0.0
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.

23{ m_MdcTF = new MdcTF(); }

◆ ~MdcTCount()

MdcTCount::~MdcTCount ( )

Definition at line 24 of file MdcTCount.cxx.

24 {
25 if ( m_MdcTF ) delete m_MdcTF;
26}

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; }

◆ 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; }

◆ GetnItrkSL2()

int MdcTCount::GetnItrkSL2 ( )
inline

Definition at line 17 of file MdcTCount.h.

17{ return nItrkSL2; }

◆ GetstrackId()

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

Definition at line 18 of file MdcTCount.h.

18{ return strackId; }

◆ GetstrackNo()

int MdcTCount::GetstrackNo ( )
inline

Definition at line 14 of file MdcTCount.h.

14{ return strackNo; }

◆ GetTCount()

void MdcTCount::GetTCount ( )

Definition at line 27 of file MdcTCount.cxx.

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

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