#include <TrigMdc.h>
Public Member Functions | |
TrigMdc (const char *name) | |
virtual | ~TrigMdc () |
void | setMdcTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data) |
void | initialize () |
const std::string & | getName () const |
int | getMdcHitOne (int layer, int wire) const |
int | getMdcHitSOne (int layer, int wire) const |
int | getMdcHitPre (int layer, int wire) const |
int | getMdcHitAft (int layer, int wire) const |
uint32_t | getMdcHitWin (int layer, int wire) const |
int | getMdcTSFOne (int layer, int wire) const |
int | getMdcTSFSOne (int layer, int wire) const |
int | getMdcTSFPre (int layer, int wire) const |
int | getMdcTSFAft (int layer, int wire) const |
uint32_t | getMdcTSFWin (int layer, int wire) const |
int | getMdcLtrkOne (int id) const |
int | getMdcLtrkSOne (int id) const |
int | getMdcLtrkPre (int id) const |
int | getMdcLtrkAft (int id) const |
uint32_t | getMdcLtrkWin (int id) const |
int | getMdcStrkOne (int id) const |
int | getMdcStrkSOne (int id) const |
int | getMdcStrkPre (int id) const |
int | getMdcStrkAft (int id) const |
uint32_t | getMdcStrkWin (int id) const |
int | getMdcLtrkCoutOne (int id) const |
int | getMdcLtrkCoutSOne (int id) const |
int | getMdcStrkCoutOne (int id) const |
int | getMdcStrkCoutSOne (int id) const |
int | getMdcTrigCondi (int id) const |
void | print () |
Private Attributes | |
std::string | m_name |
std::string | filename |
std::map< uint32_t, std::vector< uint32_t > > | m_datamap |
int ** | m_mdchit_one |
int ** | m_mdchit_sone |
int ** | m_mdchit_pre |
int ** | m_mdchit_aft |
uint32_t ** | m_mdchit_win |
int ** | m_mdctsf_one |
int ** | m_mdctsf_sone |
int ** | m_mdctsf_pre |
int ** | m_mdctsf_aft |
uint32_t ** | m_mdctsf_win |
int * | m_mdcltrk_one |
int * | m_mdcltrk_sone |
int * | m_mdcltrk_pre |
int * | m_mdcltrk_aft |
uint32_t * | m_mdcltrk_win |
int * | m_mdcstrk_one |
int * | m_mdcstrk_sone |
int * | m_mdcstrk_pre |
int * | m_mdcstrk_aft |
uint32_t * | m_mdcstrk_win |
int * | m_mdcltrkc_one |
int * | m_mdcltrkc_sone |
int * | m_mdcstrkc_one |
int * | m_mdcstrkc_sone |
int * | m_mdcTrigCondi |
Definition at line 9 of file TrigMdc.h.
TrigMdc::TrigMdc | ( | const char * | name | ) |
Definition at line 7 of file TrigMdc.cxx.
References EvtCyclic3::c_str(), filename, genRecEmupikp::i, ganga-rec::j, m_datamap, m_mdchit_aft, m_mdchit_one, m_mdchit_pre, m_mdchit_sone, m_mdchit_win, m_mdcltrk_aft, m_mdcltrk_one, m_mdcltrk_pre, m_mdcltrk_sone, m_mdcltrk_win, m_mdcltrkc_one, m_mdcltrkc_sone, m_mdcstrk_aft, m_mdcstrk_one, m_mdcstrk_pre, m_mdcstrk_sone, m_mdcstrk_win, m_mdcstrkc_one, m_mdcstrkc_sone, m_mdcTrigCondi, m_mdctsf_aft, m_mdctsf_one, m_mdctsf_pre, m_mdctsf_sone, m_mdctsf_win, and deljobs::string.
00007 : m_name(name){ 00008 // hit 00009 m_mdchit_one = new int*[24]; 00010 for (int i = 0; i < 24; i++) m_mdchit_one[i] = new int[256]; 00011 m_mdchit_sone = new int*[24]; 00012 for (int i = 0; i < 24; i++) m_mdchit_sone[i] = new int[256]; 00013 m_mdchit_pre = new int*[24]; 00014 for(int i=0; i<24; i++) m_mdchit_pre[i] = new int[256]; 00015 m_mdchit_aft = new int*[24]; 00016 for(int i=0; i<24; i++) m_mdchit_aft[i] = new int[256]; 00017 m_mdchit_win = new uint32_t*[24]; 00018 for(int i=0; i<24; i++) m_mdchit_win[i] = new uint32_t[256]; 00019 // tsf 00020 m_mdctsf_one = new int*[6]; 00021 for (int i=0; i<6; i++) m_mdctsf_one[i] = new int[256]; 00022 m_mdctsf_sone = new int*[6]; 00023 for (int i=0; i<6; i++) m_mdctsf_sone[i] = new int[256]; 00024 m_mdctsf_pre = new int*[6]; 00025 for(int i=0; i<6; i++) m_mdctsf_pre[i] = new int[256]; 00026 m_mdctsf_aft = new int*[6]; 00027 for(int i=0; i<6; i++) m_mdctsf_aft[i] = new int[256]; 00028 m_mdctsf_win = new uint32_t*[6]; 00029 for(int i=0; i<6; i++) m_mdctsf_win[i] = new uint32_t[256]; 00030 // ltrk 00031 m_mdcltrk_one = new int[128]; 00032 m_mdcltrk_sone = new int[128]; 00033 m_mdcltrk_pre = new int[128]; 00034 m_mdcltrk_aft = new int[128]; 00035 m_mdcltrk_win = new uint32_t[128]; 00036 // strk 00037 m_mdcstrk_one = new int[128]; 00038 m_mdcstrk_sone = new int[128]; 00039 m_mdcstrk_pre = new int[128]; 00040 m_mdcstrk_aft = new int[128]; 00041 m_mdcstrk_win = new uint32_t[128]; 00042 // ltrk in ltrk counter 00043 m_mdcltrkc_one = new int[132]; 00044 m_mdcltrkc_sone= new int[132]; 00045 // strk in strk counter 00046 m_mdcstrkc_one = new int[132]; 00047 m_mdcstrkc_sone = new int[132]; 00048 // trigger condition 00049 m_mdcTrigCondi = new int[10]; 00050 00051 filename = getenv("TRIGEVENTROOT"); 00052 filename += "/dat/trig_mdc.txt"; 00053 ifstream inputfile; 00054 inputfile.open(filename.c_str()); 00055 string data[6]; 00056 std::vector<uint32_t> vtmp; 00057 uint32_t mark = 226; 00058 for(uint32_t i = 0; i < 6; i++) inputfile >> data[i]; 00059 for(uint32_t j = 0; j < 4680; j++) { 00060 for(uint32_t k = 0; k < 6; k++) inputfile >> data[k]; 00061 if((uint32_t (atoi(data[0].c_str())) != mark) || j == 4679) { 00062 if(j == 4679) { 00063 for(int m = 1; m < 6; m++) vtmp.push_back(atoi(data[m].c_str())); 00064 } 00065 typedef pair<uint32_t, vector<uint32_t> > vpair; 00066 m_datamap.insert(vpair(mark,vtmp)); 00067 mark = atoi(data[0].c_str()); 00068 vtmp.clear(); 00069 } 00070 if((uint32_t (atoi(data[0].c_str())) == mark) && j != 4679) { 00071 for(int l = 1; l < 6; l++) vtmp.push_back(atoi(data[l].c_str())); 00072 } 00073 } 00074 }
TrigMdc::~TrigMdc | ( | ) | [virtual] |
Definition at line 76 of file TrigMdc.cxx.
References m_mdchit_one, m_mdchit_pre, m_mdchit_sone, m_mdcltrk_one, m_mdcltrk_sone, m_mdcltrkc_one, m_mdcltrkc_sone, m_mdcstrk_one, m_mdcstrk_sone, m_mdcstrkc_one, m_mdcstrkc_sone, m_mdcTrigCondi, m_mdctsf_one, and m_mdctsf_sone.
00076 { 00077 delete m_mdchit_one; 00078 delete m_mdctsf_one; 00079 delete m_mdchit_sone; 00080 delete m_mdctsf_sone; 00081 00082 delete m_mdchit_pre; 00083 // delete m_mdchit_aft; 00084 00085 delete m_mdcltrk_one; 00086 delete m_mdcstrk_one; 00087 delete m_mdcltrkc_one; 00088 delete m_mdcstrkc_one; 00089 00090 delete m_mdcltrk_sone; 00091 delete m_mdcstrk_sone; 00092 delete m_mdcltrkc_sone; 00093 delete m_mdcstrkc_sone; 00094 00095 delete m_mdcTrigCondi; 00096 }
int TrigMdc::getMdcHitAft | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 28 of file TrigMdc.h.
References m_mdchit_aft.
00028 { return m_mdchit_aft[layer][wire]; } // first down in windows after first up
int TrigMdc::getMdcHitOne | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 20 of file TrigMdc.h.
References m_mdchit_one.
00020 { return m_mdchit_one[layer][wire]; }
int TrigMdc::getMdcHitPre | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 27 of file TrigMdc.h.
References m_mdchit_pre.
00027 { return m_mdchit_pre[layer][wire]; } // first up in windows
int TrigMdc::getMdcHitSOne | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 21 of file TrigMdc.h.
References m_mdchit_sone.
00021 { 00022 if(m_mdchit_sone[layer][wire] != 0) { 00023 return (m_mdchit_sone[layer][wire] + 1); 00024 } 00025 else return 0; 00026 }
uint32_t TrigMdc::getMdcHitWin | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 29 of file TrigMdc.h.
References m_mdchit_win.
00029 { return m_mdchit_win[layer][wire]; } // hit distributions in windows
int TrigMdc::getMdcLtrkAft | ( | int | id | ) | const [inline] |
Definition at line 52 of file TrigMdc.h.
References m_mdcltrk_aft.
00052 { return m_mdcltrk_aft[id]; } // first down in windows after first up
int TrigMdc::getMdcLtrkCoutOne | ( | int | id | ) | const [inline] |
Definition at line 68 of file TrigMdc.h.
References m_mdcltrkc_one.
00068 { return m_mdcltrkc_one[id]; }
int TrigMdc::getMdcLtrkCoutSOne | ( | int | id | ) | const [inline] |
Definition at line 69 of file TrigMdc.h.
References m_mdcltrkc_sone.
00069 { 00070 if(m_mdcltrkc_sone[id] != 0) { 00071 return (m_mdcltrkc_sone[id] + 1); 00072 } 00073 else return 0; 00074 }
int TrigMdc::getMdcLtrkOne | ( | int | id | ) | const [inline] |
Definition at line 44 of file TrigMdc.h.
References m_mdcltrk_one.
00044 { return m_mdcltrk_one[id]; }
int TrigMdc::getMdcLtrkPre | ( | int | id | ) | const [inline] |
Definition at line 51 of file TrigMdc.h.
References m_mdcltrk_pre.
00051 { return m_mdcltrk_pre[id]; } // first up in windows
int TrigMdc::getMdcLtrkSOne | ( | int | id | ) | const [inline] |
Definition at line 45 of file TrigMdc.h.
References m_mdcltrk_sone.
00045 { 00046 if(m_mdcltrk_sone[id] != 0) { 00047 return (m_mdcltrk_sone[id] + 1); 00048 } 00049 else return 0; 00050 }
uint32_t TrigMdc::getMdcLtrkWin | ( | int | id | ) | const [inline] |
Definition at line 53 of file TrigMdc.h.
References m_mdcltrk_win.
00053 { return m_mdcltrk_win[id]; } // hit distributions in windows
int TrigMdc::getMdcStrkAft | ( | int | id | ) | const [inline] |
Definition at line 64 of file TrigMdc.h.
References m_mdcstrk_aft.
00064 { return m_mdcstrk_aft[id]; } // first down in windows after first up
int TrigMdc::getMdcStrkCoutOne | ( | int | id | ) | const [inline] |
Definition at line 77 of file TrigMdc.h.
References m_mdcstrkc_one.
00077 { return m_mdcstrkc_one[id]; }
int TrigMdc::getMdcStrkCoutSOne | ( | int | id | ) | const [inline] |
Definition at line 78 of file TrigMdc.h.
References m_mdcstrkc_sone.
00078 { 00079 if(m_mdcstrkc_sone[id] != 0) { 00080 return (m_mdcstrkc_sone[id] + 1); 00081 } 00082 else return 0; 00083 }
int TrigMdc::getMdcStrkOne | ( | int | id | ) | const [inline] |
Definition at line 56 of file TrigMdc.h.
References m_mdcstrk_one.
00056 { return m_mdcstrk_one[id]; }
int TrigMdc::getMdcStrkPre | ( | int | id | ) | const [inline] |
Definition at line 63 of file TrigMdc.h.
References m_mdcstrk_pre.
00063 { return m_mdcstrk_pre[id]; } // first up in windows
int TrigMdc::getMdcStrkSOne | ( | int | id | ) | const [inline] |
Definition at line 57 of file TrigMdc.h.
References m_mdcstrk_sone.
00057 { 00058 if(m_mdcstrk_sone[id] != 0) { 00059 return (m_mdcstrk_sone[id] + 1); 00060 } 00061 else return 0; 00062 }
uint32_t TrigMdc::getMdcStrkWin | ( | int | id | ) | const [inline] |
Definition at line 65 of file TrigMdc.h.
References m_mdcstrk_win.
00065 { return m_mdcstrk_win[id]; } // hit distributions in windows
int TrigMdc::getMdcTrigCondi | ( | int | id | ) | const [inline] |
Definition at line 85 of file TrigMdc.h.
References m_mdcTrigCondi.
00085 { return m_mdcTrigCondi[id]; }
int TrigMdc::getMdcTSFAft | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 40 of file TrigMdc.h.
References m_mdctsf_aft.
00040 { return m_mdctsf_aft[layer][wire]; } // first down in windows after first up
int TrigMdc::getMdcTSFOne | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 32 of file TrigMdc.h.
References m_mdctsf_one.
00032 { return m_mdctsf_one[layer][wire]; }
int TrigMdc::getMdcTSFPre | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 39 of file TrigMdc.h.
References m_mdctsf_pre.
00039 { return m_mdctsf_pre[layer][wire]; } // first up in windows
int TrigMdc::getMdcTSFSOne | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 33 of file TrigMdc.h.
References m_mdctsf_sone.
00033 { 00034 if(m_mdctsf_sone[layer][wire] != 0) { 00035 return (m_mdctsf_sone[layer][wire] + 1); 00036 } 00037 else return 0; 00038 }
uint32_t TrigMdc::getMdcTSFWin | ( | int | layer, | |
int | wire | |||
) | const [inline] |
Definition at line 41 of file TrigMdc.h.
References m_mdctsf_win.
00041 { return m_mdctsf_win[layer][wire]; } // hit distributions in windows
const std::string& TrigMdc::getName | ( | ) | const [inline] |
void TrigMdc::initialize | ( | ) |
Definition at line 98 of file TrigMdc.cxx.
References genRecEmupikp::i, ganga-rec::j, m_mdchit_aft, m_mdchit_one, m_mdchit_pre, m_mdchit_sone, m_mdchit_win, m_mdcltrk_aft, m_mdcltrk_one, m_mdcltrk_pre, m_mdcltrk_sone, m_mdcltrk_win, m_mdcltrkc_one, m_mdcltrkc_sone, m_mdcstrk_aft, m_mdcstrk_one, m_mdcstrk_pre, m_mdcstrk_sone, m_mdcstrk_win, m_mdcstrkc_one, m_mdcstrkc_sone, m_mdcTrigCondi, m_mdctsf_aft, m_mdctsf_one, m_mdctsf_pre, m_mdctsf_sone, and m_mdctsf_win.
00098 { 00099 //initialize 00100 for(int i = 0; i < 24; i++) 00101 for(int j = 0; j < 256; j++) 00102 { 00103 m_mdchit_one[i][j] = 0; 00104 m_mdchit_sone[i][j] = 0; 00105 m_mdchit_pre[i][j] = 0; 00106 m_mdchit_aft[i][j] = 0; 00107 m_mdchit_win[i][j] = 0; 00108 if(i < 6) { 00109 m_mdctsf_one[i][j] = 0; 00110 m_mdctsf_sone[i][j] = 0; 00111 m_mdctsf_pre[i][j] = 0; 00112 m_mdctsf_aft[i][j] = 0; 00113 m_mdctsf_win[i][j] = 0; 00114 } 00115 } 00116 for(int k = 0; k < 132; k++) 00117 { 00118 if(k < 10) m_mdcTrigCondi[k] = 0; 00119 m_mdcltrkc_one[k] = 0; 00120 m_mdcstrkc_one[k] = 0; 00121 m_mdcltrkc_sone[k] = 0; 00122 m_mdcstrkc_sone[k] = 0; 00123 if(k < 128) { 00124 m_mdcltrk_one[k] = 0; 00125 m_mdcltrk_sone[k] = 0; 00126 m_mdcltrk_pre[k] = 0; 00127 m_mdcltrk_aft[k] = 0; 00128 m_mdcltrk_win[k] = 0; 00129 00130 m_mdcstrk_one[k] = 0; 00131 m_mdcstrk_sone[k] = 0; 00132 m_mdcstrk_pre[k] = 0; 00133 m_mdcstrk_aft[k] = 0; 00134 m_mdcstrk_win[k] = 0; 00135 00136 } 00137 } 00138 }
void TrigMdc::print | ( | ) |
Definition at line 318 of file TrigMdc.cxx.
References genRecEmupikp::i, iter(), ganga-rec::j, m_datamap, m_mdchit_one, m_mdchit_sone, m_mdcltrk_one, m_mdcltrk_sone, m_mdcltrkc_one, m_mdcltrkc_sone, m_mdcstrk_one, m_mdcstrk_sone, m_mdcstrkc_one, m_mdcstrkc_sone, m_mdctsf_one, and m_mdctsf_sone.
00318 { 00319 cout<<"The number of board is "<<m_datamap.size()<<endl; 00320 std::map<uint32_t, std::vector<uint32_t> >::iterator iter = m_datamap.begin(); 00321 if(iter->first == 0xe2) 00322 cout<<"The data size of E2 board is "<<iter->second.size()<<endl; 00323 00324 for(int i = 0; i < 24; i++) 00325 for(int j = 0; j < 256; j++) 00326 { 00327 m_mdchit_one[i][j] = 0; 00328 m_mdchit_sone[i][j] = 0; 00329 cout<<"MDC hits: "<<i<<" "<<j<<" "<<m_mdchit_one[i][j]<<endl; 00330 cout<<"MDC hits: "<<i<<" "<<j<<" "<<m_mdchit_sone[i][j]<<endl; 00331 if(i < 6) { 00332 m_mdctsf_one[i][j] = 0; 00333 m_mdctsf_sone[i][j] = 0; 00334 cout<<"MDC tsf: "<<i<<" "<<j<<" "<<m_mdctsf_one[i][j]<<endl; 00335 cout<<"MDC tsf: "<<i<<" "<<j<<" "<<m_mdctsf_sone[i][j]<<endl; 00336 } 00337 } 00338 for(int k = 0; k < 132; k++) 00339 { 00340 m_mdcltrkc_one[k] = 0; 00341 m_mdcstrkc_one[k] = 0; 00342 m_mdcltrkc_sone[k] = 0; 00343 m_mdcstrkc_sone[k] = 0; 00344 cout<<"MDC ltrkc: "<<k<<" "<<m_mdcltrkc_one[k]<<endl; 00345 cout<<"MDC strkc: "<<k<<" "<<m_mdcstrkc_one[k]<<endl; 00346 cout<<"MDC ltrkc: "<<k<<" "<<m_mdcltrkc_sone[k]<<endl; 00347 cout<<"MDC strkc: "<<k<<" "<<m_mdcstrkc_sone[k]<<endl; 00348 if(k < 128) { 00349 m_mdcltrk_one[k] = 0; 00350 m_mdcstrk_one[k] = 0; 00351 m_mdcltrk_sone[k] = 0; 00352 m_mdcstrk_sone[k] = 0; 00353 cout<<"MDC ltrk: "<<k<<" "<<m_mdcltrk_one[k]<<endl; 00354 cout<<"MDC strk: "<<k<<" "<<m_mdcstrk_one[k]<<endl; 00355 cout<<"MDC ltrk: "<<k<<" "<<m_mdcltrk_sone[k]<<endl; 00356 cout<<"MDC strk: "<<k<<" "<<m_mdcstrk_sone[k]<<endl; 00357 } 00358 } 00359 }
void TrigMdc::setMdcTrigData | ( | uint32_t | boardId, | |
uint32_t | window, | |||
uint32_t | datasize, | |||
const uint32_t * | data | |||
) |
Definition at line 140 of file TrigMdc.cxx.
References genRecEmupikp::i, iter(), m_datamap, m_mdchit_aft, m_mdchit_one, m_mdchit_pre, m_mdchit_sone, and m_mdchit_win.
00140 { 00141 if(datasize%window != 0) cerr<<"ERROR: The data size is not completed in time windows"<<endl; 00142 uint32_t periods = datasize/window; 00143 std::map<uint32_t, std::vector<uint32_t> >::iterator iter=m_datamap.begin(); 00144 for(; iter != m_datamap.end(); iter++){ 00145 if(iter->first != boardId) continue; 00146 std::vector<uint32_t>::iterator iter1 = iter->second.begin(); 00147 for(; iter1 != iter->second.end(); iter1+=5){ 00148 uint32_t byteId = *(iter1+0) -1; 00149 uint32_t bitId = *(iter1+1); 00150 int layerId = *(iter1+2) -1; 00151 int wireId = *(iter1+3) -1; 00152 uint32_t data_type = *(iter1+4); 00153 int seriesOne = -100; 00154 bool firstSOne = true; // this is a flag of first continue "1" signals 00155 bool flag_firstone(true), flag_lastone(true); // whether to book up or down 00156 for(uint32_t i=0; i<window; i++){ 00157 if(layerId < 0 || wireId < 0) continue; 00158 if((iter->first) >= 226 && (iter->first) <= 233){ // TKF1-8 information 00159 if(data_type == 1){ // hit 00160 if((data[byteId + i*periods] >> bitId) & 1){ 00161 if(layerId >= 36 && layerId <= 39 ){ 00162 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdchit_pre[layerId-16][wireId] = i+1; flag_firstone = false;} 00163 if( ((i-seriesOne)!=1) && (m_mdchit_aft[layerId-16][wireId]!=0) ) flag_lastone = false; 00164 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdchit_aft[layerId-16][wireId]=i+1; 00165 if(((i-seriesOne)==1) && firstSOne) m_mdchit_sone[layerId-16][wireId] += 1; 00166 if(m_mdchit_sone[layerId-16][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00167 seriesOne = i; 00168 m_mdchit_one[layerId-16][wireId] += 1; 00169 m_mdchit_win[layerId-16][wireId] += 1<<i; 00170 } 00171 else { 00172 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdchit_pre[layerId][wireId] = i+1; flag_firstone = false;} 00173 if( ((i-seriesOne)!=1) && (m_mdchit_aft[layerId][wireId]!=0) ) flag_lastone = false; 00174 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdchit_aft[layerId][wireId]=i+1; 00175 if(((i-seriesOne) == 1) && firstSOne) m_mdchit_sone[layerId][wireId] += 1; 00176 if(m_mdchit_sone[layerId][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00177 seriesOne = i; 00178 m_mdchit_one[layerId][wireId] += 1; 00179 m_mdchit_win[layerId][wireId] += 1<<i; 00180 } 00181 } 00182 } 00183 if(data_type == 0) { // TSF 00184 if((data[byteId + i*periods] >> bitId) & 1) { 00185 if(layerId == 10) { 00186 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[2][wireId] = i+1; flag_firstone = false;} 00187 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[2][wireId]!=0) ) flag_lastone = false; 00188 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[2][wireId]=i+1; 00189 00190 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[2][wireId] += 1; 00191 if(m_mdctsf_sone[2][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00192 seriesOne = i; 00193 m_mdctsf_one[2][wireId] += 1; 00194 m_mdctsf_win[2][wireId] += 1<<i; 00195 } 00196 if(layerId == 14) { 00197 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[3][wireId] = i+1; flag_firstone = false;} 00198 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[3][wireId]!=0) ) flag_lastone = false; 00199 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[3][wireId]=i+1; 00200 00201 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[3][wireId] += 1; 00202 if(m_mdctsf_sone[3][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00203 seriesOne = i; 00204 m_mdctsf_one[3][wireId] += 1; 00205 m_mdctsf_win[3][wireId] += 1<<i; 00206 } 00207 if(layerId == 17) { 00208 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[4][wireId] = i+1; flag_firstone = false;} 00209 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[4][wireId]!=0) ) flag_lastone = false; 00210 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[4][wireId]=i+1; 00211 00212 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[4][wireId] += 1; 00213 if(m_mdctsf_sone[4][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00214 seriesOne = i; 00215 m_mdctsf_one[4][wireId] += 1; 00216 m_mdctsf_win[4][wireId] += 1<<i; 00217 } 00218 if(layerId == 37) { 00219 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdctsf_pre[5][wireId] = i+1; flag_firstone = false;} 00220 if( ((i-seriesOne)!=1) && (m_mdctsf_aft[5][wireId]!=0) ) flag_lastone = false; 00221 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdctsf_aft[5][wireId]=i+1; 00222 00223 if((i-seriesOne) == 1 && firstSOne) m_mdctsf_sone[5][wireId] += 1; 00224 if(m_mdctsf_sone[5][wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00225 seriesOne = i; 00226 m_mdctsf_one[5][wireId] += 1; 00227 m_mdctsf_win[5][wireId] += 1<<i; 00228 } 00229 } 00230 } 00231 if(data_type == 2) { // LTK 00232 if((data[byteId + i*periods] >> bitId) & 1) { 00233 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdcltrk_pre[wireId] = i+1; flag_firstone = false;} 00234 if( ((i-seriesOne)!=1) && (m_mdcltrk_aft[wireId]!=0) ) flag_lastone = false; 00235 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdcltrk_aft[wireId]=i+1; 00236 00237 if((i-seriesOne) == 1 && firstSOne) m_mdcltrk_sone[wireId] += 1; 00238 if(m_mdcltrk_sone[wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00239 seriesOne = i; 00240 m_mdcltrk_one[wireId] += 1; 00241 m_mdcltrk_win[wireId] += 1<<i; 00242 } 00243 } 00244 if(data_type == 3) { // STK 00245 if((data[byteId + i*periods] >> bitId) & 1) { 00246 if(flag_firstone && (i-seriesOne!=1) && (i!=0)){ m_mdcstrk_pre[wireId] = i+1; flag_firstone = false;} 00247 if( ((i-seriesOne)!=1) && (m_mdcstrk_aft[wireId]!=0) ) flag_lastone = false; 00248 if( (flag_firstone==false) && ((i-seriesOne)==1) && flag_lastone) m_mdcstrk_aft[wireId]=i+1; 00249 00250 if((i-seriesOne) == 1 && firstSOne) m_mdcstrk_sone[wireId] += 1; 00251 if(m_mdcstrk_sone[wireId] != 0 && (i-seriesOne) != 1) firstSOne = false; 00252 seriesOne = i; 00253 m_mdcstrk_one[wireId] += 1; 00254 m_mdcstrk_win[wireId] += 1<<i; 00255 } 00256 } 00257 } // end of TKF1-8 00258 00259 if((iter->first) == 234) { // ITKF information 00260 if(data_type == 0) { 00261 if((data[byteId + i*periods] >> bitId) & 1) { 00262 if(layerId == 2) { 00263 if((i - seriesOne) == 1 && firstSOne) m_mdctsf_sone[0][wireId] += 1; 00264 if(m_mdctsf_sone[0][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false; 00265 seriesOne = i; 00266 m_mdctsf_one[0][wireId] += 1; 00267 } 00268 if(layerId == 6) { 00269 if((i - seriesOne) == 1 && firstSOne) m_mdctsf_sone[1][wireId] += 1; 00270 if(m_mdctsf_sone[1][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false; 00271 seriesOne = i; 00272 m_mdctsf_one[1][wireId] += 1; 00273 } 00274 } 00275 } 00276 if(data_type == 1) { 00277 if((data[byteId + i*periods] >> bitId) & 1) { 00278 if((i - seriesOne) == 1 && firstSOne) m_mdchit_sone[layerId][wireId] += 1; 00279 if(m_mdchit_sone[layerId][wireId] != 0 && (i - seriesOne) != 1) firstSOne = false; 00280 seriesOne = i; 00281 m_mdchit_one[layerId][wireId] += 1; 00282 } 00283 } 00284 if(data_type == 4) { 00285 if((data[byteId + i*periods] >> bitId) & 1) { 00286 m_mdcTrigCondi[wireId] = 1; 00287 } 00288 } 00289 } // end of ITKF 00290 00291 if((iter->first) == 235 || (iter->first) == 236) { // LTKC or STKC information 00292 if(data_type == 2) { 00293 if((data[byteId + i*periods] >> bitId) & 1) { 00294 if((i - seriesOne) == 1 && firstSOne) m_mdcltrkc_sone[wireId] += 1; 00295 if(m_mdcltrkc_sone[wireId] != 0 && (i - seriesOne) != 1) firstSOne = false; 00296 seriesOne = i; 00297 m_mdcltrkc_one[wireId] += 1; 00298 if(wireId >= 128) m_mdcTrigCondi[wireId - 126] = 1; 00299 } 00300 } 00301 if(data_type == 3) { 00302 if((data[byteId + i*periods] >> bitId) & 1) { 00303 if((i - seriesOne) == 1 && firstSOne) m_mdcstrkc_sone[wireId] += 1; 00304 if(m_mdcstrkc_sone[wireId] != 0 && (i - seriesOne) != 1) firstSOne = false; 00305 seriesOne = i; 00306 m_mdcstrkc_one[wireId] += 1; 00307 if(wireId >= 128) m_mdcTrigCondi[wireId - 122] = 1; 00308 } 00309 } 00310 } //end of LTKC or STKC 00311 00312 } // loop in windows 00313 00314 } 00315 } 00316 }
std::string TrigMdc::filename [private] |
std::map<uint32_t, std::vector<uint32_t> > TrigMdc::m_datamap [private] |
int** TrigMdc::m_mdchit_aft [private] |
Definition at line 99 of file TrigMdc.h.
Referenced by getMdcHitAft(), initialize(), setMdcTrigData(), and TrigMdc().
int** TrigMdc::m_mdchit_one [private] |
Definition at line 96 of file TrigMdc.h.
Referenced by getMdcHitOne(), initialize(), print(), setMdcTrigData(), TrigMdc(), and ~TrigMdc().
int** TrigMdc::m_mdchit_pre [private] |
Definition at line 98 of file TrigMdc.h.
Referenced by getMdcHitPre(), initialize(), setMdcTrigData(), TrigMdc(), and ~TrigMdc().
int** TrigMdc::m_mdchit_sone [private] |
Definition at line 97 of file TrigMdc.h.
Referenced by getMdcHitSOne(), initialize(), print(), setMdcTrigData(), TrigMdc(), and ~TrigMdc().
uint32_t** TrigMdc::m_mdchit_win [private] |
Definition at line 100 of file TrigMdc.h.
Referenced by getMdcHitWin(), initialize(), setMdcTrigData(), and TrigMdc().
int* TrigMdc::m_mdcltrk_aft [private] |
Definition at line 111 of file TrigMdc.h.
Referenced by getMdcLtrkAft(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcltrk_one [private] |
Definition at line 108 of file TrigMdc.h.
Referenced by getMdcLtrkOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcltrk_pre [private] |
Definition at line 110 of file TrigMdc.h.
Referenced by getMdcLtrkPre(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcltrk_sone [private] |
Definition at line 109 of file TrigMdc.h.
Referenced by getMdcLtrkSOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
uint32_t* TrigMdc::m_mdcltrk_win [private] |
Definition at line 112 of file TrigMdc.h.
Referenced by getMdcLtrkWin(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcltrkc_one [private] |
Definition at line 120 of file TrigMdc.h.
Referenced by getMdcLtrkCoutOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcltrkc_sone [private] |
Definition at line 121 of file TrigMdc.h.
Referenced by getMdcLtrkCoutSOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcstrk_aft [private] |
Definition at line 117 of file TrigMdc.h.
Referenced by getMdcStrkAft(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcstrk_one [private] |
Definition at line 114 of file TrigMdc.h.
Referenced by getMdcStrkOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcstrk_pre [private] |
Definition at line 116 of file TrigMdc.h.
Referenced by getMdcStrkPre(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcstrk_sone [private] |
Definition at line 115 of file TrigMdc.h.
Referenced by getMdcStrkSOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
uint32_t* TrigMdc::m_mdcstrk_win [private] |
Definition at line 118 of file TrigMdc.h.
Referenced by getMdcStrkWin(), initialize(), and TrigMdc().
int* TrigMdc::m_mdcstrkc_one [private] |
Definition at line 123 of file TrigMdc.h.
Referenced by getMdcStrkCoutOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcstrkc_sone [private] |
Definition at line 124 of file TrigMdc.h.
Referenced by getMdcStrkCoutSOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int* TrigMdc::m_mdcTrigCondi [private] |
Definition at line 126 of file TrigMdc.h.
Referenced by getMdcTrigCondi(), initialize(), TrigMdc(), and ~TrigMdc().
int** TrigMdc::m_mdctsf_aft [private] |
Definition at line 105 of file TrigMdc.h.
Referenced by getMdcTSFAft(), initialize(), and TrigMdc().
int** TrigMdc::m_mdctsf_one [private] |
Definition at line 102 of file TrigMdc.h.
Referenced by getMdcTSFOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
int** TrigMdc::m_mdctsf_pre [private] |
Definition at line 104 of file TrigMdc.h.
Referenced by getMdcTSFPre(), initialize(), and TrigMdc().
int** TrigMdc::m_mdctsf_sone [private] |
Definition at line 103 of file TrigMdc.h.
Referenced by getMdcTSFSOne(), initialize(), print(), TrigMdc(), and ~TrigMdc().
uint32_t** TrigMdc::m_mdctsf_win [private] |
Definition at line 106 of file TrigMdc.h.
Referenced by getMdcTSFWin(), initialize(), and TrigMdc().
std::string TrigMdc::m_name [private] |