2 #include "sum_eemc_http.hh"
3 #include "DSMAlgo_EE101_2017.hh"
5 void DSMAlgo_EE101_2017::operator()(
DSM& dsm)
44 getEemcLowerHalfJetPatchSums(dsm,jpa,jpb,jpc);
46 int httpa = 0, httpb = 0, httpc = 0;
47 getEemcHTTP(dsm, httpa, httpb, httpc);
53 if(jpa > dsm.registers[2] || jpb > dsm.registers[2] || jpc > dsm.registers[2]){
55 }
else if(jpa > dsm.registers[1] || jpb > dsm.registers[1] || jpc > dsm.registers[1]){
57 }
else if(jpa > dsm.registers[0] || jpb > dsm.registers[0] || jpc > dsm.registers[0]){
64 int highTowerBits = 0;
66 for (
int ch = 0; ch < 6; ++ch)
67 highTowerBits |= dsm.channels[ch] >> 12 & 0x3;
71 int lowEtaSumA = dsm.channels[0] & 0x3f;
72 int lowEtaSumB = dsm.channels[3] & 0x3f;
73 int lowEtaSumC = dsm.channels[4] & 0x3f;
75 int maxA = (lowEtaSumA > lowEtaSumB) && !(lowEtaSumC > lowEtaSumA);
76 int maxB = (lowEtaSumB > lowEtaSumC) && !(lowEtaSumA > lowEtaSumB);
77 int maxC = (lowEtaSumC > lowEtaSumA) && !(lowEtaSumB > lowEtaSumC);
101 if (maxSum > 63) maxSum = 63;
119 out |= highTowerBits << 14;
125 dsm.info[3] = lowEtaSumA;
126 dsm.info[4] = lowEtaSumB;
127 dsm.info[5] = lowEtaSumC;
130 void DSMAlgo_EE101_2017::getEemcLowerHalfJetPatchSums(
const DSM& dsm,
int& jpa,
int& jpb,
int& jpc)
132 int lowEtaSumA = dsm.channels[0] & 0x3f;
133 int lowEtaSumB = dsm.channels[3] & 0x3f;
134 int lowEtaSumC = dsm.channels[4] & 0x3f;
136 int highEtaSumA = (dsm.channels[0] >> 6 & 0x3f) + (dsm.channels[1] & 0x3f);
137 int highEtaSumB = (dsm.channels[3] >> 6 & 0x3f) + (dsm.channels[2] & 0x3f);
138 int highEtaSumC = (dsm.channels[4] >> 6 & 0x3f) + (dsm.channels[5] & 0x3f);
140 jpa = lowEtaSumA + highEtaSumA;
141 jpb = lowEtaSumB + highEtaSumB;
142 jpc = lowEtaSumC + highEtaSumC;