59 double de =
get.dEta()/4.;
63 m_refEta = refCoord.
eta();
64 m_refPhi = refCoord.
phi();
67 setRoICoord(m_refEta, m_refPhi);
70 int minEtaOffset = -1;
73 startCoord =
get.downPhi(m_refPhi,m_refEta);
76 double tempEta = startCoord.
eta();
77 double startPhi = startCoord.
phi();
96 std::vector<int> et6x6(4);
97 std::vector<int> cores(9);
98 for (
int etaOffset=minEtaOffset; etaOffset<=2 ; etaOffset++){
100 for (
int phiOffset=-1; phiOffset<=2 ; phiOffset++){
101 int tempKey =
get.jeKey(tempCoord);
102 std::map<int, JetInput*>::const_iterator ji = jiContainer->find(tempKey);
103 if (ji != jiContainer->end() ){
105 int ET = (ji->second)->
energy();
109 if (phiOffset > -1) {
110 if (etaOffset < 2) et6x6[1] += ET;
111 if (etaOffset > -1) et6x6[2] += ET;
114 if (etaOffset < 2) et6x6[0] += ET;
115 if (etaOffset > -1) et6x6[3] += ET;
119 if (etaOffset >= 0) {
120 if (phiOffset >= 0) cores[phiOffset+3*etaOffset] += ET;
121 if (phiOffset < 2) cores[phiOffset+3*etaOffset+1] += ET;
124 if (phiOffset >= 0) cores[phiOffset+3*etaOffset+3] += ET;
125 if (phiOffset < 2) cores[phiOffset+3*etaOffset+4] += ET;
128 tempCoord =
get.upPhi(tempCoord);
130 tempCoord =
get.rightEta(tempCoord);
131 tempEta = tempCoord.
eta();
139 for (
int i = 0;
i < 4;
i++)
if (et6x6[
i] > m_ET6x6) m_ET6x6 = et6x6[
i];
161 double lowerEta = lowerLeft.
eta() - ( keyLL.
dEta()/2. );
162 double lowerPhi = lowerLeft.
phi() - ( keyLL.
dPhi()/2. );
166 if (keyLL.
isFCAL(lowerLeft.
eta()) && eta > 0) {
168 upperRight = keyLL.
upPhi(phi, eta);
176 JetInputKey keyUR(upperRight);
177 double upperEta = upperRight.
eta() + ( keyUR.dEta()/2. );
178 double upperPhi = upperRight.
phi() + ( keyUR.dPhi()/2. );
182 CoordinateRange roi(lowerPhi,upperPhi,lowerEta,upperEta);
201 for (
int i = 0;
i < 4;
i++)
if (cores[4] < cores[
i]) m_EtMax =
false;
202 for (
int i = 5;
i < 9;
i++)
if (cores[4] <= cores[
i]) m_EtMax =
false;
214 if (!m_EtMax)
return;
217 unsigned int sizeSmall{4};
218 unsigned int sizeLarge{8};
224 float scale = m_l1menu->thrExtraInfo().JET().jetScale();
225 threshSmall = m_l1menu->thrExtraInfo().JET().ptMinToTopoSmallWindowCounts()*
scale;
226 threshLarge = m_l1menu->thrExtraInfo().JET().ptMinToTopoLargeWindowCounts()*
scale;
228 int etLarge = m_ET8x8;
229 if (sizeLarge == 6) etLarge = m_ET6x6;
230 else if (sizeLarge == 4) etLarge = m_ET4x4;
232 int etSmall = m_ET4x4;
233 if (sizeSmall == 6) etLarge = m_ET6x6;
234 else if (sizeSmall == 8) etLarge = m_ET8x8;
236 if (etLarge <= threshLarge && etSmall <= threshSmall)
return;
252 return ( (m_ET4x4 < m_satLarge) ? m_ET4x4 : m_satLarge );
257 return ( (m_ET6x6 < m_satLarge) ? m_ET6x6 : m_satLarge );
262 return ( (m_ET8x8 < m_satLarge) ? m_ET8x8 : m_satLarge );
267 return ( (m_ETLarge < m_satLarge) ? m_ETLarge : m_satLarge );
272 return ( (m_ETSmall < m_satSmall) ? m_ETSmall : m_satSmall );
282 return ( m_EtMax && (m_ETLarge > 0 || m_ETSmall > 0) );
292 return ( (m_phi <=
M_PI) ? m_phi : m_phi - 2.*
M_PI);
309 int frame = (jemCoord>>2);
326 roi->
initialize(crate, jem, frame,
lc, ETLarge(), ETSmall());