ATLAS Offline Software
Loading...
Searching...
No Matches
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:
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
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
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
Helper base class for offline cell identifiers.
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::vector< std::string > &definitions, MsgStream &logStr)
std::vector< CaloCellGroup > m_groups
std::vector< float > m_defaults
void printDef() const
const std::vector< float > & valuesForCell(const Identifier id)
const std::vector< float > & getDefaults() const
std::vector< float > m_values
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::string &definition, MsgStream &logStr)
void printDef() const
const std::vector< float > & getValue() const
static void complain(MsgStream &, const std::string &)
std::vector< std::pair< int, int > > m_fieldBoundaries
bool inGroup(const Identifier id) const
const CaloCell_Base_ID * m_caloCellId
Helper base class for offline cell identifiers.
-event-from-file