ATLAS Offline Software
LArHEC_Base_ID.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
15 #include "IdDict/IdDictDefs.h"
16 #include "LArHEC_region.h"
17 #include "CxxUtils/StrFormat.h"
18 #include "CxxUtils/trapping_fp.h"
19 
20 #include "GaudiKernel/MsgStream.h"
21 
22 #include <cmath>
23 #include <iostream>
24 #include <set>
25 #include <string>
26 
28 
29 
30 LArHEC_Base_ID::LArHEC_Base_ID (const std::string& name, bool supercell) :
32  , m_slar (supercell ? 1 : 0)
33  , m_hec_region_index(0)
34  , m_LAR_INDEX(999)
35  , m_HEC_INDEX(999)
36  , m_POSNEG_INDEX(999)
37  , m_SAMPLING_INDEX(999)
38  , m_REGION_INDEX(999)
39  , m_ETA_INDEX(999)
40  , m_PHI_INDEX(999)
41  , m_SLAR_INDEX(999)
42  , m_two_sym_sides(1)
43 {
44 }
45 
47 {
50  for (; first != last; ++first) delete (*first);
51 }
52 
53 Identifier LArHEC_Base_ID::channel_id ( int pos_neg, int sampling,
54  int eta, int phi ) const
55 {
56  // must calculate region number and shift eta
57  int region=999;
58  if ( 0 <= eta && eta < 10 ) { region = 0;}
59  else if ( 10 <= eta && eta < 14 ) { region = 1; eta -= 10;}
60 
61  return (channel_id (pos_neg, sampling, region, eta, phi));
62 }
63 
64 
65 Identifier LArHEC_Base_ID::channel_id ( int pos_neg, int sampling, int sector, int region,
66  int eta, int phi_sector ) const
67 {
68  int phi = ( region == 0 ? sector*2 + phi_sector : sector );
69  return (channel_id (pos_neg, sampling, region, eta, phi ));
70 }
71 
72 int LArHEC_Base_ID::eta_min(const Identifier regId) const
73 {
74  ExpandedIdentifier expId;
75  IdContext region_cntxt = region_context();
76  if(!get_expanded_id(regId, expId, &region_cntxt)) {
77  int result = -999;
78  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
80  if (range.match(expId)) {
81  const Range::field& eta_field = range[m_ETA_INDEX];
82  if (not eta_field.empty()) {
83  int etamin = eta_field.get_minimum();
84  if (-999 == result) {
85  result = etamin;
86  }
87  else {
88  if (etamin < result) result = etamin;
89  }
90  }
91  }
92  }
93  return (result);
94  }
95  return (-999);
96 }
97 
98 int LArHEC_Base_ID::eta_max(const Identifier regId) const
99 {
100  ExpandedIdentifier expId;
101  IdContext region_cntxt = region_context();
102  if(!get_expanded_id(regId, expId, &region_cntxt)) {
103  int result = -999;
104  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
105  const Range& range = m_full_channel_range[i];
106  if (range.match(expId)) {
107  const Range::field& eta_field = range[m_ETA_INDEX];
108  if (not eta_field.empty()) {
109  int etamax = eta_field.get_maximum();
110  if (result < etamax) result = etamax;
111  }
112  }
113  }
114  return (result);
115  }
116  return (-999); // default
117 }
118 
120 {
121  ExpandedIdentifier expId;
122  IdContext region_cntxt = region_context();
123  if(!get_expanded_id(regId, expId, &region_cntxt)) {
124  int result = -999;
125  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
126  const Range& range = m_full_channel_range[i];
127  if (range.match(expId)) {
128  const Range::field& phi_field = range[m_PHI_INDEX];
129  if (not phi_field.empty()) {
130  int phimin = phi_field.get_minimum();
131  if (-999 == result) {
132  result = phimin;
133  }
134  else {
135  if (phimin < result) result = phimin;
136  }
137  }
138  }
139  }
140  return (result);
141  }
142  return (-999); // default
143 }
144 
145 int LArHEC_Base_ID::phi_max(const Identifier regId) const
146 {
147  ExpandedIdentifier expId;
148  IdContext region_cntxt = region_context();
149  if(!get_expanded_id(regId, expId, &region_cntxt)) {
150  int result = -999;
151  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
152  const Range& range = m_full_channel_range[i];
153  if (range.match(expId)) {
154  const Range::field& phi_field = range[m_PHI_INDEX];
155  if (not phi_field.empty()) {
156  int phimax = phi_field.get_maximum();
157  if (result < phimax) result = phimax;
158  }
159  }
160  }
161  return (result);
162  }
163  return (-999); // default
164 }
165 
167  const std::string& group_name)
168 /*===================================================================*/
169 {
170  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
171 
172  std::string strg = "initialize_base_from_dictionary";
173  log << MSG::DEBUG << strg << endmsg;
174 
175  // Check whether this helper should be reinitialized
176  if (!reinitialize(dict_mgr)) {
177  log << MSG::DEBUG << "Request to reinitialize not satisfied - tags have not changed" << endmsg;
178  return (0);
179  }
180  else {
181  if(m_msgSvc)log << MSG::DEBUG << "(Re)initialize" << endmsg;
182  }
183 
184  // init base object
186  "LArCalorimeter"))
187  return (1);
188 
189  // initialize dictionary version
190  AtlasDetectorID::setDictVersion(dict_mgr, "LArCalorimeter");
191 
192  // Initialize the field indices
194  strg = " initialize_base_from_dict - cannot initialize HEC part of LArCalorimeter dictionary ";
195  if(m_msgSvc) {
196  log << MSG::WARNING << strg << endmsg;
197  }
198  else {
199  std::cout << strg << std::endl;
200  }
201  // return (1); // to allow TB dictionary (no HEC in H8)
202  }
203  else {
204  // Find value for the field LAr Calorimeter
205  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary ("ATLAS");
206  int larField = -1;
207  if (atlasDict->get_label_value("subdet", "LArCalorimeter", larField)) {
208  std::stringstream strm ;
209  strm << atlasDict->m_name ;
210  strg = "Could not get value for label 'LArCalorimeter' of field 'subdet' in dictionary "
211  + strm.str();
212  if(m_msgSvc) {
213  log << MSG::ERROR << strg << endmsg;
214  }
215  else {
216  std::cout << strg << std::endl;
217  }
218  return (1);
219  }
220 
221  // Find value for the field LArHEC
222  int larHecField = -1;
223  if (dict()->get_label_value("part", "LArHEC", larHecField)) {
224  std::stringstream strm ;
225  strm << atlasDict->m_name ;
226  strg = "Could not get value for label 'LArHEC' of field 'part' in dictionary "
227  + strm.str();
228  if(m_msgSvc) {
229  log << MSG::ERROR << strg << endmsg;
230  }
231  else {
232  std::cout << strg << std::endl;
233  }
234  return (1);
235  }
236 
237  // Set up id for region and range prefix
238  ExpandedIdentifier exp_region_id;
239  exp_region_id.add(larField);
240  exp_region_id.add(larHecField);
241  Range prefix;
243  m_full_region_range = dict()->build_multirange(exp_region_id, group_name, prefix, "region");
244 
245  if (!m_quiet) {
246  std::string strg0 = "initialize_from_dict : " ;
247  std::string strg1 = " channel range -> " + (std::string)m_full_channel_range;
248  std::string strg2 = " region range -> " + (std::string)m_full_region_range;
249  if(m_msgSvc) {
250  log << MSG::DEBUG << strg0 << endmsg;
251  log << MSG::DEBUG << strg1 << endmsg;
252  log << MSG::DEBUG << strg2 << endmsg;
253  }
254  else {
255  std::cout << strg0 << std::endl;
256  std::cout << strg1 << std::endl;
257  std::cout << strg2 << std::endl;
258  }
259  }
260 
261 
262  // initilize m_two_sym_sides
263  m_two_sym_sides = ( dictionaryVersion() == "fullAtlas" );
264 
265  // Setup the hash tables
266  if(init_hashes()) return (1);
267 
268  // initialize dictionary regions
269  if (fill_vec_of_dict_regions (group_name)) return 1;
270 
271  m_vecOfPhiMin.resize(region_hash_max());
272  for (unsigned int i = 0; i < region_hash_max(); ++i) {
273  Identifier regId = region_id(i);
274  m_vecOfPhiMin[i] = phi_min_init(regId);
275  }
276 
277  // Setup for hash calculation
278  // The regions have uniform eta/phi granularity.
279  // The lookup table only needs to contain the
280  // hash offset for each region, the first eta index
281  // and the number of phi cells.
282 
283  // The implementation requires:
284 
285  // 1) a lookup table for each region containing hash offset,
286  // etamin and nphi
287  // 2) a decoder to access the "index" corresponding to the
288  // pn/samp/reg fields. These fields use 4 bits, so the
289  // vector has a length of 16 for 16 regions.
290 
291  // Create decoder for fields pn to region
293  m_pn_impl.bits() +
297  m_pn_reg_impl.set_bits(bits, bits_offset);
298 
299  // std::cout << "pn_reg " << m_pn_reg_impl.decode_index() << " "
300  // << (std::string)m_pn_reg_impl.ored_field() << " "
301  // << std::hex << m_pn_reg_impl.mask() << " "
302  // << m_pn_reg_impl.zeroing_mask() << " "
303  // << std::dec << m_pn_reg_impl.shift()
304  // << " " << m_pn_reg_impl.bits() << " " <<m_pn_reg_impl.bits_offset()
305  // << std::endl;
306 
307 
308  // Set up vector as lookup table for hash calculation.
309  m_hash_calcs.resize(16);
310 
311  for (unsigned int i = 0; i < region_hash_max(); ++i) {
312 
313  Identifier regId = region_id(i) ;
314  HashCalc hc;
315 
316  int etamin = eta_min(regId);
317  if(etamin < 0) {
318  etamin = 0;
319  std::string strg = "setting etamin to 0 because actual value not found for regId "
320  + show_to_string(regId);
321  if(m_msgSvc) {
322  log << MSG::WARNING << strg << endmsg;
323  }
324  else {
325  std::cout << strg << std::endl;
326  }
327  }
328  int phimin = phi_min(regId);
329  if(phimin < 0) {
330  phimin = 0;
331  std::string strg = "setting phimin to 0 because actual value not found for regId "
332  + show_to_string(regId);
333  if(m_msgSvc) {
334  log << MSG::WARNING << strg << endmsg;
335  }
336  else {
337  std::cout << strg << std::endl;
338  }
339  }
340  Identifier min = channel_id ( regId, etamin, phimin);
342  hc.m_hash = min_hash;
343  hc.m_etamin = etamin;
344  hc.m_phimin = phimin;
345  hc.m_nphi = phi_max(min)-phimin+1 ;
347 
348  if (m_pn_reg_impl.unpack(min) > 15) {
349  std::stringstream strm ;
350  strm << i;
351  strm << m_pn_reg_impl.unpack(min);
352  std::string strg = "min > 15 "
353  + strm.str() + show_to_string(min) ;
354  if(m_msgSvc) {
355  log << MSG::ERROR << strg << endmsg;
356  }
357  else {
358  std::cout << strg << std::endl;
359  }
360  }
361  }
362 
363  // Check hash calculation
364  for (unsigned int i = 0; i < channel_hash_max(); ++i) {
365  Identifier id = channel_id(i);
366  if (channel_hash(id) != i) {
367  std::stringstream strm ;
368  strm << channel_hash(id);
369  strm << i;
370  std::string strg = "channel ranges, id, hash, i = "
371  + show_to_string(id) + strm.str();
372  if(m_msgSvc) {
373  log << MSG::ERROR << strg << endmsg;
374  }
375  else {
376  std::cout << strg << std::endl;
377  }
378  }
379  }
380  }
381 
382  // Setup hash tables for finding neighbors
383  if(m_do_neighbours) {
384  if(init_neighbors()) return (1);
385  }
386 
387  return 0;
388 }
389 
390 
391 
392 void LArHEC_Base_ID::region_id_checks ( int pos_neg, int sampling, int region ) const
393 {
394 
395  // Check that id is within allowed range
396  // Fill expanded id (initially with 4/2/0/0/0/0/0)
398  expId << pos_neg << sampling << region ;
399 
400  if (!m_full_region_range.match(expId)) {
401  std::string errorMessage = "LArHEC_Base_ID::region_id() result is not OK: ID, range = "
402  + std::string(expId) + " , " + (std::string)m_full_region_range;
403  throw LArID_Exception(errorMessage , 7);
404  }
405 
406 }
407 
408 void LArHEC_Base_ID::channel_id_checks ( int pos_neg, int sampling, int region,
409  int eta, int phi ) const
410 {
411 
412  // Check that id is within allowed range
413  // Fill expanded id
415  expId << pos_neg << sampling << region << eta << phi << m_slar ;
416 
417  if (!m_full_channel_range.match(expId)) {
418  std::string errorMessage = "LArHEC_Base_ID::channel_id() result is not OK: ID, range = "
419  + std::string(expId) + " , " + (std::string)m_full_channel_range;
420  throw LArID_Exception(errorMessage , 8);
421  }
422 }
423 
425  int eta, int phi ) const
426 {
427 
428  // Check that id is within allowed range
429  // Fill expanded id
430  ExpandedIdentifier expId;
431 
432  IdContext context = region_context();
433  if (get_expanded_id(regionId, expId, &context)) {
434  std::string errorMessage = "LArHEC_Base_ID::channel_id(regId) result is not OK: ID = "
435  + show_to_string(regionId) ;
436  throw LArID_Exception(errorMessage , 8);
437  }
438 
439  expId << eta << phi << m_slar;
440 
441  if (!m_full_channel_range.match(expId)) {
442  std::string errorMessage = "LArHEC_Base_ID::channel_id(regId) result is not OK: ID, range = "
443  + std::string(expId) + " , " + (std::string)m_full_channel_range;
444  throw LArID_Exception(errorMessage , 8);
445  }
446 }
447 
448 int LArHEC_Base_ID::get_expanded_id (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const
449 {
450  // We assume that the context is >= region
451  exp_id.clear();
452  exp_id << lar_field_value()
454  << pos_neg(id)
455  << sampling(id)
456  << region(id);
457  if(context && context->end_index() >= m_ETA_INDEX) {
458  exp_id << eta(id);
459  if(context->end_index() >= m_PHI_INDEX) {
460  exp_id << phi(id);
461  if ( context->end_index() >= m_SLAR_INDEX) {
462  exp_id << (unsigned)is_supercell(id);
463  }
464  }
465  }
466  return (0);
467 }
468 
469 int LArHEC_Base_ID::initLevelsFromDict (const std::string& /*group_name*/)
470 {
471  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
472 
473  if(!dict()) {
474  std::string strg = "initLevelsFromDict - dictionary NOT initialized ";
475  if(m_msgSvc) {
476  log << MSG::ERROR << strg << endmsg;
477  }
478  else {
479  std::cout << strg << std::endl;
480  }
481  return (1);
482  }
483 
484  // Find out which identifier field corresponds to each level.
485 
486  m_LAR_INDEX = 999 ;
487  m_HEC_INDEX = 999 ;
488  m_POSNEG_INDEX = 999 ;
489  m_SAMPLING_INDEX = 999 ;
490  m_REGION_INDEX = 999 ;
491  m_ETA_INDEX = 999 ;
492  m_PHI_INDEX = 999 ;
493  m_SLAR_INDEX = 999 ;
494 
495  // Save index to a HEC region for unpacking
497  if (dict()->find_region(expId,m_hec_region_index)){
498  std::stringstream strm ;
499  strm << m_hec_region_index ;
500  std::string strg = "initLevelsFromDict - unable to find hec region index: id, reg "
501  + (std::string)expId + strm.str();
502  if(m_msgSvc) {
503  log << MSG::ERROR << strg << endmsg;
504  }
505  else {
506  std::cout << strg << std::endl;
507  }
508  return (1);
509  }
510 
511  IdDictField* field = dict()->find_field("subdet") ;
512  if (field) {
513  m_LAR_INDEX = field->m_index ;
514  }
515  else {
516  std::string strg = "initLevelsFromDict - unable to find 'subdet' field ";
517  if(m_msgSvc) {
518  log << MSG::ERROR << strg << endmsg;
519  }
520  else {
521  std::cout << strg << std::endl;
522  }
523  return (1);
524  }
525 
526  field = dict()->find_field("part") ;
527  if (field) {
528  m_HEC_INDEX = field->m_index ;
529  }
530  else {
531  std::string strg = "initLevelsFromDict - unable to find 'part' field ";
532  if(m_msgSvc) {
533  log << MSG::ERROR << strg << endmsg;
534  }
535  else {
536  std::cout << strg << std::endl;
537  }
538  return (1);
539  }
540 
541  field = dict()->find_field("barrel-endcap") ;
542  if (field) {
543  m_POSNEG_INDEX = field->m_index ;
544  }
545  else {
546  std::string strg = "initLevelsFromDict - unable to find 'barrel-endcap' field ";
547  if(m_msgSvc) {
548  log << MSG::ERROR << strg << endmsg;
549  }
550  else {
551  std::cout << strg << std::endl;
552  }
553  return (1);
554  }
555 
556  field = dict()->find_field("sampling") ;
557  if (field) {
558  m_SAMPLING_INDEX = field->m_index ;
559  }
560  else {
561  std::string strg = "initLevelsFromDict - unable to find 'sampling' field ";
562  if(m_msgSvc) {
563  log << MSG::ERROR << strg << endmsg;
564  }
565  else {
566  std::cout << strg << std::endl;
567  }
568  return (1);
569  }
570 
571  field = dict()->find_field("region") ;
572  if (field) {
573  m_REGION_INDEX = field->m_index ;
574  }
575  else {
576  std::string strg = "initLevelsFromDict - unable to find 'region' field ";
577  if(m_msgSvc) {
578  log << MSG::ERROR << strg << endmsg;
579  }
580  else {
581  std::cout << strg << std::endl;
582  }
583  return (1);
584  }
585 
586  field = dict()->find_field("eta") ;
587  if (field) {
588  m_ETA_INDEX = field->m_index ;
589  }
590  else {
591  std::string strg = "initLevelsFromDict - unable to find 'eta' field ";
592  if(m_msgSvc) {
593  log << MSG::ERROR << strg << endmsg;
594  }
595  else {
596  std::cout << strg << std::endl;
597  }
598  return (1);
599  }
600 
601  field = dict()->find_field("phi") ;
602  if (field) {
603  m_PHI_INDEX = field->m_index ;
604  }
605  else {
606  std::string strg = "initLevelsFromDict - unable to find 'phi' field ";
607  if(m_msgSvc) {
608  log << MSG::ERROR << strg << endmsg;
609  }
610  else {
611  std::cout << strg << std::endl;
612  }
613  return (1);
614  }
615 
616  field = dict()->find_field("is-slar-hec") ;
617  if (field) {
618  m_SLAR_INDEX = field->m_index ;
619  }
620  else {
621  if(m_msgSvc) {
622  log << MSG::ERROR << "initLevelsFromDict - unable to find 'is-slar-hec' field "
623  << endmsg;
624  }
625  else {
626  std::cout << "LArEM_Base_ID::initLevelsFromDict - unable to find 'is-slar-hec' field "
627  << std::endl ;
628  }
629  return (1);
630  }
631 
632 
633  // Set the field implementations
634 
636 
637  /*
638  std::cout << "LArHEC_Base_ID::initLevelsFromDict - found levels " << std::endl ;
639  std::cout << "lar " << m_LAR_INDEX << std::endl ;
640  std::cout << "part " << m_HEC_INDEX << std::endl ;
641  std::cout << "pos-neg " << m_POSNEG_INDEX << std::endl ;
642  std::cout << "sampling " << m_SAMPLING_INDEX << std::endl ;
643  std::cout << "region " << m_REGION_INDEX << std::endl ;
644  std::cout << "eta " << m_ETA_INDEX << std::endl ;
645  std::cout << "phi " << m_PHI_INDEX << std::endl ;
646  std::cout << "slar " << m_SLAR_INDEX << std::endl ;
647  */
648 
649  m_lar_impl = region.m_implementation[m_LAR_INDEX];
650  m_hec_impl = region.m_implementation[m_HEC_INDEX];
651  m_pn_impl = region.m_implementation[m_POSNEG_INDEX];
652  m_sampling_impl = region.m_implementation[m_SAMPLING_INDEX];
653  m_region_impl = region.m_implementation[m_REGION_INDEX];
654  m_eta_impl = region.m_implementation[m_ETA_INDEX];
655  m_phi_impl = region.m_implementation[m_PHI_INDEX];
656  m_slar_impl = region.m_implementation[m_SLAR_INDEX];
657 
658 
659  if (!m_quiet) {
660  if(m_msgSvc) {
661  log << MSG::DEBUG << "decode index and bit fields for each level: " << endmsg;
662  log << MSG::DEBUG << "lar " << m_lar_impl.show_to_string() << endmsg;
663  log << MSG::DEBUG << "hec " << m_hec_impl.show_to_string() << endmsg;
664  log << MSG::DEBUG << "pn " << m_pn_impl.show_to_string() << endmsg;
665  log << MSG::DEBUG << "samp " << m_sampling_impl.show_to_string() << endmsg;
666  log << MSG::DEBUG << "reg " << m_region_impl.show_to_string() << endmsg;
667  log << MSG::DEBUG << "eta " << m_eta_impl.show_to_string() << endmsg;
668  log << MSG::DEBUG << "phi " << m_phi_impl.show_to_string() << endmsg;
669  log << MSG::DEBUG << "is-slar " << m_slar_impl.show_to_string() << endmsg;
670  }
671  else {
672  std::cout << "decode index and bit fields for each level: " << std::endl;
673  std::cout << "lar " << m_lar_impl.show_to_string() << std::endl;
674  std::cout << "hec " << m_hec_impl.show_to_string() << std::endl;
675  std::cout << "pn " << m_pn_impl.show_to_string() << std::endl;
676  std::cout << "samp " << m_sampling_impl.show_to_string() << std::endl;
677  std::cout << "reg " << m_region_impl.show_to_string() << std::endl;
678  std::cout << "eta " << m_eta_impl.show_to_string() << std::endl;
679  std::cout << "phi " << m_phi_impl.show_to_string() << std::endl;
680  std::cout << "is-slar " << m_slar_impl.show_to_string() << std::endl;
681  }
682  }
683 
684  return(0) ;
685 }
686 
688 {
689  if (channels().init (*this, "channels",
691  m_SLAR_INDEX))
692  return 1;
693  if (regions().init (*this, "regions",
696  return 1;
697 
698  return (0);
699 }
700 
701 int LArHEC_Base_ID::get_neighbours(const IdentifierHash id, const LArNeighbours::neighbourOption& option, std::vector<IdentifierHash>& neighbourList) const
702 {
703  int result = 1;
704 
705  neighbourList.clear();
706 
707  if(!m_do_neighbours) {
708  if(m_msgSvc) {
709  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
710  log << MSG::WARNING << "neighbours not initialized !!! returning empty list" << endmsg;
711  }
712  else {
713  std::cout << " LArHEC_Base_ID: neighbours not initialized !!! returning empty list " << std::endl;
714  }
715  return result;
716  }
717 
718  if(id>=channel_hash_max()) {
719  if(m_msgSvc) {
720  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
721  log << MSG::WARNING << "neighbours requested for non-existing channel -- id/max " << id << "/"
722  << channel_hash_max() << endmsg;
723  }
724  else {
725  std::cout << " neighbours requested for non-existing channel -- id/max " << id << "/"
726  << channel_hash_max() << std::endl;
727  }
728  return result;
729  }
730 
731  const short int maxNeighb=20;
732  IdentifierHash neighbList[maxNeighb];
733  int neighbourIndex = 0;
734 
735  // cell index
736  unsigned int index=id;
737 
738  //
739  // .... find in which region is the cell
740  //
741  short int regionN=m_vecOfCellInfo[index];
742  // get pointer to this region
743  LArHEC_region* hecRegion = m_vecOfRegions[regionN];
744  // retrieve characteristic numbers for this region
745  short int nPhi = hecRegion->phiN();
746  float gPhi = hecRegion->phiGranularity();
747  unsigned int minHash = hecRegion->hashMin();
748  unsigned int maxHash = hecRegion->hashMax();
749 
750  bool corners2DOnly = ( (option & LArNeighbours::all2D)
752  //
753  // .... previous neighbour in phi
754  //
755  IdentifierHash prevNeighbInPhi=NOT_VALID_HASH;
756  if( (option & LArNeighbours::prevInPhi)
757  || corners2DOnly ){
758  if(!get_prevInPhi(hecRegion, index, nPhi, minHash, neighbourIndex, neighbList)){
759  prevNeighbInPhi=neighbList[neighbourIndex-1];
760  if( corners2DOnly ){
761  neighbourIndex--;
762  }
763  }
764  }
765 
766  //
767  // ....next neighbour in phi
768  //
769  IdentifierHash nextNeighbInPhi=NOT_VALID_HASH;
770  if( (option & LArNeighbours::nextInPhi)
771  || corners2DOnly ){
772  if(!get_nextInPhi(hecRegion, index, nPhi, minHash, neighbourIndex, neighbList)){
773  nextNeighbInPhi=neighbList[neighbourIndex-1];
774  if( corners2DOnly ){
775  neighbourIndex--;
776  }
777  }
778  }
779 
780  //
781  // ....previous neighbours in eta
782  //
783  unsigned int nPrevBiggerCell=NOT_VALID_HASH;
784  if( (option & LArNeighbours::prevInEta) ){
785  get_prevInEta(hecRegion, index, nPhi, gPhi, minHash, neighbourIndex, neighbList, nPrevBiggerCell);
786  }
787 
788  //
789  // ....next neighbours in eta
790  //
791  unsigned int nNextBiggerCell=NOT_VALID_HASH;
792  if( (option & LArNeighbours::nextInEta) ){
793  get_nextInEta(hecRegion, index, nPhi, gPhi, maxHash, neighbourIndex, neighbList, nNextBiggerCell);
794  }
795 
796  //
797  // ....corners in the same sampling
798  //
799  if( (option & LArNeighbours::corners2D) ){
800  if(prevNeighbInPhi != NOT_VALID_HASH){
801  unsigned int index1=prevNeighbInPhi;
802  int oldNeighbourIndex = neighbourIndex;
803  // allow only 1 corner cell in order to avoid the problem of
804  // non-mutual neighbourness
805  // since the cells come ordered in phi it should be the last cell for
806  // prevNeighbInPhi as starting points
807  get_prevInEta(hecRegion, index1, nPhi, gPhi, minHash, neighbourIndex, neighbList, nPrevBiggerCell);
808  if ( neighbourIndex > oldNeighbourIndex+1 ) {
809  neighbList[oldNeighbourIndex] = neighbList[neighbourIndex-1];
810  neighbourIndex = oldNeighbourIndex+1;
811  }
812  oldNeighbourIndex = neighbourIndex;
813  get_nextInEta(hecRegion, index1, nPhi, gPhi, maxHash, neighbourIndex, neighbList, nNextBiggerCell);
814  if ( neighbourIndex > oldNeighbourIndex+1 ) {
815  neighbList[oldNeighbourIndex] = neighbList[neighbourIndex-1];
816  neighbourIndex = oldNeighbourIndex+1;
817  }
818  }
819 
820  if(nextNeighbInPhi != NOT_VALID_HASH){
821  unsigned int index2=nextNeighbInPhi;
822  int oldNeighbourIndex = neighbourIndex;
823  // allow only 1 corner cell in order to avoid the problem of
824  // non-mutual neighbourness
825  // since the cells come ordered in phi it should be the 1st cell for
826  // nextNeighbInPhi
827  get_prevInEta(hecRegion, index2, nPhi, gPhi, minHash, neighbourIndex, neighbList, nPrevBiggerCell);
828  if ( neighbourIndex > oldNeighbourIndex+1 ) {
829  neighbourIndex = oldNeighbourIndex+1;
830  }
831  oldNeighbourIndex = neighbourIndex;
832  get_nextInEta(hecRegion, index2, nPhi, gPhi, maxHash, neighbourIndex, neighbList, nNextBiggerCell);
833  if ( neighbourIndex > oldNeighbourIndex+1 ) {
834  neighbourIndex = oldNeighbourIndex+1;
835  }
836  }
837  }
838 
839  //
840  // .... neighbours in sampling (common code)
841  // HEC caracteristics = no granularity change, partial overlap of samplings
842  //
843  if( (option & LArNeighbours::upAndDown) ){
844  // initial eta granularity
845  float granEta = hecRegion->etaGranularity();
846  // initial eta
847  int nEta = int( (index-minHash) / nPhi);
848  double absEta = hecRegion->etaMin() + nEta*granEta;
849 
850  // previous neighbours in sampling
851  if( (option & LArNeighbours::prevInSamp) ){
852  get_prevInSamp(hecRegion, index, nPhi, minHash, absEta, neighbourIndex, neighbList);
853  } // end option
854 
855  // next neighbours in sampling
856  if( (option & LArNeighbours::nextInSamp) ){
857  get_nextInSamp(hecRegion, index, nPhi, minHash, absEta, neighbourIndex, neighbList);
858  }
859  }
860 
861  neighbourList.resize(neighbourIndex);
862  if (neighbourIndex <= maxNeighb) {
863  std::copy (&neighbList[0], &neighbList[neighbourIndex], neighbourList.begin());
864  result = 0 ;
865  } else {
866  std::stringstream strm ;
867  strm << neighbourIndex ;
868  std::string strg = "more than 20 neighbours for this cell, NONE will be retained "
869  + strm.str();
870  if(m_msgSvc) {
871  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
872  log << MSG::WARNING << strg << endmsg;
873  }
874  else {
875  std::cout << "WARNING: " << strg << std::endl;
876  }
877  }
878  return result;
879 
880 }
881 
882 int LArHEC_Base_ID::get_prevInPhi(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const unsigned int& minHash,
883  int& neighbourIndex, IdentifierHash* neighbList)
884 {
885  int result = 1;
886  if(!hecRegion->isPhiMin(index)) {
887  unsigned int nIndex = index-1;
888  if( ((index-minHash)%(nPhi)) == 0 ) nIndex=index+nPhi-1;
889  IdentifierHash nHash = nIndex;
890  neighbList[neighbourIndex] = nHash;
891  neighbourIndex++;
892  result = 0;
893  }
894  return result;
895 }
896 
897 int LArHEC_Base_ID::get_nextInPhi(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const unsigned int& minHash,
898  int& neighbourIndex, IdentifierHash* neighbList)
899 {
900  int result = 1;
901  if(!hecRegion->isPhiMax(index)) {
902  unsigned int nIndex = index+1;
903  if( ((index-minHash+1)%(nPhi)) == 0 ) nIndex=index-nPhi+1;
904  IdentifierHash nHash = nIndex;
905  neighbList[neighbourIndex] = nHash;
906  neighbourIndex++;
907  result = 0;
908  }
909  return result;
910 }
911 
912 int LArHEC_Base_ID::get_prevInEta(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const float& gPhi, const unsigned int& minHash,
913  int& neighbourIndex, IdentifierHash* neighbList, unsigned int& nBiggerCell) const
914 {
915  int result = 1;
916  unsigned int nIndex = 0;
917  IdentifierHash nHash = 0;
918 
919  if( hecRegion->isEtaMin(index)){
920  // eta == etaMin -> go to previous region in eta
921  short int nPrevEtaRegion = hecRegion->prevEtaRegion();
922  // no neighbour if no previous region in eta
923  if( nPrevEtaRegion != NOT_VALID_HEC_REGION ) {
924  // Tell clang to optimize assuming that FP exceptions can trap.
925  // Otherwise, it can vectorize the division, which can lead to
926  // spurious division-by-zero traps from unused vector lanes.
928  LArHEC_region* prevHecRegion = m_vecOfRegions[nPrevEtaRegion];
929  short int nPhiMinus = prevHecRegion->phiN();
930  float gPhiMinus= prevHecRegion->phiGranularity();
931  unsigned int maxHashMinus = prevHecRegion->hashMax();
932  float phiMargin = 0.25*std::min(gPhi,gPhiMinus);
933  float rPhi = (index-minHash)*gPhi+hecRegion->phiMin();
934  int nPhiMinusFirst = int(std::floor((rPhi -prevHecRegion->phiMin())
935  /gPhiMinus+phiMargin))
936  +maxHashMinus-nPhiMinus;
937  int nPhiMinusNext = int(std::floor((rPhi+gPhi-prevHecRegion->phiMin())
938  /gPhiMinus+phiMargin))
939  +maxHashMinus-nPhiMinus;
940  if ( nPhiMinusNext == nPhiMinusFirst ) nPhiMinusNext++;
941 
942  for(int i=nPhiMinusFirst; i<nPhiMinusNext; i++){
943  nIndex = i ;
944  if(nIndex != nBiggerCell) {
945  nHash = nIndex;
946  neighbList[neighbourIndex] = nHash;
947  neighbourIndex++;
948  result = 0;
949  }
950  // to avoid duplicated cells in corners
951  if(gPhi < gPhiMinus && nBiggerCell == NOT_VALID_HASH) nBiggerCell=nIndex;
952  }
953  }
954  }
955  else {
956  // stay in same region (1 neighbour)
957  nIndex = index - nPhi;
958  nHash = nIndex;
959  neighbList[neighbourIndex] = nHash;
960  neighbourIndex++;
961  result = 0;
962  }
963  return result;
964 }
965 
966 int LArHEC_Base_ID::get_nextInEta(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const float& gPhi,
967  const unsigned int& maxHash,
968  int& neighbourIndex, IdentifierHash* neighbList, unsigned int& nBiggerCell) const
969 {
970  int result = 1;
971  unsigned int nIndex = 0;
972  IdentifierHash nHash = 0;
973 
974  if( hecRegion->isEtaMax(index)){
975  // eta == etaMax -> go to next region in eta
976  short int nNextEtaRegion = hecRegion->nextEtaRegion();
977  // no neighbour if no next region in eta
978  if( nNextEtaRegion != NOT_VALID_HEC_REGION ) {
979  // Tell clang to optimize assuming that FP exceptions can trap.
980  // Otherwise, it can vectorize the division, which can lead to
981  // spurious division-by-zero traps from unused vector lanes.
983  LArHEC_region* nextHecRegion = m_vecOfRegions[nNextEtaRegion];
984  float gPhiPlus= nextHecRegion->phiGranularity();
985  unsigned int minHashPlus = nextHecRegion->hashMin();
986  float phiMargin = 0.25*std::min(gPhi,gPhiPlus);
987  float rPhi = (index+nPhi-maxHash)*gPhi+hecRegion->phiMin();
988  int nPhiPlusFirst = int(std::floor((rPhi -nextHecRegion->phiMin())
989  /gPhiPlus+phiMargin))+minHashPlus;
990  int nPhiPlusNext = int(std::floor((rPhi+gPhi-nextHecRegion->phiMin())
991  /gPhiPlus+phiMargin))+minHashPlus;
992  if ( nPhiPlusNext == nPhiPlusFirst ) nPhiPlusNext++;
993 
994  for(int i=nPhiPlusFirst; i<nPhiPlusNext; i++){
995  nIndex = i ;
996  if(nIndex != nBiggerCell) {
997  nHash = nIndex;
998  neighbList[neighbourIndex] = nHash;
999  neighbourIndex++;
1000  result = 0;
1001  }
1002  // to avoid duplicated cells in corners
1003  if(gPhi < gPhiPlus && nBiggerCell == NOT_VALID_HASH) nBiggerCell=nIndex;
1004  }
1005  }
1006  }
1007  else {
1008  // stay in same region (1 neighbour)
1009  nIndex = index + nPhi;
1010  nHash = nIndex;
1011  neighbList[neighbourIndex] = nHash;
1012  neighbourIndex++;
1013  result = 0;
1014  }
1015  return result;
1016 }
1017 
1018 int LArHEC_Base_ID::get_prevInSamp(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const unsigned int& minHash,
1019  const double& absEta,
1020  int& neighbourIndex, IdentifierHash* neighbList) const
1021 {
1022  int result = 1;
1023  // neighbours' indices
1024  unsigned int nIndex=0;
1025  // neighbours' hash
1026  IdentifierHash nHash=0;
1027 
1028  // previous region in sampling
1029  const std::vector<short int>& prevSampRegion=hecRegion->prevSamplingRegion();
1030  int nPrevSampReg = prevSampRegion.size();
1031  if(nPrevSampReg > 0) {
1032  float gEta = hecRegion->etaGranularity();
1033  float gPhi = hecRegion->phiGranularity();
1034  for(int ireg=0; ireg<nPrevSampReg; ireg++) {
1035  LArHEC_region* prevHecRegion = m_vecOfRegions[prevSampRegion[ireg]];
1036  float minEtaMinus = prevHecRegion->etaMin();
1037  float maxEtaMinus = prevHecRegion->etaMax();
1038  // eta granularity of previous region
1039  float granEtaMinus = prevHecRegion->etaGranularity();
1040  float margin = 0.25*std::min(gEta,granEtaMinus);
1041  if((minEtaMinus < absEta+gEta-margin) && (absEta+margin < maxEtaMinus)) {
1042  // Tell clang to optimize assuming that FP exceptions can trap.
1043  // Otherwise, it can vectorize the division, which can lead to
1044  // spurious division-by-zero traps from unused vector lanes.
1046 
1047  // max phi of previous region in sampling
1048  short int nPhiMinus = prevHecRegion->phiN();
1049  // first hash of previous region in sampling
1050  unsigned int minHashMinus = prevHecRegion->hashMin();
1051  float gPhiMinus = prevHecRegion->phiGranularity();
1052  float phiMargin = 0.25*std::min(gPhi,gPhiMinus);
1053  // phi 'coordinate' in initial region
1054  float rPhi = ((index-minHash)%nPhi)*gPhi+hecRegion->phiMin();
1055  int nPhiMinusFirst = int(std::floor((rPhi -prevHecRegion->phiMin())
1056  /gPhiMinus+phiMargin));
1057  int nPhiMinusNext = int(std::floor((rPhi+gPhi-prevHecRegion->phiMin())
1058  /gPhiMinus+phiMargin));
1059  if ( nPhiMinusNext == nPhiMinusFirst ) nPhiMinusNext++;
1060  // eta coordinate in initial region
1061  double fEtaMinus = (absEta-minEtaMinus) / granEtaMinus + margin;
1062  short int nEtaMinus = int(fEtaMinus) ;
1063  for(int i=nPhiMinusFirst; i<nPhiMinusNext; i++){
1064  nIndex = minHashMinus + nEtaMinus * nPhiMinus + i;
1065  if( (nIndex >= prevHecRegion->hashMin()) && (nIndex < prevHecRegion->hashMax()) ) {
1066  nHash = nIndex;
1067  neighbList[neighbourIndex] = nHash;
1068  neighbourIndex++;
1069  result = 0;
1070  }
1071  }
1072  } // end eta condition
1073  } // end loop on ireg
1074  } // end if(nPrevSampReg>0)
1075  return result;
1076 }
1077 
1078 int LArHEC_Base_ID::get_nextInSamp(const LArHEC_region* hecRegion, const unsigned int& index, const short int& nPhi, const unsigned int& minHash,
1079  const double& absEta,
1080  int& neighbourIndex, IdentifierHash* neighbList) const
1081 {
1082  int result = 1;
1083  // neighbours' indices
1084  unsigned int nIndex=0;
1085  // neighbours' hash
1086  IdentifierHash nHash=0;
1087 
1088  const std::vector<short int>& nextSampRegion=hecRegion->nextSamplingRegion();
1089  int nNextSampReg = nextSampRegion.size();
1090  if(nNextSampReg > 0) {
1091  float gEta = hecRegion->etaGranularity();
1092  float gPhi = hecRegion->phiGranularity();
1093  for(int ireg=0; ireg<nNextSampReg; ireg++) {
1094  LArHEC_region* nextHecRegion = m_vecOfRegions[nextSampRegion[ireg]];
1095  float granEtaPlus = nextHecRegion->etaGranularity();
1096  float minEtaPlus = nextHecRegion->etaMin();
1097  float maxEtaPlus = nextHecRegion->etaMax();
1098  float margin = 0.25*std::min(gEta,granEtaPlus);
1099  if((minEtaPlus < absEta+gEta-margin) && (absEta+margin < maxEtaPlus)) {
1100  // Tell clang to optimize assuming that FP exceptions can trap.
1101  // Otherwise, it can vectorize the division, which can lead to
1102  // spurious division-by-zero traps from unused vector lanes.
1104 
1105  short int nPhiPlus = nextHecRegion->phiN();
1106  unsigned int minHashPlus = nextHecRegion->hashMin();
1107  float gPhiPlus = nextHecRegion->phiGranularity();
1108  float phiMargin = 0.25*std::min(gPhi,gPhiPlus);
1109  // phi 'coordinate' in initial region
1110  float rPhi = ((index-minHash)%nPhi)*gPhi+hecRegion->phiMin();
1111  int nPhiPlusFirst = int(std::floor((rPhi -nextHecRegion->phiMin())
1112  /gPhiPlus+phiMargin));
1113  int nPhiPlusNext = int(std::floor((rPhi+gPhi-nextHecRegion->phiMin())
1114  /gPhiPlus+phiMargin));
1115  if ( nPhiPlusNext == nPhiPlusFirst ) nPhiPlusNext++;
1116 
1117  double fEtaPlus = (absEta-minEtaPlus) / granEtaPlus + margin ;
1118  int nEtaPlus = int(fEtaPlus) ;
1119  for(int i=nPhiPlusFirst; i<nPhiPlusNext; i++){
1120  nIndex = minHashPlus + nEtaPlus * nPhiPlus + i;
1121  if( (nIndex >= nextHecRegion->hashMin()) && (nIndex < nextHecRegion->hashMax()) ) {
1122  nHash = nIndex;
1123  neighbList[neighbourIndex] = nHash;
1124  neighbourIndex++;
1125  result = 0;
1126  }
1127  }
1128  }
1129  }
1130  }
1131  return result;
1132 }
1133 
1134 
1136 {
1137  MsgStream log(m_msgSvc, "LArHEC_Base_ID" );
1138 
1139  const std::vector<const IdDictRegion*>& vecOfDictRegions = dictRegions();
1140 
1141  if (!m_quiet) {
1142  if(m_msgSvc) {
1143  log << MSG::DEBUG << "init_neighbors" << endmsg;
1144  }
1145  else {
1146  std::cout << " LArHEC_Base_ID::init_neighbors " << std::endl;
1147  }
1148  }
1149 
1150  //
1151  // ..... loop on HEC regions -> store vector of LArHEC_region*
1152  //
1153  short int reg=0;
1154  std::vector<Identifier>::const_iterator debut=reg_begin() ;
1155  std::vector<Identifier>::const_iterator fin =reg_end() ;
1156 
1157  for (; debut != fin; ++debut)
1158  {
1159  const Identifier& regId = (*debut);
1160  bool fullSym = (dictionaryVersion() == "fullAtlas" );
1161  //
1162  // ..... translate regId to chanId and get hash
1163  //
1164  Identifier id ;
1165  unsigned int index0 = NOT_VALID_HASH;
1166  int etaMin = eta_min(regId);
1167  int phiMin = phi_min(regId);
1168  if(etaMin >= 0 && phiMin >= 0)
1169  {
1170  try{
1171  id = channel_id (regId, etaMin, phiMin );
1172  }
1173  catch(LArID_Exception & except){
1174  if(m_msgSvc) {
1175  log << MSG::ERROR << " LArId exception "
1176  << (std::string)except
1177  << endmsg;
1178  }
1179  else {
1180  std::cout
1181  << " LArId exception "
1182  << (std::string)except
1183  << std::endl;
1184  }
1185  }
1186  IdentifierHash hashId = channel_hash(id) ;
1187  index0=hashId;
1188  }
1189  else
1190  {
1191  if(m_msgSvc) {
1192  log << MSG::WARNING << " could not find non negative etaMin and phiMin for region "
1193  << show_to_string(regId)
1194  << endmsg;
1195  }
1196  else {
1197  std::cout << "WARNING !! could not find non negative etaMin and phiMin for region "
1198  << show_to_string(regId)
1199  << std::endl;
1200  }
1201  index0 = 0;
1202  }
1203 
1204 
1205  short int deltaEta = eta_max(regId) - eta_min(regId) + 1 ;
1206  short int nPhi = phi_max(regId) - phi_min(regId) + 1 ;
1207  // starting eta
1208  float eta0 = this->eta0(reg);
1209  // eta granularity
1210  float deta = this->etaGranularity(reg);
1211  // starting phi
1212  float phi0 = this->phi0(reg);
1213  // phi granularity
1214  float dphi = this->phiGranularity(reg);
1215 
1216  // full range of regions
1217  unsigned int ireg0=0;
1218  unsigned int ireg1=region_hash_max();
1219  // if 2 symetric sides, in which side is the current reg.
1220  if(twoSymSides()) {
1221  if(reg < (short int)region_hash_max()/2) {
1222  ireg0=0;
1223  ireg1=region_hash_max()/2;
1224  } else {
1225  ireg0=region_hash_max()/2;
1226  ireg1=region_hash_max();
1227  }
1228  }
1229 
1230  //
1231  // .... compute prev/next regions in eta
1232  //
1233  short int regForPrevEta=NOT_VALID_HEC_REGION;
1234  IdDictRegion* prevEtaDicReg = vecOfDictRegions[reg]->m_prev_abs_eta;
1235  short int regForNextEta=NOT_VALID_HEC_REGION;
1236  IdDictRegion* nextEtaDicReg = vecOfDictRegions[reg]->m_next_abs_eta;
1237  for(unsigned int ireg=ireg0;ireg<ireg1;ireg++){
1238  if(vecOfDictRegions[ireg] == prevEtaDicReg) regForPrevEta = ireg;
1239  if(vecOfDictRegions[ireg] == nextEtaDicReg) regForNextEta = ireg;
1240  }
1241 
1242  //
1243  // .... compute prev/next regions in sampling
1244  //
1245  //
1246  std::vector<short int> regForPrevSamp;
1247  std::vector<IdDictRegion*> prevSampDicReg = vecOfDictRegions[reg]->m_prev_samp;
1248  for(unsigned int isam=0;isam<prevSampDicReg.size();isam++){
1249  for(unsigned int ireg=ireg0;ireg<ireg1;ireg++){
1250  if(vecOfDictRegions[ireg] == prevSampDicReg[isam]) regForPrevSamp.push_back(ireg);
1251  }
1252  }
1253 
1254  std::vector<short int> regForNextSamp;
1255  std::vector<IdDictRegion*> nextSampDicReg = vecOfDictRegions[reg]->m_next_samp;
1256  for(unsigned int isam=0;isam<nextSampDicReg.size();isam++){
1257  for(unsigned int ireg=ireg0;ireg<ireg1;ireg++){
1258  if(vecOfDictRegions[ireg] == nextSampDicReg[isam]) regForNextSamp.push_back(ireg);
1259  }
1260  }
1261 
1262  //
1263  // ....now ready to build region object
1264  //
1265 
1266  LArHEC_region * hecRegion = new LArHEC_region(index0,deltaEta,nPhi,eta0,deta,phi0,dphi,fullSym,
1267  regForPrevEta,regForNextEta,
1268  regForPrevSamp,regForNextSamp);
1269  // save in a vector for further use in get_neighbours method
1270  m_vecOfRegions.push_back(hecRegion);
1271  reg++;
1272  } // end of loop on regions
1273 
1274  //
1275  // ..... loop on channels
1276  //
1277  reg=0;
1278  debut = hec_begin();
1279  fin = hec_end();
1280  if( debut != fin ){
1281  Identifier lastRegId=region_id(*debut);
1282  for (; debut != fin; ++debut) {
1283  const Identifier& chanId = (*debut);
1284  const Identifier& regId = region_id(chanId);
1285  if(regId != lastRegId) reg++;
1286 
1287  if(m_do_checks) {
1288  // for cross check only
1289  IdentifierHash hashReg = region_hash(regId);
1290  if ((short int)hashReg != reg) {
1291  if(m_msgSvc) {
1292  log << MSG::ERROR << " init_neighbors: problem reg, hashReg = " << reg << " " << hashReg
1293  << endmsg;
1294  }
1295  else {
1296  std::cout << " init_neighbors: problem reg, hashReg = " << reg << " " << hashReg
1297  << std::endl;
1298  }
1299  }
1300  }
1301 
1302  // save region of the cell in a vector for further use in get_neighbours method
1303  m_vecOfCellInfo.push_back(reg);
1304 
1305  lastRegId=regId;
1306  }
1307  }
1308  return (0);
1309 }
1310 
1311 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LArHEC_Base_ID::m_sampling_impl
IdDictFieldImplementation m_sampling_impl
Definition: LArHEC_Base_ID.h:291
LArHEC_region::isPhiMax
bool isPhiMax(const unsigned int &index) const
is the considered cell in the last phi bin of the region ?
Definition: LArHEC_region.cxx:135
LArNeighbours::neighbourOption
neighbourOption
Definition: LArNeighbours.h:12
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
LArHEC_region::hashMin
unsigned int hashMin() const
hash Id of the first cell of the region
Definition: LArHEC_region.cxx:94
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictMgr.cxx:923
LArHEC_Base_ID::m_pn_reg_impl
IdDictFieldImplementation m_pn_reg_impl
Definition: LArHEC_Base_ID.h:297
LArNeighbours::upAndDown
@ upAndDown
Definition: LArNeighbours.h:21
LArHEC_Base_ID::m_hec_impl
IdDictFieldImplementation m_hec_impl
Definition: LArHEC_Base_ID.h:289
get_generator_info.result
result
Definition: get_generator_info.py:21
LArHEC_Base_ID::eta
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
LArHEC_Base_ID::reg_begin
id_iterator reg_begin(void) const
begin iterator over set of region Identifiers
LArHEC_Base_ID::m_vecOfCellInfo
std::vector< short int > m_vecOfCellInfo
Definition: LArHEC_Base_ID.h:300
LArHEC_Base_ID::region_id_checks
void region_id_checks(int pos_neg, int sampling, int region) const
Definition: LArHEC_Base_ID.cxx:392
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArHEC_Base_ID.h
Factor out code common between LArHEC_ID and LArHEC_SuperCell_ID.
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:44
CaloIDHelper::channel_hash_max
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
LArHEC_Base_ID::m_slar
unsigned m_slar
Definition: LArHEC_Base_ID.h:248
LArNeighbours::corners2D
@ corners2D
Definition: LArNeighbours.h:17
LArHEC_region::etaMax
float etaMax() const
end eta
Definition: LArHEC_region.cxx:79
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
LArHEC_Base_ID::get_nextInEta
int get_nextInEta(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &maxHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
Definition: LArHEC_Base_ID.cxx:966
index
Definition: index.py:1
CaloIDHelper::fill_vec_of_dict_regions
int fill_vec_of_dict_regions(const std::string &group_name="")
Initialize the list of detector regions.
Definition: CaloIDHelper.cxx:259
LArHEC_Base_ID::m_POSNEG_INDEX
size_type m_POSNEG_INDEX
Definition: LArHEC_Base_ID.h:253
LArHEC_region::nextSamplingRegion
const std::vector< short int > & nextSamplingRegion() const
region number of the next region in sampling
Definition: LArHEC_region.cxx:142
IdentifierField::get_minimum
element_type get_minimum() const
Query the values.
Definition: IdentifierField.h:59
LArHEC_Base_ID::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: LArHEC_Base_ID.h:256
LArHEC_Base_ID::m_phi_impl
IdDictFieldImplementation m_phi_impl
Definition: LArHEC_Base_ID.h:294
LArHEC_Base_ID::initLevelsFromDict
int initLevelsFromDict(const std::string &group_name)
Definition: LArHEC_Base_ID.cxx:469
LArHEC_Base_ID::m_HEC_INDEX
size_type m_HEC_INDEX
Definition: LArHEC_Base_ID.h:252
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
CaloIDHelper::region_context
IdContext region_context() const
Return the context for regions.
ExpandedIdentifier::add
void add(element_type value)
Append a value into a new field.
LArHEC_Base_ID::reg_end
id_iterator reg_end(void) const
end iterator over set of region Identifiers
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
LArHEC_Base_ID::m_REGION_INDEX
size_type m_REGION_INDEX
Definition: LArHEC_Base_ID.h:255
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:368
LArHEC_Base_ID::HashCalc::m_nphi
size_type m_nphi
Definition: LArHEC_Base_ID.h:283
LArHEC_region::isPhiMin
bool isPhiMin(const unsigned int &index) const
is the considered cell in the first phi bin of the region ?
Definition: LArHEC_region.cxx:128
IdentifierField::get_maximum
element_type get_maximum() const
Definition: IdentifierField.h:68
LArHEC_Base_ID::m_SLAR_INDEX
size_type m_SLAR_INDEX
Definition: LArHEC_Base_ID.h:258
AtlasDetectorID::m_do_checks
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
Definition: AtlasDetectorID.h:362
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
LArHEC_Base_ID::eta_max
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
Definition: LArHEC_Base_ID.cxx:98
AtlasDetectorID::lar_field_value
int lar_field_value() const
Definition: AtlasDetectorID.h:614
LArHEC_Base_ID::HashCalc
small class holding the starting hash value, the min eta and the number of phi bins of each region
Definition: LArHEC_Base_ID.h:273
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:148
LArHEC_region::isEtaMax
bool isEtaMax(const unsigned int &index) const
is the considered cell in the last eta bin of the region ?
Definition: LArHEC_region.cxx:121
LArHEC_Base_ID::region_id
Identifier region_id(const ExpandedIdentifier &exp_id) const
region identifier for a channel from ExpandedIdentifier
LArNeighbours::prevInPhi
@ prevInPhi
Definition: LArNeighbours.h:12
LArHEC_Base_ID::hec_end
id_iterator hec_end(void) const
end iterator over full set of Hec Identifiers for channels
AtlasDetectorID::lar_hec_field_value
int lar_hec_field_value() const
Definition: AtlasDetectorID.h:647
LArHEC_Base_ID::get_expanded_id
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
Definition: LArHEC_Base_ID.cxx:448
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictMgr.cxx:311
IdDictRegion
Definition: IdDictDefs.h:433
LArHEC_region::etaMin
float etaMin() const
starting eta
Definition: LArHEC_region.cxx:74
CaloIDHelper::regions
const HashGroup & regions() const
Return the HashGroup for regions.
AtlasDetectorID::dictionaryVersion
virtual std::string dictionaryVersion(void) const override
Definition: AtlasDetectorID.cxx:347
LArHEC_region::phiGranularity
float phiGranularity() const
phi granularity
Definition: LArHEC_region.cxx:64
AtlasDetectorID::m_do_neighbours
bool m_do_neighbours
Flag for subclasses to know whether or not to perform neighbour initialization.
Definition: AtlasDetectorID.h:365
IdDictDefs.h
LArHEC_Base_ID::m_vecOfPhiMin
std::vector< short int > m_vecOfPhiMin
Definition: LArHEC_Base_ID.h:265
LArHEC_Base_ID::get_prevInPhi
static int get_prevInPhi(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
Definition: LArHEC_Base_ID.cxx:882
LArNeighbours::nextInSamp
@ nextInSamp
Definition: LArNeighbours.h:20
LArNeighbours::nextInPhi
@ nextInPhi
Definition: LArNeighbours.h:13
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictDefs.h:32
LArHEC_Base_ID::channel_hash_binary_search
IdentifierHash channel_hash_binary_search(Identifier channelId) const
create hash id from channel id – method NOT optimised, please use channel_hash() above
StrFormat.h
Provide helper functions to create formatted strings.
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:163
CaloIDHelper::region_hash_max
size_type region_hash_max() const
One more than the largest region hash code.
LArHEC_Base_ID::m_hec_region_index
size_type m_hec_region_index
Definition: LArHEC_Base_ID.h:250
Trk::index1
@ index1
Definition: BoundarySurfaceFace.h:48
LArHEC_Base_ID::~LArHEC_Base_ID
~LArHEC_Base_ID()
Definition: LArHEC_Base_ID.cxx:46
LArHEC_region
This class provides an interface to deal with regions in the neighbours finding
Definition: LArHEC_region.h:21
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
IdentifierField::empty
bool empty() const
Definition: IdentifierField.h:114
CaloIDHelper::etaGranularity
float etaGranularity(const IdentifierHash regHash) const
Return the eta granularity of a region, or NOT_VALID.
Definition: CaloIDHelper.cxx:185
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArHEC_region::isEtaMin
bool isEtaMin(const unsigned int &index) const
is the considered cell in the first eta bin of the region ?
Definition: LArHEC_region.cxx:114
IdDictFieldImplementation::set_bits
void set_bits(size_type bits, size_type bits_offset)
Definition: IdDictFieldImplementation.h:279
LArHEC_Base_ID::init_neighbors
int init_neighbors(void)
Definition: LArHEC_Base_ID.cxx:1135
CaloIDHelper::dict
const IdDictDictionary * dict() const
Return the dictionary for this subdetector.
LArHEC_Base_ID::get_neighbours
int get_neighbours(const IdentifierHash id, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found option = prevInPhi,...
Definition: LArHEC_Base_ID.cxx:701
CaloIDHelper
Base class to factor out code common among Calo ID helpers.
Definition: CaloIDHelper.h:34
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LArHEC_region::prevSamplingRegion
const std::vector< short int > & prevSamplingRegion() const
region number of the prev region in sampling
Definition: LArHEC_region.cxx:147
LArHEC_Base_ID::m_pn_impl
IdDictFieldImplementation m_pn_impl
Definition: LArHEC_Base_ID.h:290
LArHEC_Base_ID::m_region_impl
IdDictFieldImplementation m_region_impl
Definition: LArHEC_Base_ID.h:292
LArHEC_Base_ID::initialize_base_from_dictionary
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &group_name)
initialization from the identifier dictionary
Definition: LArHEC_Base_ID.cxx:166
IdDictFieldImplementation::bits_offset
size_type bits_offset() const
Definition: IdDictFieldImplementation.h:209
LArHEC_Base_ID::phi_min
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDefs.h:302
LArHEC_region::phiMin
float phiMin() const
starting phi
Definition: LArHEC_region.cxx:84
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
LArHEC_Base_ID::twoSymSides
bool twoSymSides() const
True if the + and - sides of the calorimeter are identical (true layout).
LArHEC_region::etaGranularity
float etaGranularity() const
eta granularity
Definition: LArHEC_region.cxx:59
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
LArHEC_Base_ID::get_nextInSamp
int get_nextInSamp(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
Definition: LArHEC_Base_ID.cxx:1078
LArHEC_region.h
LArHEC_Base_ID::phi_min_init
int phi_min_init(const Identifier regId) const
Definition: LArHEC_Base_ID.cxx:119
AtlasDetectorID::lar_hec_exp
ExpandedIdentifier lar_hec_exp(void) const
Definition: AtlasDetectorID.h:569
LArHEC_Base_ID::eta_min
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
Definition: LArHEC_Base_ID.cxx:72
LArHEC_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
LArHEC_Base_ID::channel_id_checks
void channel_id_checks(int pos_neg, int sampling, int region, int eta, int phi) const
Definition: LArHEC_Base_ID.cxx:408
LArHEC_region::phiN
short int phiN() const
number of phi bins
Definition: LArHEC_region.cxx:54
LArHEC_Base_ID::m_slar_impl
IdDictFieldImplementation m_slar_impl
Definition: LArHEC_Base_ID.h:295
LArNeighbours::prevInSamp
@ prevInSamp
Definition: LArNeighbours.h:19
AtlasDetectorID::m_quiet
bool m_quiet
If true, suppress DEBUG/INFO messages.
Definition: AtlasDetectorID.h:371
LArHEC_Base_ID::m_lar_impl
IdDictFieldImplementation m_lar_impl
Definition: LArHEC_Base_ID.h:288
Trk::index0
@ index0
Definition: BoundarySurfaceFace.h:47
CaloIDHelper::initialize_base_from_dictionary
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &dict_name)
Do basic initialization of the helper.
Definition: CaloIDHelper.cxx:232
min
#define min(a, b)
Definition: cfImp.cxx:40
trapping_fp.h
Tell the compiler to optimize assuming that FP may trap.
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictMgr.cxx:340
LArHEC_Base_ID::m_two_sym_sides
bool m_two_sym_sides
Definition: LArHEC_Base_ID.h:263
LArHEC_Base_ID::get_prevInEta
int get_prevInEta(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
Definition: LArHEC_Base_ID.cxx:912
NOT_VALID_HEC_REGION
@ NOT_VALID_HEC_REGION
Definition: LArHEC_region.h:11
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
CxxUtils::strformat
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition: StrFormat.cxx:49
CaloIDHelper::eta0
float eta0(const IdentifierHash regHash) const
Return the minimum eta of region, or NOT_VALID.
Definition: CaloIDHelper.cxx:207
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArHEC_Base_ID::m_hash_calcs
std::vector< HashCalc > m_hash_calcs
Definition: LArHEC_Base_ID.h:285
LArHEC_Base_ID::LArHEC_Base_ID
LArHEC_Base_ID(const std::string &name, bool supercell)
Constructor.
Definition: LArHEC_Base_ID.cxx:30
LArHEC_Base_ID::m_full_region_range
MultiRange m_full_region_range
Definition: LArHEC_Base_ID.h:261
IdentifierHash.h
LArHEC_Base_ID::m_LAR_INDEX
size_type m_LAR_INDEX
Definition: LArHEC_Base_ID.h:251
LArHEC_Base_ID::channel_id
Identifier channel_id(const ExpandedIdentifier &exp_id) const
channel identifier for a channel from ExpandedIdentifier
LArHEC_Base_ID::hec_begin
id_iterator hec_begin(void) const
begin iterator over full set of Hec Identifiers for channels
AtlasDetectorID::setDictVersion
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
Definition: AtlasDetectorID.cxx:759
LArHEC_Base_ID::m_SAMPLING_INDEX
size_type m_SAMPLING_INDEX
Definition: LArHEC_Base_ID.h:254
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
LArHEC_region::nextEtaRegion
short int nextEtaRegion() const
region number of the next region in eta
Definition: LArHEC_region.cxx:109
python.PyKernel.init
def init(v_theApp, v_rootStream=None)
Definition: PyKernel.py:45
LArHEC_Base_ID::get_nextInPhi
static int get_nextInPhi(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
Definition: LArHEC_Base_ID.cxx:897
IdDictDictionary
Definition: IdDictDefs.h:97
CaloIDHelper::channels
const HashGroup & channels() const
Return the HashGroup for channels (cells).
MultiRange::match
int match(const ExpandedIdentifier &id) const
Match an identifier.
Definition: MultiRange.cxx:57
DeMoScan.index
string index
Definition: DeMoScan.py:364
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:284
LArHEC_Base_ID::is_supercell
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDefs.h:283
CaloIDHelper::phi0
float phi0(const IdentifierHash regHash) const
Return the minimum phi of region, or NOT_VALID.
Definition: CaloIDHelper.cxx:218
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
CaloIDHelper::dictRegions
const std::vector< const IdDictRegion * > & dictRegions() const
Return the vector of IdDictRegion, accessed via region hash.
LArHEC_Base_ID::HashCalc::m_hash
IdentifierHash m_hash
Definition: LArHEC_Base_ID.h:280
LArNeighbours::nextInEta
@ nextInEta
Definition: LArNeighbours.h:15
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArHEC_Base_ID::HashCalc::m_phimin
size_type m_phimin
Definition: LArHEC_Base_ID.h:282
DEBUG
#define DEBUG
Definition: page_access.h:11
LArHEC_region::hashMax
unsigned int hashMax() const
hash Id of the last cell of the region +1
Definition: LArHEC_region.cxx:99
LArHEC_Base_ID::sampling
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
LArHEC_Base_ID::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: LArHEC_Base_ID.h:257
LArHEC_Base_ID::HashCalc::m_etamin
size_type m_etamin
Definition: LArHEC_Base_ID.h:281
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:21
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:234
LArHEC_Base_ID::pos_neg
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
ExpandedIdentifier::clear
void clear()
Erase all fields.
LArHEC_Base_ID::m_full_channel_range
MultiRange m_full_channel_range
Definition: LArHEC_Base_ID.h:260
compute_lumi.fin
fin
Definition: compute_lumi.py:19
LArNeighbours::prevInEta
@ prevInEta
Definition: LArNeighbours.h:14
LArHEC_Base_ID::m_vecOfRegions
std::vector< LArHEC_region * > m_vecOfRegions
Definition: LArHEC_Base_ID.h:299
LArHEC_Base_ID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: LArHEC_Base_ID.h:205
calibdata.copy
bool copy
Definition: calibdata.py:27
CaloIDHelper::phiGranularity
float phiGranularity(const IdentifierHash regHash) const
Return the phi granularity of a region, or NOT_VALID.
Definition: CaloIDHelper.cxx:196
IdDictField
Definition: IdDictDefs.h:316
LArHEC_Base_ID::init_hashes
int init_hashes(void)
Definition: LArHEC_Base_ID.cxx:687
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
LArHEC_Base_ID::get_prevInSamp
int get_prevInSamp(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
Definition: LArHEC_Base_ID.cxx:1018
LArHEC_Base_ID::phi_max
int phi_max(const Identifier regId) const
max value of phi index (-999 == failure)
Definition: LArHEC_Base_ID.cxx:145
LArHEC_Base_ID::region
int region(const Identifier id) const
return region [0,1]
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
LArHEC_Base_ID::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: LArHEC_Base_ID.h:293
CaloIDHelper::region_hash
IdentifierHash region_hash(Identifier regionId) const
Convert a connected region Identifier to a hash code.
LArID_Exception
Exception class for LAr Identifiers.
Definition: LArID_Exception.h:20
LArNeighbours::all2D
@ all2D
Definition: LArNeighbours.h:18
LArHEC_region::prevEtaRegion
short int prevEtaRegion() const
region number of the previous region in eta
Definition: LArHEC_region.cxx:104
IdDictFieldImplementation::size_type
Identifier::size_type size_type
Definition: IdDictFieldImplementation.h:62
LArHEC_Base_ID::phi
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part
IdDictFieldImplementation::bits
size_type bits() const
Definition: IdDictFieldImplementation.h:203
Identifier
Definition: IdentifierFieldParser.cxx:14