ATLAS Offline Software
JGTowerBase_ID.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
14 #ifndef JGTOWERBASE_ID_H
15 #define JGTOWERBASE_ID_H
16 
17 #include "AthenaKernel/CLASS_DEF.h"
20 #include "Identifier/MultiRange.h"
22 
24 
25 #include "boost/range/iterator_range.hpp"
26 #include <vector>
27 #include <algorithm>
28 
29 class IdentifierHash;
30 class IdDictRegion;
31 
33 {
34 public:
35  enum { NOT_VALID=999999 };
36 
38 
39  JGTowerBase_ID(void);
40 
41  virtual ~JGTowerBase_ID();
42 
44  Identifier tower_id (int pos_neg, int sampling, int region,
45  int eta, int phi ) const ;
46  Identifier tower_id (int pos_neg, int sampling, int region,
47  int eta, int phi, bool checks ) const ;
48 
50  Identifier tower_id (const Identifier regionId,
51  int eta, int phi ) const ;
52  Identifier tower_id (const Identifier regionId,
53  int eta, int phi, bool checks ) const ;
54 
56  Identifier region_id ( int pos_neg, int sampling, int region ) const;
57  Identifier region_id ( int pos_neg, int sampling, int region, bool checks ) const;
58 
61  IdContext region_context (void) const;
62 
65  IdContext tower_context (void) const;
66 
68  virtual int get_id (const IdentifierHash& hash_id, Identifier& id, const IdContext* context = 0 ) const;
69 
71  virtual int get_hash (const Identifier& id, IdentifierHash& hash_id, const IdContext* context = 0 ) const;
72 
74 
76  Identifier region_id (IdentifierHash region_hash_id) const;
77 
78  Identifier region_id ( const Identifier tower_Id ) const;
79 
81  Identifier tower_id (IdentifierHash tower_hash_id) const;
82 
84  IdentifierHash tower_hash (Identifier towerId) const;
87 
89  virtual int initialize_base_from_dictionary (const IdDictMgr& dict_mgr, const std::string& t_pre);
90 
92  size_type tower_hash_max (void) const;
93 
95  size_type calo_region_hash_max (void) const;
96 
97 
99  typedef std::vector<Identifier>::const_iterator id_iterator;
101  typedef boost::iterator_range<id_iterator> id_range;
102 
103 
105  id_iterator region_begin () const;
107  id_iterator region_end () const;
109  id_range reg_range () const;
110 
112  id_iterator tower_begin () const;
114  id_iterator tower_end () const;
116  id_range tower_range () const;
117 
118  // /** Test wether given tower or layer is part of the Tile Calorimeter
119  // @warning does NOT take as input a REGION identifier */
120  // bool has_tile (const Identifier id) const;
121  // /** Test wether given tower or layer is part of the EM barrel
122  // @warning does NOT take as input a REGION identifier
123  // @warning excluding 'barrel end'! */
124  // bool has_emb (const Identifier id) const;
125  // /** Test wether given tower or layer is part of the EM barrel END
126  // @warning does NOT take as input a REGION identifier */
127  // bool has_barrel_end (const Identifier id) const;
128  // /** Test wether given tower or layer is part of the EM end-cap
129  // @warning does NOT take as input a REGION identifier */
130  // bool has_emec (const Identifier id) const;
131  // /** Test wether given tower or layer is part of the HEC
132  // @warning does NOT take as input a REGION identifier */
133  // bool has_hec (const Identifier id) const;
134  // /** Test wether given tower or layer is part of the FCAL
135  // @warning does NOT take as input a REGION identifier */
136  // bool has_fcal (const Identifier id) const;
137 
150  int pos_neg (const Identifier id)const;
151 
165  int sampling (const Identifier id)const;
166 
185  int region (const Identifier id)const;
186 
209  int eta (const Identifier id)const;
210 
233  int phi (const Identifier id)const;
234 
237  int eta_min(const Identifier regId) const;
240  int eta_max(const Identifier regId) const;
243  int phi_max(const Identifier regId) const;
244 
249  float etaGranularity(const Identifier regId) const;
250 
255  float phiGranularity(const Identifier regId) const;
256 
261  float eta0(const Identifier regId) const;
262 
267  float phi0(const Identifier regId) const;
268 
271  int get_prev_in_phi(const IdentifierHash& id, IdentifierHash& prev) const;
274  int get_next_in_phi(const IdentifierHash& id, IdentifierHash& next) const;
277  int get_prev_in_eta(const IdentifierHash& id, IdentifierHash& prev) const;
280  int get_next_in_eta(const IdentifierHash& id, IdentifierHash& next) const;
281 
282  int fill_vec_of_dict_regions (const std::string& group_name = "");
283 
284  const std::vector<const IdDictRegion*>& dictRegions() const;
285 
286 private:
287 
288 
289  enum {NOT_VALID_HASH = 64000};
290 
291 
293  int get_expanded_id (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
294  void tower_id_checks (int pos_neg, int sampling, int region,
295  int eta, int phi ) const;
296  void tower_id_checks (const Identifier regionId,
297  int eta, int phi ) const;
298  void region_id_checks ( int pos_neg, int sampling, int region ) const;
299 
300  int initLevelsFromDict(const std::string& t_pre) ;
301 
302  int init_hashes(void) ;
303 
304  int init_neighbors(void) ;
305 
306 
314 
316 
321  std::vector<Identifier> m_tower_vec;
322  std::vector<Identifier> m_region_vec;
323  std::vector<unsigned short> m_prev_phi_vec;
324  std::vector<unsigned short> m_next_phi_vec;
325  std::vector<unsigned short> m_prev_eta_vec;
326  std::vector<unsigned short> m_next_eta_vec;
327 
329  std::vector<const IdDictRegion*> m_vecOfDictRegions;
330 
336  class HashCalc
337  {
338  public:
340  m_hash(0),
341  m_etamin(0),
342  m_nphi(0) {}
346  };
347  std::vector<HashCalc> m_hash_calcs;
348 
349 
350 
357 
359 
360 };
361 
362 //using the macros below we can assign an identifier (and a version)
363 //This is required and checked at compile time when you try to record/retrieve
364 CLASS_DEF( JGTowerBase_ID , 131336095, 1 )
365 
366 inline Identifier JGTowerBase_ID::tower_id ( int pos_neg, int sampling, int region,
367  int eta, int phi, bool checks ) const
368 {
369  Identifier result(0);
370  // Pack fields independently
371  m_calo_impl.pack (calo_field_value(), result);
372  m_jgtower_impl.pack (pos_neg, result);
373  m_sampling_impl.pack (sampling, result);
374  m_region_impl.pack (region, result);
375  m_eta_impl.pack (eta, result);
376  m_phi_impl.pack (phi, result);
377 
378  // Do checks
379  if(checks) {
380  tower_id_checks( pos_neg, sampling, region, eta, phi );
381  }
382 
383  return result;
384 }
385 
386 inline Identifier JGTowerBase_ID::tower_id ( int pos_neg, int sampling, int region,
387  int eta, int phi ) const
388 {
389  return tower_id (pos_neg, sampling, region, eta, phi, do_checks());
390 }
391 
392 //----------------------------------------------------------------------------
394  int eta, int phi, bool checks ) const
395 {
396  Identifier result(regionId);
397 
398  // Reset the fields and then set the values
403 
404  // Do checks
405  if(checks) {
406  tower_id_checks( regionId, eta, phi );
407  }
408 
409  return result;
410 }
411 
413  int eta, int phi ) const
414 {
415  return tower_id (regionId, eta, phi, do_checks());
416 }
417 
418 
419 //----------------------------------------------------------------------------
421 {
422  return m_tower_hash_max;
423 }
424 
425 //----------------------------------------------------------------------------
427 {
428  return m_calo_region_hash_max;
429 }
430 
431 
432 //----------------------------------------------------------------------------
434 {
435  return(m_region_vec.begin());
436 }
437 
438 //----------------------------------------------------------------------------
440 {
441  return(m_region_vec.end());
442 }
443 
444 //----------------------------------------------------------------------------
446 {
447  return id_range (region_begin(), region_end());
448 }
449 
450 //----------------------------------------------------------------------------
452 {
453  return(m_tower_vec.begin());
454 }
455 
456 //----------------------------------------------------------------------------
458 {
459  return(m_tower_vec.end());
460 }
461 
462 //----------------------------------------------------------------------------
464 {
465  return id_range (tower_begin(), tower_end());
466 }
467 
468 //----------------------------------------------------------------------------
469 inline int JGTowerBase_ID::pos_neg(const Identifier id) const
470 {
471  return (m_jgtower_impl.unpack(id));
472 }
473 
474 //----------------------------------------------------------------------------
475 inline int JGTowerBase_ID::sampling(const Identifier id) const
476 {
477  return (m_sampling_impl.unpack(id));
478 }
479 //----------------------------------------------------------------------------
480 inline int JGTowerBase_ID::region(const Identifier id) const
481 {
482  return (m_region_impl.unpack(id));
483 }
484 
485 //----------------------------------------------------------------------------
486 inline int JGTowerBase_ID::eta(const Identifier id) const
487 {
488  return (m_eta_impl.unpack(id));
489 }
490 
491 //----------------------------------------------------------------------------
492 inline int JGTowerBase_ID::phi(const Identifier id) const
493 {
494  return (m_phi_impl.unpack(id));
495 }
496 
497 // //----------------------------------------------------------------------------
498 // inline bool JGTowerBase_ID::has_tile (const Identifier id) const
499 // {
500 // // Must first check if this is a normal tile id
501 // if (AtlasDetectorID::is_tile(id)) {
502 // return (true);
503 // }
504 // /* else { */
505 // /* return (has_jgtower_trig_towers(id) && region(id) == 0 && sampling(id) == 1 && eta(id) < 15); */
506 // /* } */
507 // }
508 
509 // //----------------------------------------------------------------------------
510 // inline bool JGTowerBase_ID::has_emb (const Identifier id) const
511 // {
512 // return true;//(has_jgtower_trig_towers(id) && region(id) == 0 && sampling(id) == 0 && eta(id) < 14);
513 // }
514 
515 // //----------------------------------------------------------------------------
516 // inline bool JGTowerBase_ID::has_barrel_end (const Identifier id) const
517 // {
518 // return true;//(has_jgtower_trig_towers(id) && region(id) == 0 && sampling(id) == 0 && eta(id) == 14);
519 // }
520 
521 // //----------------------------------------------------------------------------
522 // inline bool JGTowerBase_ID::has_emec (const Identifier id) const
523 // {
524 // return true;//(has_jgtower_trig_towers(id) && sampling(id) == 0 &&
525 // //((region(id) == 0 && eta(id) > 14) || region(id) == 1 || region(id) == 2 ));
526 // }
527 
528 // //----------------------------------------------------------------------------
529 // inline bool JGTowerBase_ID::has_hec (const Identifier id) const
530 // {
531 // return true;//(has_jgtower_trig_towers(id) && sampling(id) == 1 &&
532 // //((region(id) == 0 && eta(id) > 14) || region(id) == 1 || region(id) == 2 ));
533 // }
534 
535 // //----------------------------------------------------------------------------
536 // inline bool JGTowerBase_ID::has_fcal (const Identifier id) const
537 // {
538 // return true;//(has_jgtower_trig_towers(id) && region(id) == 3 );
539 // }
540 
541 //----------------------------------------------------------------------------
543 {
544  return(m_region_vec[region_hash_id]);
545 }
546 //----------------------------------------------------------------------------
547 inline Identifier JGTowerBase_ID::region_id ( const Identifier tower_Id ) const
548 {
549  Identifier result(tower_Id);
550  // reset eta, phi, layer
553  return (result);
554 }
555 
556 //----------------------------------------------------------------------------
557 inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int region,
558  bool checks) const
559 {
560  Identifier result(0);
561  // Pack fields independently
566 
567  // Do checks
568  if(checks) {
570  }
571 
572  return result;
573 }
574 
575 inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int region)const
576 {
577  return region_id (pos_neg, sampling, region, do_checks());
578 }
579 
580 
581 //----------------------------------------------------------------------------
583 {
584  return(m_tower_vec[tower_hash_id]);
585 }
586 
587 //----------------------------------------------------------------------------
589 {
590  const HashCalc& hc = m_hash_calcs[m_pnz_reg_impl.unpack(towerId)];
591  return (hc.m_hash + (eta(towerId)-hc.m_etamin)*hc.m_nphi + phi(towerId));
592 }
593 
594 //----------------------------------------------------------------------------
596 {
597  std::vector<Identifier>::const_iterator it = std::lower_bound(m_tower_vec.begin(),m_tower_vec.end(),towerId);
598  if ( it != m_tower_vec.end() ){
599  return (it - m_tower_vec.begin());
600  }
601  return (0);
602 }
603 
604 inline
605 const std::vector<const IdDictRegion*>& JGTowerBase_ID::dictRegions() const
606 { return m_vecOfDictRegions;
607 }
608 
609 #endif // CALOJGTOWER_ID_H
610 
611 
612 
613 
614 
615 
616 
617 
618 
619 
620 
621 
622 
623 
624 
625 
626 
627 
628 
629 
630 
631 
632 
633 
JGTowerBase_ID::get_prev_in_phi
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
access to hashes for neighbours in phi – towers only (no extended) return == 0 for neighbours found
Definition: JGTowerBase_ID.cxx:514
JGTowerBase_ID::tower_begin
id_iterator tower_begin() const
begin iterator over towers
Definition: JGTowerBase_ID.h:451
JGTowerBase_ID::m_vecOfDictRegions
std::vector< const IdDictRegion * > m_vecOfDictRegions
List of IdDictRegion objects.
Definition: JGTowerBase_ID.h:329
JGTowerBase_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: JGTowerBase_ID.h:486
JGTowerBase_ID::JGTowerBase_ID
JGTowerBase_ID(void)
Definition: JGTowerBase_ID.cxx:23
JGTowerBase_ID::fill_vec_of_dict_regions
int fill_vec_of_dict_regions(const std::string &group_name="")
Definition: JGTowerBase_ID.cxx:1151
get_generator_info.result
result
Definition: get_generator_info.py:21
JGTowerBase_ID::phi0
float phi0(const Identifier regId) const
Return the minimum phi of region, or NOT_VALID.
Definition: JGTowerBase_ID.cxx:506
JGTowerBase_ID::init_hashes
int init_hashes(void)
Definition: JGTowerBase_ID.cxx:850
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
JGTowerBase_ID::m_prev_eta_vec
std::vector< unsigned short > m_prev_eta_vec
Definition: JGTowerBase_ID.h:325
JGTowerBase_ID::tower_id_checks
void tower_id_checks(int pos_neg, int sampling, int region, int eta, int phi) const
Definition: JGTowerBase_ID.cxx:578
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
JGTowerBase_ID::calo_region_hash
IdentifierHash calo_region_hash(const Identifier id) const
Definition: JGTowerBase_ID.cxx:153
JGTowerBase_ID::HashCalc::m_etamin
size_type m_etamin
Definition: JGTowerBase_ID.h:344
JGTowerBase_ID::tower_hash
IdentifierHash tower_hash(Identifier towerId) const
create hash id from tower id
Definition: JGTowerBase_ID.h:588
JGTowerBase_ID::phi
int phi(const Identifier id) const
return phi according to :
Definition: JGTowerBase_ID.h:492
AtlasDetectorID::calo_field_value
int calo_field_value() const
Definition: AtlasDetectorID.h:623
JGTowerBase_ID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
Definition: JGTowerBase_ID.cxx:114
JGTowerBase_ID::m_sampling_impl
IdDictFieldImplementation m_sampling_impl
Definition: JGTowerBase_ID.h:353
skel.it
it
Definition: skel.GENtoEVGEN.py:396
JGTowerBase_ID::dictRegions
const std::vector< const IdDictRegion * > & dictRegions() const
Definition: JGTowerBase_ID.h:605
JGTowerBase_ID::tower_context
IdContext tower_context(void) const
access to IdContext's which define which levels of fields are contained in the id
Definition: JGTowerBase_ID.cxx:51
JGTowerBase_ID::m_next_eta_vec
std::vector< unsigned short > m_next_eta_vec
Definition: JGTowerBase_ID.h:326
JGTowerBase_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: JGTowerBase_ID.h:475
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
JGTowerBase_ID::region
int region(const Identifier id) const
return region according to :
Definition: JGTowerBase_ID.h:480
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:173
JGTowerBase_ID::phi_max
int phi_max(const Identifier regId) const
min value of phi index (-999 == failure)
Definition: JGTowerBase_ID.cxx:464
JGTowerBase_ID::get_prev_in_eta
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
access to hashes for neighbours in eta – towers only (no extended) return == 0 for neighbours found
Definition: JGTowerBase_ID.cxx:538
JGTowerBase_ID
Definition: JGTowerBase_ID.h:33
JGTowerBase_ID::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: JGTowerBase_ID.h:313
JGTowerBase_ID::m_region_impl
IdDictFieldImplementation m_region_impl
Definition: JGTowerBase_ID.h:354
JGTowerBase_ID::m_region_vec
std::vector< Identifier > m_region_vec
Definition: JGTowerBase_ID.h:322
JGTowerBase_ID::m_CALO_INDEX
size_type m_CALO_INDEX
Definition: JGTowerBase_ID.h:308
JGTowerBase_ID::tower_hash_max
size_type tower_hash_max(void) const
tower hash table max size
Definition: JGTowerBase_ID.h:420
JGTowerBase_ID::m_pnz_reg_impl
IdDictFieldImplementation m_pnz_reg_impl
Definition: JGTowerBase_ID.h:358
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:147
JGTowerBase_ID::m_prev_phi_vec
std::vector< unsigned short > m_prev_phi_vec
Definition: JGTowerBase_ID.h:323
JGTowerBase_ID::region_end
id_iterator region_end() const
end iterator over regions
Definition: JGTowerBase_ID.h:439
JGTowerBase_ID::get_next_in_eta
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
access to hashes for neighbours in eta – towers only (no extended) return == 0 for neighbours found
Definition: JGTowerBase_ID.cxx:550
JGTowerBase_ID::m_full_reg_range
MultiRange m_full_reg_range
Definition: JGTowerBase_ID.h:317
JGTowerBase_ID::id_range
boost::iterator_range< id_iterator > id_range
Type for range over identifiers.
Definition: JGTowerBase_ID.h:101
IdDictRegion
Definition: IdDictRegion.h:20
JGTowerBase_ID::m_calo_region_hash_max
size_type m_calo_region_hash_max
Definition: JGTowerBase_ID.h:320
JGTowerBase_ID::m_hash_calcs
std::vector< HashCalc > m_hash_calcs
Definition: JGTowerBase_ID.h:347
JGTowerBase_ID::tower_end
id_iterator tower_end() const
end iterator over towers
Definition: JGTowerBase_ID.h:457
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:183
JGTowerBase_ID::m_SAMPLING_INDEX
size_type m_SAMPLING_INDEX
Definition: JGTowerBase_ID.h:310
JGTowerBase_ID::m_jgtower_region_index
size_type m_jgtower_region_index
Definition: JGTowerBase_ID.h:307
JGTowerBase_ID::initialize_base_from_dictionary
virtual int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &t_pre)
initialization from the identifier dictionary
Definition: JGTowerBase_ID.cxx:163
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictMgr.h:14
JGTowerBase_ID::region_begin
id_iterator region_begin() const
begin iterator over regions
Definition: JGTowerBase_ID.h:433
JGTowerBase_ID::HashCalc
small class holding the starting hash value, the min eta and the number of phi bins of each region
Definition: JGTowerBase_ID.h:337
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
JGTowerBase_ID::HashCalc::m_nphi
size_type m_nphi
Definition: JGTowerBase_ID.h:345
JGTowerBase_ID::m_tower_vec
std::vector< Identifier > m_tower_vec
Definition: JGTowerBase_ID.h:321
JGTowerBase_ID::calo_region_hash_max
size_type calo_region_hash_max(void) const
region hash table max size
Definition: JGTowerBase_ID.h:426
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
JGTowerBase_ID::size_type
Identifier::size_type size_type
Definition: JGTowerBase_ID.h:37
JGTowerBase_ID::id_iterator
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
Definition: JGTowerBase_ID.h:99
JGTowerBase_ID::m_REGION_INDEX
size_type m_REGION_INDEX
Definition: JGTowerBase_ID.h:311
JGTowerBase_ID::~JGTowerBase_ID
virtual ~JGTowerBase_ID()
JGTowerBase_ID::m_next_phi_vec
std::vector< unsigned short > m_next_phi_vec
Definition: JGTowerBase_ID.h:324
JGTowerBase_ID::eta0
float eta0(const Identifier regId) const
Return the minimum eta of region, or NOT_VALID.
Definition: JGTowerBase_ID.cxx:499
JGTowerBase_ID::m_dict
const IdDictDictionary * m_dict
Definition: JGTowerBase_ID.h:315
JGTowerBase_ID::region_id_checks
void region_id_checks(int pos_neg, int sampling, int region) const
Definition: JGTowerBase_ID.cxx:615
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
JGTowerBase_ID::region_id
Identifier region_id(int pos_neg, int sampling, int region) const
build a region (of towers) identifier
Definition: JGTowerBase_ID.h:575
IdentifierHash.h
JGTowerBase_ID::m_jgtower_impl
IdDictFieldImplementation m_jgtower_impl
Definition: JGTowerBase_ID.h:352
JGTowerBase_ID::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: JGTowerBase_ID.h:312
JGTowerBase_ID::reg_range
id_range reg_range() const
range over regions
Definition: JGTowerBase_ID.h:445
JGTowerBase_ID::m_tower_hash_max
size_type m_tower_hash_max
Definition: JGTowerBase_ID.h:319
JGTowerBase_ID::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
create compact id from hash id (return == 0 for OK)
Definition: JGTowerBase_ID.cxx:58
JGTowerBase_ID::region_context
IdContext region_context(void) const
access to IdContext's which define which levels of fields are contained in the id
Definition: JGTowerBase_ID.cxx:44
MultiRange.h
IdDictDictionary
Definition: IdDictDictionary.h:30
JGTowerBase_ID::m_DETZSIDE_INDEX
size_type m_DETZSIDE_INDEX
Definition: JGTowerBase_ID.h:309
JGTowerBase_ID::tower_id
Identifier tower_id(int pos_neg, int sampling, int region, int eta, int phi) const
build a tower identifier
Definition: JGTowerBase_ID.h:386
IdDictFieldImplementation.h
JGTowerBase_ID::get_next_in_phi
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
access to hashes for neighbours in phi – towers only (no extended) return == 0 for neighbours found
Definition: JGTowerBase_ID.cxx:526
JGTowerBase_ID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: JGTowerBase_ID.h:289
JGTowerBase_ID::pos_neg
int pos_neg(const Identifier id) const
return pos_neg according to :
Definition: JGTowerBase_ID.h:469
JGTowerBase_ID::tower_hash_binary_search
IdentifierHash tower_hash_binary_search(Identifier towerId) const
create hash id from tower id – method NOT optimised, please use tower_hash() above
Definition: JGTowerBase_ID.h:595
JGTowerBase_ID::eta_max
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
Definition: JGTowerBase_ID.cxx:443
JGTowerBase_ID::init_neighbors
int init_neighbors(void)
Definition: JGTowerBase_ID.cxx:989
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
JGTowerBase_ID::HashCalc::m_hash
IdentifierHash m_hash
Definition: JGTowerBase_ID.h:343
JGTowerBase_ID::initLevelsFromDict
int initLevelsFromDict(const std::string &t_pre)
Definition: JGTowerBase_ID.cxx:628
JGTowerBase_ID::eta_min
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
Definition: JGTowerBase_ID.cxx:417
JGTowerBase_ID::get_expanded_id
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
Definition: JGTowerBase_ID.cxx:562
JGTowerBase_ID::phiGranularity
float phiGranularity(const Identifier regId) const
Return the phi granularity of a region, or NOT_VALID.
Definition: JGTowerBase_ID.cxx:492
JGTowerBase_ID::m_phi_impl
IdDictFieldImplementation m_phi_impl
Definition: JGTowerBase_ID.h:356
Identifier::size_type
unsigned long long size_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:29
IdDictFieldImplementation
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
Definition: IdDictFieldImplementation.h:58
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
CaloID_Exception.h
JGTowerBase_ID::m_full_tower_range
MultiRange m_full_tower_range
Definition: JGTowerBase_ID.h:318
JGTowerBase_ID::m_calo_impl
IdDictFieldImplementation m_calo_impl
Definition: JGTowerBase_ID.h:351
AtlasDetectorID::do_checks
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: AtlasDetectorID.cxx:728
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
JGTowerBase_ID::etaGranularity
float etaGranularity(const Identifier regId) const
Return the eta granularity of a region, or NOT_VALID.
Definition: JGTowerBase_ID.cxx:485
JGTowerBase_ID::HashCalc::HashCalc
HashCalc()
Definition: JGTowerBase_ID.h:339
CLASS_DEF.h
macros to associate a CLID to a type
JGTowerBase_ID::NOT_VALID
@ NOT_VALID
Definition: JGTowerBase_ID.h:35
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
JGTowerBase_ID::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: JGTowerBase_ID.h:355
JGTowerBase_ID::tower_range
id_range tower_range() const
range over towers
Definition: JGTowerBase_ID.h:463
Identifier
Definition: IdentifierFieldParser.cxx:14