36 sc =
detStore()->retrieve(l1ttonline_id,
"TTOnlineID");
46 sc =
detStore()->retrieve(l1ttoffline_id,
"CaloLVL1_ID");
60 return StatusCode::SUCCESS;
67 if(crate==0 || crate==2 || crate==4 || crate==6)
return 1;
68 else if(crate==1 || crate==3 || crate==5 || crate==7)
return 0;
74 if(crate==0 || crate==1 || crate==2 || crate==3)
return 0;
75 else if(crate==6 || crate ==7 )
return 1;
76 else if (crate==4 || crate ==5) {
78 if (module==5)
return 0;
88 }
else if ( ppm_type==7 && this->
side(
id)==1 ) {
91 int normalized_submodule_number = submodule%4;
94 if( normalized_submodule_number==1 || normalized_submodule_number ==2)
return 1;
100 if( channel==2 )
return 1;
102 else if ( channel==0 || channel ==1 )
return 0;
105 }
else if ( ppm_type==7 && this->
side(
id)==0 ) {
108 int normalized_submodule_number = submodule%4;
111 if( normalized_submodule_number==0 || normalized_submodule_number ==3)
return 1;
117 if( channel==0 )
return 1;
119 else if ( channel==2 || channel ==3 )
return 0;
122 }
else if ( ppm_type==8 && this->
side(
id)==1 ) {
125 if(channel==0)
return 1;
127 else if(channel==2)
return 2;
129 }
else if ( ppm_type==8 && this->
side(
id)==0 ) {
132 if(channel==2)
return 1;
134 else if(channel==0)
return 2;
136 }
else if ( ppm_type==9 ) {
147 if(crate==0 || crate==6 )
return (module-5)%4+1;
148 if(crate==1 || crate==7 )
return 4-(
module-5)%4;
149 if(crate==2 || crate==4 ) {
150 if(module==5 || module==13)
return 9;
151 else return (module-6)%4+5;
153 if(crate==3 || crate==5 ) {
154 if(module==5 || module==13)
return 9;
155 else return 8-(
module-5)%4;
164 int pos_neg = this->
side(
id);
173 if(ppm_type==7)
return 24;
175 int module_eta_offset = 0;
176 int submodule_eta_offset = 0;
177 int channel_eta_offset = 0;
179 module_eta_offset = (ppm_type-1)*4;
182 if( (submodule%4)==0 || (submodule%4)==3 ) submodule_eta_offset = 0;
183 else submodule_eta_offset = 2;
184 channel_eta_offset = channel/2;
186 if( (submodule%4)==0 || (submodule%4)==3 ) submodule_eta_offset = 2;
187 else submodule_eta_offset = 0;
188 channel_eta_offset = 1-channel/2;
190 return module_eta_offset + submodule_eta_offset + channel_eta_offset;
195 if(ppm_type==8)
return 2;
198 if(submodule%4==1 || submodule%4 ==2)
return 1;
201 if(submodule%4==0 || submodule%4 ==3)
return 1;
216 if(channel%4==0)
return 0;
217 else if(channel%4==1)
return 3;
218 else if(channel%4==2)
return 1;
219 else if(channel%4==3)
return 2;
238 if(channel%4==0)
return 0;
239 else if(channel%4==1)
return 3;
240 else if(channel%4==2)
return 1;
241 else if(channel%4==3)
return 2;
247 if(channel%4==0)
return 3;
248 else if(channel%4==1)
return 0;
249 else if(channel%4==2)
return 2;
250 else if(channel%4==3)
return 1;
269 if(channel%4==0)
return 3;
270 else if(channel%4==1)
return 0;
271 else if(channel%4==2)
return 2;
272 else if(channel%4==3)
return 1;
292 int module_phi_offset = 0;
293 int submodule_phi_offset = 0;
294 int channel_phi_offset = 0;
299 module_phi_offset = int((module-5)/4)*16;
300 submodule_phi_offset = int(submodule/2)*2;
301 channel_phi_offset = channel%2;
303 return module_phi_offset + submodule_phi_offset + channel_phi_offset;
308 module_phi_offset = int((module-5)/4)*8;
309 submodule_phi_offset = int(submodule/2)*1;
310 channel_phi_offset = 0;
312 }
else if(ppm_type==8) {
313 if(module==9) module_phi_offset = 0;
314 if(module==17) module_phi_offset = 16;
315 submodule_phi_offset = submodule;
316 channel_phi_offset = 0;
319 return module_phi_offset + submodule_phi_offset + channel_phi_offset;
323 if(module==9) module_phi_offset = 0;
324 if(module==17) module_phi_offset = 16;
325 submodule_phi_offset = submodule;
326 channel_phi_offset = 0;
328 return module_phi_offset + submodule_phi_offset + channel_phi_offset;
332 module_phi_offset = 0;
333 submodule_phi_offset = submodule;
334 channel_phi_offset = 0;
336 return module_phi_offset + submodule_phi_offset + channel_phi_offset;
347 if(channel%4== 0 || channel%4==3)
return 0;
348 else if(channel%4== 2 || channel%4==1)
return 1;
356 if(crate==0 || crate==1 || crate==6 || crate==7)
return 0;
357 else if(crate==2 || crate==3)
return 1;
358 else if(crate==4 || crate==5) {
360 if(ppm_type == 9)
return 2;
361 else if (ppm_type>=5 && ppm_type<=8)
return 1;
371 if(module>=5 && module<=20)
return 1;
374 }
else if(crate==1) {
375 if(module>=5 && module<=20)
return 1;
378 }
else if(crate==2) {
379 if( (module>=6 && module<=20) && module!=13)
return 1;
382 }
else if(crate==3) {
383 if( (module>=6 && module<=20) && module!=13)
return 1;
386 }
else if(crate==4) {
387 if(module>=5 && module<=20)
return 1;
390 }
else if(crate==5) {
391 if(module>=5 && module<=20)
return 1;
394 }
else if(crate==6) {
395 if(module>=5 && module<=20)
return 1;
398 }
else if(crate==7) {
399 if(module>=5 && module<=20)
return 1;
402 }
else if(crate==8) {
403 if(module>=5 && module<=18)
return 2;
406 }
else if(crate==9) {
407 if(module>=5 && module<=18)
return 2;
410 }
else if(crate==10) {
411 if(module>=5 && module<=18)
return 2;
414 }
else if(crate==11) {
415 if(module>=5 && module<=18)
return 2;
418 }
else if(crate==12) {
419 if(module>=4 && module<=19)
return 3;
422 }
else if(crate==13) {
423 if(module>=4 && module<=19)
return 3;
434 double gran[4] = {0.1, 0.2, 0.1, 0.425};
435 double offset[4] = {0., 2.5, 3.1, 3.2};
452 double phi = (iphi+0.5)*2.*
M_PI/(phiMax+1.);
458 double tower_eta = this->
IDeta(towerId);
459 double tower_phi = this->
IDphi(towerId);
461 unsigned int key = towerKey.
ttKey(tower_phi,tower_eta);
462 double tt_phi = towerKey.
phi();
463 double tt_eta = towerKey.
eta();
469 std::map<unsigned int, LVL1::InternalTriggerTower*>::iterator it = pIntTTContainer->find( key );
471 if (it == pIntTTContainer->end()){
475 pIntTTContainer->insert(std::map<unsigned int, LVL1::InternalTriggerTower*>::value_type(key,TT));
484 double abseta = fabs(
eta);
500 double abseta = fabs(
eta);
516 return (
eta>=0) ? +1 : -1;
522 double abseta = fabs(
eta);
525 etacenter = (int) floor(abseta/deta);
541 int phicenter = (int) floor(
phi/dphi);
547 double abseta = fabs(
eta);
const ServiceHandle< StoreGateSvc > & detStore() const
Helper class for offline TT identifiers.
A version of the TriggerTower that contains information that would not be availiable during datatakin...
virtual double eta() const
returns the centre of the TT at eta_coord:
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
Helper class for Calo TT online identifiers.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...