ATLAS Offline Software
CaloCellGroup.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOCELLGROUP_H
6 #define CALOCELLGROUP_H
7 #include "GaudiKernel/MsgStream.h"
9 #include <bitset>
10 
12 
13  public:
14  CaloCellGroup();
15 
16  //Format:
17  //[EMEC,EMB/A/Layer/Region/Eta/Phi] value1, value2, ...
18  bool setDefinition(const CaloCell_Base_ID* caloCellId, const std::string& definition, MsgStream& logStr);
19  bool inGroup(const Identifier id) const;
20  const std::vector<float>& getValue() const {return m_values;}
21 
22  void printDef() const;
23 
24 
25  private:
26  static void complain(MsgStream&,const std::string&) ;
27 
28  enum Fields {
31  ETA,
32  PHI,
33  NFIELDS
34  };
35 
36  /*
37  enum Calo {
38  EMB=0,
39  EMEC,
40  HEC,
41  FCAL
42  };
43 
44  //Group defintion:
45  std::bitset<4> m_subCalos;
46  //std::bitset<CaloCell_ID:SUBCALO> m_subCalos;
47  */
48 
49 
50  bool m_pos,m_neg;
52  std::vector<std::pair<int,int> > m_fieldBoundaries;
53  std::vector<float> m_values;
54 
56 
57 };
58 
60  public:
62 
63  //Convention: First element of vector has default values, following elements as defined above
64  bool setDefinition(const CaloCell_Base_ID* caloCellId, const std::vector<std::string>& definitions, MsgStream& logStr);
65 
66  void dump(const CaloCell_Base_ID* caloCellId); // for debugging
67 
68  void printDef() const;
69 
70  const std::vector<float>& valuesForCell(const Identifier id);
71 
72  const std::vector<float>& getDefaults() const {return m_defaults; }
73 
74  private:
75  std::vector<CaloCellGroup> m_groups;
76  std::vector<float> m_defaults;
78 };
79 
80 
81 #endif
CaloCellGroup::m_fieldBoundaries
std::vector< std::pair< int, int > > m_fieldBoundaries
Definition: CaloCellGroup.h:52
CaloCellGroup::m_emecow
bool m_emecow
Definition: CaloCellGroup.h:51
CaloCellGroup::ETA
@ ETA
Definition: CaloCellGroup.h:31
CaloCellGroup::REGION
@ REGION
Definition: CaloCellGroup.h:30
CaloCellGroupList::dump
void dump(const CaloCell_Base_ID *caloCellId)
Definition: CaloCellGroup.cxx:283
CaloCellGroupList::getDefaults
const std::vector< float > & getDefaults() const
Definition: CaloCellGroup.h:72
CaloCellGroup::getValue
const std::vector< float > & getValue() const
Definition: CaloCellGroup.h:20
CaloCellGroup::NFIELDS
@ NFIELDS
Definition: CaloCellGroup.h:33
CaloCellGroupList
Definition: CaloCellGroup.h:59
CaloCellGroup::LAYER
@ LAYER
Definition: CaloCellGroup.h:29
CaloCellGroup
Definition: CaloCellGroup.h:11
CaloCellGroup::PHI
@ PHI
Definition: CaloCellGroup.h:32
CaloCellGroup::m_caloCellId
const CaloCell_Base_ID * m_caloCellId
Definition: CaloCellGroup.h:55
CaloCellGroup::m_emb
bool m_emb
Definition: CaloCellGroup.h:51
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
CaloCell_Base_ID.h
Helper base class for offline cell identifiers.
CaloCellGroupList::m_initialized
bool m_initialized
Definition: CaloCellGroup.h:77
CaloCellGroup::m_emeciw
bool m_emeciw
Definition: CaloCellGroup.h:51
CaloCellGroup::printDef
void printDef() const
Definition: CaloCellGroup.cxx:312
CaloCellGroup::setDefinition
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::string &definition, MsgStream &logStr)
Definition: CaloCellGroup.cxx:23
CaloCellGroup::m_hec
bool m_hec
Definition: CaloCellGroup.h:51
CaloCellGroup::m_neg
bool m_neg
Definition: CaloCellGroup.h:50
CaloCellGroup::m_pos
bool m_pos
Definition: CaloCellGroup.h:50
CaloCellGroupList::m_groups
std::vector< CaloCellGroup > m_groups
Definition: CaloCellGroup.h:75
CaloCellGroup::inGroup
bool inGroup(const Identifier id) const
Definition: CaloCellGroup.cxx:165
CaloCellGroup::m_values
std::vector< float > m_values
Definition: CaloCellGroup.h:53
CaloCellGroupList::m_defaults
std::vector< float > m_defaults
Definition: CaloCellGroup.h:76
CaloCellGroupList::printDef
void printDef() const
Definition: CaloCellGroup.cxx:301
CaloCellGroupList::CaloCellGroupList
CaloCellGroupList()
Definition: CaloCellGroup.h:61
CaloCell_Base_ID
Helper base class for offline cell identifiers.
Definition: CaloCell_Base_ID.h:41
CaloCellGroupList::valuesForCell
const std::vector< float > & valuesForCell(const Identifier id)
Definition: CaloCellGroup.cxx:266
CaloCellGroupList::setDefinition
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::vector< std::string > &definitions, MsgStream &logStr)
Definition: CaloCellGroup.cxx:225
CaloCellGroup::m_fcal
bool m_fcal
Definition: CaloCellGroup.h:51
CaloCellGroup::CaloCellGroup
CaloCellGroup()
Definition: CaloCellGroup.cxx:10
CaloCellGroup::Fields
Fields
Definition: CaloCellGroup.h:28
CaloCellGroup::complain
static void complain(MsgStream &, const std::string &)
Definition: CaloCellGroup.cxx:218