30 declareInterface<IL1JetElementTools>(
this);
45 return StatusCode::SUCCESS;
52 return StatusCode::SUCCESS;
65 std::map< int, std::vector<const xAOD::TriggerTower*> > Sums;
73 int key = testKey.
jeKey((*it)->phi(),(*it)->eta());
75 std::map< int, std::vector<const xAOD::TriggerTower*> >
::iterator mapIt=Sums.find(
key);
76 if (mapIt != Sums.end()) {
78 (mapIt->second).push_back((*
it));
82 std::vector<const xAOD::TriggerTower*>
vec;
84 Sums.insert(std::map<
int, std::vector<const xAOD::TriggerTower*> >::
value_type(
key,
vec));
96 for (std::map<
int, std::vector<const xAOD::TriggerTower*> >::
iterator mapIt = Sums.begin();
97 mapIt != Sums.end(); ++mapIt) {
101 if (
it != (mapIt->second).end()) {
103 unsigned int key = testKey.
jeKey((*it)->phi(),(*it)->eta());
104 float phi = testKey.
phi();
105 float eta = testKey.
eta();
109 std::vector<uint16_t> emET(1);
110 std::vector<uint16_t> hadET(1);
114 for (;
it != (mapIt->second).
end(); ++
it) {
115 int layer = (*it)->layer();
116 int et = (*it)->jepET();
122 std::vector<uint32_t> Dummy(emET.size());
125 jetElement->
initialize(eta, phi,
key, emET, hadET, Dummy, Dummy, Dummy, peak);
144 it != jetElements->
end(); ++
it) {
146 int key = (*it)->key();
147 map->insert(std::make_pair(
key,(*
it)));
157 jetElements->
clear();
163 std::map< int, TriggerTowerVector_t> Sums;
171 int key = testKey.
jeKey((*it)->phi(),(*it)->eta());
174 if (mapIt != Sums.end()) {
176 (mapIt->second).push_back((*
it));
181 vec.push_back((*
it));
182 Sums.insert(std::map< int, TriggerTowerVector_t >::value_type(
key,
vec));
195 mapIt != Sums.end(); ++mapIt) {
199 if (
it != (mapIt->second).end()) {
201 unsigned int key = testKey.
jeKey((*it)->phi(),(*it)->eta());
202 double phi = testKey.
phi();
203 double eta = testKey.
eta();
205 int emPeak = (*it)->emPeak();
206 int hadPeak = (*it)->hadPeak();
208 std::vector<int> emET;
209 std::vector<int> hadET;
212 for (;
it != (mapIt->second).
end(); ++
it) {
213 std::vector<int> tempEM = (*it)->emLUT();
214 if (tempEM.size() > emET.size()) emET.resize(tempEM.size(),0);
215 for (
size_t iem = 0; iem < tempEM.size(); ++iem)
217 std::vector<int> tempHad = (*it)->hadLUT();
218 if (tempHad.size() > hadET.size()) hadET.resize(tempHad.size(),0);
219 for (
size_t ihd = 0; ihd < tempHad.size(); ++ihd)
224 if (emET.size() == hadET.size() && emPeak == hadPeak) {
225 std::vector<int> Dummy(emET.size());
232 std::vector<int> emSums;
233 std::vector<int> hadSums;
234 int Peak = (emPeak < hadPeak ? emPeak : hadPeak);
235 int Tail = (emET.size() - emPeak < hadET.size() - hadPeak ?
236 emET.size() - emPeak : hadET.size() - hadPeak) - 1;
237 for (
int j = emPeak - Peak; j <= emPeak + Tail; ++j) emSums.push_back(emET[j]);
238 for (
int j = hadPeak - Peak; j <= hadPeak + Tail; ++j) hadSums.push_back(hadET[j]);
240 std::vector<int> Dummy(emSums.size());