Skip to content
Snippets Groups Projects
Commit 8cb5a92a authored by Massimo Corradi's avatar Massimo Corradi Committed by Frank Winklmeier
Browse files

Adding isMoreCandidate flag in Pad simulation, ATR-22243

	modified:   Trigger/TrigT1/TrigT1RPChardware/src/Pad.cxx
	modified:   Trigger/TrigT1/TrigT1RPChardware/src/SectorLogic.cxx
parent 7ce57cd8
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,8 @@ Pad::Pad(int run, int event, CMAword debug,
// CMA data are loaded in the PAD with the method "load"
//
padDebug=debug;
//padDebug=0x3f; all debug ON
const ubit16 df=0;
m_run = run;
m_event=event;
......@@ -147,6 +149,7 @@ if(m_lowhigh) {
overlap();
makeOut();
if (m_feet_on) makeFeet();
if(padDebug&1<<df) display(0);
}//end-of-if(m_lowhigh
}//end-of-Pad::execute
//---------------------------------------------------------//
......@@ -170,7 +173,8 @@ for(m=0; m<2; m++) { // Low- High-Pt
thisThreshold = 3*m + m_padIn[m][j][i][l][0];
// find highest threshold
if(thisThreshold > m_padStep2[l][j][i] ) {
m_padStep2[l][j][i] = thisThreshold;
if (m_padStep2[l][j][i]==0) m_padStep2[l][j][7]++; // num of RoI with threshold
m_padStep2[l][j][i] = thisThreshold;
}//end-of-if
//if( !j && (thisThreshold > m_padStep2[l][j][2]) ) {
if( thisThreshold > m_padStep2[l][j][2] ) {
......@@ -183,7 +187,7 @@ for(m=0; m<2; m++) { // Low- High-Pt
<<m_padStep2[l][j][2]<<endl;
}//end-of-if(padDebug&1<<df)
}//end-of-if(m_padStep2
m_padStep2[l][j][4]++; // number of RoIs with thresh.
m_padStep2[l][j][4]++; // number of CMs with thresh.
}//end-of-if( m && m_hitInOuterPlane
}//end-of-if(m_padIn
}//end-of-for(l
......@@ -286,8 +290,7 @@ for(l=0; l<m_nBunMax; l++) { //loop on Bunches
}
if(m_padStep2[l][1][5]) m_padOut[l][3] = 1; // ovl phi
if(m_padStep2[l][0][5]) m_padOut[l][4] = 1; // ovl eta
m_padOut[l][5] = m_padStep2[l][0][7]; // roi ambiguity
if(m_padStep2[l][0][7]+m_padStep2[l][1][7]>2) m_padOut[l][5] = 1; // roi ambiguity
}//end-of-if
}//end-of-for(l
}//end-of-Pad::makeOutEtaAndPhi()
......
......@@ -388,6 +388,7 @@ CMAword SectorLogic::output(ubit16 i){
bc = i+8-BCZERO;
}
if (m_OutFromSectorLogic[i].pt1==0) m_OutFromSectorLogic[i].pt1=7;
if (m_OutFromSectorLogic[i].pt2==0) m_OutFromSectorLogic[i].pt2=7;
......@@ -403,8 +404,8 @@ CMAword SectorLogic::output(ubit16 i){
fmtout = fmtout | (( m_OutFromSectorLogic[i].ove2 & 0x01) << 18); // Eta overlap2
fmtout = fmtout | (( m_OutFromSectorLogic[i].pt1 & 0x07) << 19); // Pt1
fmtout = fmtout | (( m_OutFromSectorLogic[i].pt2 & 0x07) << 22); // Pt2
fmtout = fmtout | (( m_OutFromSectorLogic[i].ntrig1 & 0x01) << 25); // >1 candidate in ROI1
fmtout = fmtout | (( m_OutFromSectorLogic[i].ntrig2 & 0x01) << 26); // >1 candidate in ROI2
fmtout = fmtout | (( m_OutFromSectorLogic[i].r1 & 0x01) << 25); // >1 candidate in ROI1
fmtout = fmtout | (( m_OutFromSectorLogic[i].r2 & 0x01) << 26); // >1 candidate in ROI2
fmtout = fmtout | (( bc & 0x07) << 27); // BCID
fmtout = fmtout | (( m_OutFromSectorLogic[i].sign1 & 0x01) << 30); // Candidate1 sign
fmtout = fmtout | (( m_OutFromSectorLogic[i].sign2 & 0x01) << 31); // Candidate2 sign
......@@ -569,6 +570,7 @@ void SectorLogic::execute(){
m_SortHighest_out[ibx].out.ove1 = m_SortHighest_in[ibx].pad[pad_reg4].oveta;
m_SortHighest_out[ibx].out.ntrig1 = m_SortHighest_in[ibx].pad[pad_reg4].ntrig;
m_SortHighest_out[ibx].out.sign1 = m_SortHighest_in[ibx].pad[pad_reg4].sign;
m_SortHighest_out[ibx].out.r1 = m_SortHighest_in[ibx].pad[pad_reg4].r;
// set to 1 the number of valid tracks
m_SortHighest_out[ibx].out.ntrig = 1;
// and put the ouput internal register to 0
......@@ -609,6 +611,7 @@ void SectorLogic::execute(){
m_Sort2ndHighest_out[ibx].out.ove2 = m_Sort2ndHighest_in[ibx].pad[pad_reg5].oveta;
m_Sort2ndHighest_out[ibx].out.ntrig2 = m_Sort2ndHighest_in[ibx].pad[pad_reg5].ntrig;
m_Sort2ndHighest_out[ibx].out.sign2 = m_Sort2ndHighest_in[ibx].pad[pad_reg5].sign;
m_Sort2ndHighest_out[ibx].out.r2 = m_Sort2ndHighest_in[ibx].pad[pad_reg5].r;
// set to 2 the number of valid tracks
m_Sort2ndHighest_out[ibx].out.ntrig = 2;
// and put the ouput internal register to 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment