ATLAS Offline Software
CaloCellVolumes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALODETDESCRUTILS_CALOCELLVOLUMES_H
6 #define CALODETDESCRUTILS_CALOCELLVOLUMES_H
7 
8 #include "Identifier/Identifier.h"
9 #include <vector>
10 #include <string>
11 #include <map>
12 
13 class CaloCell_ID;
14 class ISvcLocator;
15 
17 {
19  float volume;
20 };
21 
22 typedef std::vector<CaloCellVolume> CaloCellVolumeVector;
23 
25 {
26  public:
27  CaloCellVolumes(ISvcLocator* svcLocator,
28  const CaloCell_ID* calocell_id);
30 
31  double CellVolume(Identifier cell_id);
32  inline const std::string& layout() { return m_geometryLayout; }
33 
34  // For FCAL cell volumes which are calculated on the fly
35  double getFcalTubeSpacing(int sampling);
36 
37  void print();
38 
39  private:
40  const CaloCell_ID* m_calocell_id{nullptr};
42  std::string m_geometryLayout;
43 
44  // map fcal samplings on tube spacings
45  typedef std::map<int, double> TubeSpacingMap;
47  {1, 7.5}
48  , {2, 8.179}
49  , {3, 9.}
50  };
51 };
52 
53 #endif
CaloCellVolume::volume
float volume
Definition: CaloCellVolumes.h:19
CaloCellVolumes
Definition: CaloCellVolumes.h:25
CaloCellVolumes::CaloCellVolumes
CaloCellVolumes(ISvcLocator *svcLocator, const CaloCell_ID *calocell_id)
Definition: CaloCellVolumes.cxx:32
CaloCellVolume::channelID
Identifier channelID
Definition: CaloCellVolumes.h:18
CaloCellVolumes::layout
const std::string & layout()
Definition: CaloCellVolumes.h:32
CaloCellVolumes::m_cellVolumes
CaloCellVolumeVector m_cellVolumes
Definition: CaloCellVolumes.h:41
CaloCellVolumes::m_fcalTubeSpacings
TubeSpacingMap m_fcalTubeSpacings
Definition: CaloCellVolumes.h:46
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloCellVolumes::print
void print()
Definition: CaloCellVolumes.cxx:164
CaloCellVolumes::getFcalTubeSpacing
double getFcalTubeSpacing(int sampling)
Definition: CaloCellVolumes.cxx:181
CaloCellVolumeVector
std::vector< CaloCellVolume > CaloCellVolumeVector
Definition: CaloCellVolumes.h:22
CaloCellVolumes::m_calocell_id
const CaloCell_ID * m_calocell_id
Definition: CaloCellVolumes.h:40
CaloCellVolumes::~CaloCellVolumes
~CaloCellVolumes()
Definition: CaloCellVolumes.cxx:125
CaloCellVolumes::CellVolume
double CellVolume(Identifier cell_id)
Definition: CaloCellVolumes.cxx:130
CaloCellVolumes::TubeSpacingMap
std::map< int, double > TubeSpacingMap
Definition: CaloCellVolumes.h:45
CaloCellVolumes::m_geometryLayout
std::string m_geometryLayout
Definition: CaloCellVolumes.h:42
CaloCellVolume
Definition: CaloCellVolumes.h:17
Identifier
Definition: IdentifierFieldParser.cxx:14