|
ATLAS Offline Software
|
#include <CaloCellVolumes.h>
Definition at line 24 of file CaloCellVolumes.h.
◆ TubeSpacingMap
◆ CaloCellVolumes()
CaloCellVolumes::CaloCellVolumes |
( |
ISvcLocator * |
svcLocator, |
|
|
const CaloCell_ID * |
calocell_id |
|
) |
| |
Definition at line 32 of file CaloCellVolumes.cxx.
37 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
39 throw std::runtime_error(
"CellVolumes error: cannot access GeoModelSvc");
41 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
43 throw std::runtime_error(
"CellVolumes error: cannot access GeoDbTagSvc");
45 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
47 throw std::runtime_error(
"CellVolumes error: cannot access RDBAccessSvc");
49 std::string larKey, larNode;
50 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
52 larKey = detectorKey.
tag();
53 larNode = detectorKey.
node();
56 IRDBRecordset_ptr cellVolRec = rdbAccess->getRecordsetPtr(
"LArCellVolumes",larKey,larNode);
57 if(cellVolRec->size()==0) {
58 cellVolRec = rdbAccess->getRecordsetPtr(
"LArCellVolumes",
"LArCellVolumes-00");
59 if(cellVolRec->size()==0) {
60 throw std::runtime_error(
"CaloCellVolumes error: 0 size of LArCellVolumes recordset");
65 IRDBRecordset_ptr fcalModRec = rdbAccess->getRecordsetPtr(
"FCalMod",larKey,larNode);
66 if(fcalModRec->size()==0) {
67 fcalModRec = rdbAccess->getRecordsetPtr(
"FCalMod",
"FCalMod-00");
68 if(fcalModRec->size()==0) {
69 throw std::runtime_error(
"CaloCellVolumes error: 0 size of FCalMod recordset");
78 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
79 std::string LArTag = rdbAccess->getChildTag(
"LAr",larKey,larNode);
80 if(LArTag.find(
"H8")!=std::string::npos) {
83 else if(LArTag.find(
"H6")!=std::string::npos) {
86 else if(LArTag.find(
"G3")!=std::string::npos) {
94 int subcalo = rec->getInt(
"SUBCALO");
95 int posneg = rec->getInt(
"POSNEG");
96 int sampling = rec->getInt(
"SAMPLING");
97 int region = rec->getInt(
"REGION");
98 int eta = rec->getInt(
"ETA");
99 int phi = rec->getInt(
"PHI");
113 cellVol.
volume = rec->getDouble(
"VOLUME");
118 throw std::runtime_error(
"CaloCellVolumes error: 0 volumes have been built!");
◆ ~CaloCellVolumes()
CaloCellVolumes::~CaloCellVolumes |
( |
| ) |
|
◆ CellVolume()
double CaloCellVolumes::CellVolume |
( |
Identifier |
cell_id | ) |
|
◆ getFcalTubeSpacing()
double CaloCellVolumes::getFcalTubeSpacing |
( |
int |
sampling | ) |
|
Definition at line 181 of file CaloCellVolumes.cxx.
185 throw std::runtime_error(
"CaloCellVolumes::getFcalTubeSpacing error: wrong sampling provided");
◆ layout()
const std::string& CaloCellVolumes::layout |
( |
| ) |
|
|
inline |
◆ print()
void CaloCellVolumes::print |
( |
| ) |
|
Definition at line 164 of file CaloCellVolumes.cxx.
167 std::cerr <<
"CaloCellVolumes::print(). No cell volumes..." << std::endl;
170 std::cout <<
"CaloCellVolumes::print(). Number of volumes found: "
176 std::cout <<
" ==> vol= " << vol.volume <<
" mm3" << std::endl;
◆ m_calocell_id
◆ m_cellVolumes
◆ m_fcalTubeSpacings
Initial value:{
{1, 7.5}
, {2, 8.179}
, {3, 9.}
}
Definition at line 46 of file CaloCellVolumes.h.
◆ m_geometryLayout
std::string CaloCellVolumes::m_geometryLayout |
|
private |
The documentation for this class was generated from the following files:
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Scalar phi() const
phi method
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
Scalar eta() const
pseudorapidity method
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Identifier region_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy) const
Make a region ID from constituting fields and subCalo index; for (Mini)FCAL and Tiles,...
const std::string & node() const
Return the version node.
CaloCellVolumeVector m_cellVolumes
TubeSpacingMap m_fcalTubeSpacings
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
void print(Identifier id, const IdContext *context=0) const
Expanded print out of any identifier.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
const CaloCell_ID * m_calocell_id
std::string m_geometryLayout