BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcTF Class Reference

#include <MdcTF.h>

Public Member Functions

 MdcTF ()
 
 ~MdcTF ()
 
void GetTrack ()
 
void ReadTFLut ()
 
void Dump ()
 
int GetstrackId (int i)
 
int GetltrackId (int i)
 
std::vector< int > & GetintrkSL1 ()
 
std::vector< int > & GetintrkSL2 ()
 

Detailed Description

Definition at line 6 of file MdcTF.h.

Constructor & Destructor Documentation

◆ MdcTF()

MdcTF::MdcTF ( )

Definition at line 20 of file MdcTF.cxx.

21{
22 m_MdcTSF = MdcTSF::get_Mdc();
23 ReadTFLut();
24 //Dump();
25}
void ReadTFLut()
Definition MdcTF.cxx:76
static MdcTSF * get_Mdc(void)
Definition MdcTSF.cxx:28

◆ ~MdcTF()

MdcTF::~MdcTF ( )

Definition at line 26 of file MdcTF.cxx.

27{
28}

Member Function Documentation

◆ Dump()

void MdcTF::Dump ( )

Definition at line 114 of file MdcTF.cxx.

115{
116 std::vector<int> combine_size;
117 cout<<endl;
118 cout<<" ***************check data file tf: ***************** "<<endl;
119 cout<<"*--------------------------BEGIN-------------------------------*"<<endl;
120 cout<<endl;
121 combine_size.clear();
122 for(unsigned int i=0; i<TF.size(); i++) {
123 cout<<"Cell ID --> "<<i<<endl;
124 combine_size.push_back(TF[i].size());
125 for(unsigned int j=0; j<TF[i].size(); j++) {
126 cout<<TF[i][j]<<" ";
127 if((j+1)%4==0) cout<<endl;
128 }
129 cout<<endl;
130 }
131 sort(combine_size.begin(),combine_size.end());
132 cout<<"The Max Number of Combination is "<<combine_size[combine_size.size()-1]/4<<endl;
133 cout<<endl;
134 cout<<"*----------------------------END-------------------------------*"<<endl;
135}

◆ GetintrkSL1()

std::vector< int > & MdcTF::GetintrkSL1 ( )
inline

Definition at line 16 of file MdcTF.h.

16{ return intrkSL1; }

Referenced by MdcTCount::GetTCount().

◆ GetintrkSL2()

std::vector< int > & MdcTF::GetintrkSL2 ( )
inline

Definition at line 17 of file MdcTF.h.

17{ return intrkSL2; }

Referenced by MdcTCount::GetTCount().

◆ GetltrackId()

int MdcTF::GetltrackId ( int i)
inline

Definition at line 15 of file MdcTF.h.

15{ return ltrack[i]; }

Referenced by MdcTCount::GetTCount().

◆ GetstrackId()

int MdcTF::GetstrackId ( int i)
inline

Definition at line 14 of file MdcTF.h.

14{ return strack[i]; }

Referenced by MdcTCount::GetTCount().

◆ GetTrack()

void MdcTF::GetTrack ( )

Definition at line 29 of file MdcTF.cxx.

30{
31 intrkSL1.clear();
32 intrkSL2.clear();
33
34 m_MdcTSF->GetTS();
35 for(int i=0;i<128;i++) { strack[i] = 0; ltrack[i] = 0; }
36
37 for(int i=0; i<48; i++) {
38 if(m_MdcTSF->GetSL1TSF(i)==1) intrkSL1.push_back(i);
39 }
40 for(int i=0; i<80; i++) {
41 if(m_MdcTSF->GetSL2TSF(i)==1) intrkSL2.push_back(i);
42 }
43
44 std::vector<std::vector<int> >::iterator viter=TF.begin();
45 std::vector<int>::iterator iter;
46 for(int i=0;i<128;i++)
47 {
48 int tracId5 = m_MdcTSF->GetSL5TSF(i);
49 if(tracId5!=0)
50 {
51 iter = (*(viter + i)).begin();
52 for(;iter!=(*(viter + i)).end();iter+=4)
53 {
54 int cellId3 = *(iter+3)-1;
55 int cellId4 = *(iter+2)-1;
56 int cellId10 =*(iter)-1;
57 int trackId3 = m_MdcTSF->GetSL3TSF(cellId3);
58 int trackId4 = m_MdcTSF->GetSL4TSF(cellId4);
59 int trackId10 = m_MdcTSF->GetSL10TSF(cellId10);
60 if(trackId3 > 0 && trackId4 > 0) { strack[i] = 1; }
61 if(trackId3 > 0 && trackId4 > 0 && trackId10 > 0) ltrack[i] = 1;
62 }
63 }
64 }
65 //debug
66/*
67 std::cout<<"*************IN TF.cxx ************"<<std::endl;
68 for(int j = 0; j < 128; j++) {
69 if(strack[j] == 1) std::cout<<"short track : "<<j<<std::endl;
70 }
71 for(int j = 0; j < 128; j++) {
72 if(ltrack[j] == 1) std::cout<<"long track : "<<j<<std::endl;
73 }
74*/
75}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
int GetSL3TSF(int i)
Definition MdcTSF.h:21
int GetSL5TSF(int i)
Definition MdcTSF.h:23
int GetSL1TSF(int i)
Definition MdcTSF.h:19
int GetSL10TSF(int i)
Definition MdcTSF.h:24
int GetSL2TSF(int i)
Definition MdcTSF.h:20
void GetTS()
Definition MdcTSF.cxx:225
int GetSL4TSF(int i)
Definition MdcTSF.h:22

Referenced by MdcTCount::GetTCount().

◆ ReadTFLut()

void MdcTF::ReadTFLut ( )

Definition at line 76 of file MdcTF.cxx.

77{
78 fstream readin;
79 TF.clear();
80 int a,b,l1,l2,l3,l4;
81 for(int i=1;i<129;i++)
82 {
83 int num=0;
84 std::vector<int> tmp;
85 tmp.clear();
86 TString filename = TString(getenv( "TRIGGERROOT" ));
87 filename+="/data/tf/ptd5-2/PTD-SL5C-L19-C";
88 filename+=i;
89 filename+=".pat";
90 readin.open(filename,ios_base::in);
91 if(!readin) cerr<<"can not open the file "<<filename<<endl;
92 while(readin.good())
93 {
94 readin>>a>>b>>l4>>l3>>l2>>l1;
95 num++;
96 }
97 if(i==1) std::cout<<"number of line is "<<num-1<<std::endl;
98 readin.close();
99 readin.clear();
100 readin.open(filename,ios_base::in);
101 if(!readin) std::cerr<<"can not open the file again "<<filename<<std::endl;
102 for(int j=0;j<(num-1);j++)
103 {
104 readin>>a>>b>>l4>>l3>>l2>>l1;
105 tmp.push_back(l4);
106 tmp.push_back(l3);
107 tmp.push_back(l2);
108 tmp.push_back(l1);
109 }
110 readin.close();
111 TF.push_back(tmp);
112 }
113}
const double b
Definition slope.cxx:9

Referenced by MdcTF().


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