27 declareInterface<IL1CPMTowerTools>(
this);
42 return StatusCode::SUCCESS;
49 return StatusCode::SUCCESS;
64 std::map< int, TriggerTowerVector_t > Sums;
70 for(
it = triggerTowers->
begin();
it != triggerTowers->
end(); ++
it ) {
72 if (fabs((*it)->eta()) > 2.5)
continue;
75 int key = testKey.
ttKey((*it)->phi(),(*it)->eta());
78 if (mapIt != Sums.end()) {
80 (mapIt->second).push_back((*
it));
86 Sums.insert(std::map< int, TriggerTowerVector_t >::value_type(
key,
vec));
99 mapIt != Sums.end(); ++mapIt) {
103 if (
it != (mapIt->second).end()) {
105 double phi = (*it)->phi();
106 double eta = (*it)->eta();
108 std::vector<int> emET;
109 std::vector<int> hadET;
110 std::vector<int> emError;
111 std::vector<int> hadError;
115 for (;
it != (mapIt->second).
end(); ++
it) {
117 Peak = (*it)->emPeak();
118 emET = (*it)->emLUT();
119 hadET = (*it)->hadLUT();
120 emError.assign(emET.size(),(*it)->emError());
121 hadError.assign(hadET.size(),(*it)->hadError());
128 if (!zeroSuppress || emET[Peak] > 0 || hadET[Peak] > 0) {
129 CPMTower* cpmTower =
new CPMTower(phi, eta, emET, emError, hadET, hadError, Peak);
152 std::map< int, xAODTriggerTowerVector_t > Sums;
158 for(
it = triggerTowers->
begin();
it != triggerTowers->
end(); ++
it ) {
160 if (fabs((*it)->eta()) > 2.5)
continue;
163 int key = testKey.
ttKey((*it)->phi(),(*it)->eta());
166 if (mapIt != Sums.end()) {
168 (mapIt->second).push_back((*
it));
173 vec.push_back((*
it));
174 Sums.insert(std::map< int, xAODTriggerTowerVector_t >::value_type(
key,
vec));
187 mapIt != Sums.end(); ++mapIt) {
191 std::vector<int> emET(1);
192 std::vector<int> hadET(1);
193 std::vector<int> emError(1);
194 std::vector<int> hadError(1);
200 if (
it != (mapIt->second).end()) {
202 double phi = (*it)->phi();
203 double eta = (*it)->eta();
205 for (;
it != (mapIt->second).
end(); ++
it) {
208 if ((*it)->layer() == 0) {
209 emET[Peak] = (*it)->cpET();
210 emError[Peak] = (*it)->errorWord();
213 hadET[Peak] = (*it)->cpET();
214 hadError[Peak] = (*it)->errorWord();
220 if (!zeroSuppress || emET[Peak] > 0 || hadET[Peak] > 0) {
221 CPMTower* cpmTower =
new CPMTower(phi, eta, emET, emError, hadET, hadError, Peak);
245 std::map< int, xAODTriggerTowerVector_t > Sums;
251 for(
it = triggerTowers->
begin();
it != triggerTowers->
end(); ++
it ) {
253 if (fabs((*it)->eta()) > 2.5)
continue;
256 int key = testKey.
ttKey((*it)->phi(),(*it)->eta());
259 if (mapIt != Sums.end()) {
261 (mapIt->second).push_back((*
it));
266 vec.push_back((*
it));
267 Sums.insert(std::map< int, xAODTriggerTowerVector_t >::value_type(
key,
vec));
280 mapIt != Sums.end(); ++mapIt) {
284 std::vector<uint8_t> emET(1);
285 std::vector<uint8_t> hadET(1);
286 std::vector<uint32_t> emError(1);
287 std::vector<uint32_t> hadError(1);
293 if (
it != (mapIt->second).end()) {
295 double phi = (*it)->phi();
296 double eta = (*it)->eta();
298 for (;
it != (mapIt->second).
end(); ++
it) {
301 if ((*it)->layer() == 0) {
302 emET[Peak] =
int((*it)->cpET());
303 emError[Peak] = (*it)->errorWord();
306 hadET[Peak] =
int((*it)->cpET());
307 hadError[Peak] = (*it)->errorWord();
313 if (!zeroSuppress || emET[Peak] > 0 || hadET[Peak] > 0) {
316 cpmTower->
initialize(eta, phi, emET, hadET, emError, hadError, Peak);