|
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "GeoModelKernel/GeoVolumeCursor.h"
25 #include "GaudiKernel/MsgStream.h"
26 #include "GaudiKernel/SystemOfUnits.h"
35 #define MLOG(x) if (m_log->level()<=MSG::x) *m_log << MSG::x
41 GeoModelIO::ReadGeoModel* ,
47 , m_paramsSvc(paramsSvc)
48 , m_switches(switches)
63 (*m_log) << MSG::INFO <<
" Entering TileDetectorFactoryLite::create()" <<
endmsg;
77 (*m_log) << MSG::INFO <<
"Getting auxiliary data from SQLite..." <<
endmsg;
80 (*m_log) <<
MSG::DEBUG <<
"data rows in the 'TileReadoutData' RecordSet: " << tileReadoutDataRecordSet->size() <<
endmsg;
82 double barrelPeriodThickness = 0., extendedPeriodThickness = 0.;
83 if (tileReadoutDataRecordSet->size()>0) {
84 if ( (*tileReadoutDataRecordSet)[0]->getString(
"NAME") ==
"barrelPeriodThickness" ) {
85 barrelPeriodThickness = (*tileReadoutDataRecordSet)[0]->getDouble(
"VALUE");
87 std::string errMsg =
"barrelPeriodThickness not found in position [0] in the TileReadoutData' RecordSet!!!";
88 (*m_log) << MSG::ERROR << errMsg <<
endmsg;
89 throw std::runtime_error(errMsg);
91 if ( (*tileReadoutDataRecordSet)[1]->getString(
"NAME") ==
"extendedPeriodThickness" ) {
92 extendedPeriodThickness = (*tileReadoutDataRecordSet)[1]->getDouble(
"VALUE");
94 std::string errMsg =
"extendedPeriodThickness not found in position [1] in the TileReadoutData' RecordSet!!!";
95 (*m_log) << MSG::ERROR << errMsg <<
endmsg;
96 throw std::runtime_error(errMsg);
99 std::string
errorMsg =
"The 'TileReadoutData' recordSet is empty!!!";
103 (*m_log) <<
MSG::DEBUG <<
"barrelPeriodThickness: " << barrelPeriodThickness <<
", extendedPeriodThickness: " << extendedPeriodThickness <<
endmsg;
114 int nModulesInSection[6] = {0,0,0,0,0,0};
115 double zShiftInSection[6] = {0.0,0.0,0.0,0.0,0.0,0.0,};
120 for (
int EnvCounter = 0; EnvCounter < NumberOfEnv; ++EnvCounter) {
129 <<
" EnvCounter is " << EnvCounter
130 <<
" EnvType is " << EnvType
135 if (EnvType == 1 || EnvType == 0) {
136 nModulesInSection[0] = nModulesInSection[1] = NumberOfMod;
137 zShiftInSection[0] = zShiftInSection[1] = Zshift;
138 }
else if (EnvType>0 and EnvType < 6) {
139 nModulesInSection[EnvType] = NumberOfMod;
140 zShiftInSection[EnvType] = Zshift;
151 int side[6] = {0,1,0,1,0,1};
153 (*m_log) <<
MSG::DEBUG <<
"Loop over Tile detector regions, and call computeCellDim() when needed..." <<
endmsg;
154 for (
int ii=0; ii<6; ++ii) {
156 (*m_log) <<
MSG::DEBUG <<
"ii: " << ii <<
", region: " << dete[ii] <<
endmsg;
159 (*m_log) <<
MSG::DEBUG <<
"ii: " << ii <<
", region: " << dete[ii] <<
" --> calling computeCellDim()..." <<
endmsg;
162 zShiftInSection[ii+1],
163 zShiftInSection[ii]);
166 (*m_log) <<
MSG::DEBUG <<
"Get TileDetDescriptor and call fillDescriptor()..." <<
endmsg;
171 nModulesInSection[ii],
172 zShiftInSection[ii]);
174 (*m_log) <<
MSG::DEBUG <<
"Get an Identifier for the region and add it to the detectorManager..." <<
endmsg;
176 descriptor->
set(idRegion);
183 GeoVolumeCursor
cursor(world);
185 std::string volName =
cursor.getName();
186 if (volName.compare(0,4,
"Tile")==0) {
187 (*m_log) <<
MSG::DEBUG <<
"Adding vol '" << volName <<
"' to detManager" <<
endmsg;
193 (*m_log) <<
MSG::DEBUG <<
"Tile geometry from SQLite has been created." <<
endmsg;
int SetCurrentEnvByIndex(unsigned int envelope)
MsgStream * m_log
Get message SVC.
Definition of TileGeoSectionBuilder class.
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
void addTreeTop(PVConstLink)
bool testBeam
setting up testbeam geometry or ATLAS geometry
int GetNumberOfEnv() const
#define TILE_REGION_EXTENDED
TileSwitches m_switches
all switches
void fillDescriptor(TileDetDescriptor *&descriptor, unsigned int detector, int side, bool testbeam, bool addPlates, unsigned int nphi, float zshift)
Readout Descriptor parameters are the following:
Identifier region_id(int index) const
build single region, module, tower, cell, pmt, adc identifiers
The Athena Transient Store API.
void set(const Identifier &id)
Definition of the abstract IRDBAccessSvc interface.
Helper class for TileCal offline identifiers.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
double GetEnvZShift() const
virtual void create(GeoPhysVol *world)
Creation of Tile geometry.
TileDetDescrManager * m_detectorManager
Detector pointer to TileDetDescrManager.
~TileDetectorFactoryLite()
Destructor.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
#define TILE_REGION_CENTRAL
bool addPlatesToCell
calculate cell volumes with or without front-plates and end-plates
IRDBAccessSvc * m_paramsSvc
Pointer to an instance of the RDBAccessSvc to get parameters from the SQLite file.
void setBarrelPeriodThickness(double val)
void add(TileDetDescrRegion *region)
Definition of the abstract IRDBRecord interface.
TileDetectorFactoryLite(StoreGateSvc *pDetStore, TileDetDescrManager *manager, GeoModelIO::ReadGeoModel *sqliteReader, IRDBAccessSvc *rdbaccess, const TileSwitches &switches, MsgStream *log, bool fullGeo)
Constructor.
This class holds one or more material managers and makes them storeable, under StoreGate.
void setExtendedPeriodThickness(double val)
TileDddbManager * getDbManager() const
void computeCellDim(TileDetDescrManager *&manager, int detector, bool addPlates, float zShiftPos, float zShiftNeg)
Cell dimension parameters are the following:
Definition of the abstract IRDBRecordset interface.
This class provides access to constants in the Geometry DB.
int GetEnvNModules() const
const TileID * get_id() const