|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GeoModelKernel/GeoDefinitions.h"
20 #define SYSTEM_OF_UNITS Gaudi::Units
26 ,
const std::map<std::string,unsigned>& trdMap
27 ,
const std::string& detKey
28 ,
const std::string& detNode)
30 MsgStream
log(
msgSvc,
"buildMbtsReadout");
40 if(
sc.isFailure() || !tileTBID) {
41 log << MSG::ERROR <<
"Failed to initialize TileTBID" <<
endmsg;
47 log << MSG::ERROR <<
"No lar position record in the database" <<
endmsg;
48 return StatusCode::FAILURE;
52 double globalZMM = xfPos.translation().z() + zposMM;
59 int sidesign = (
side ? -1 : 1);
61 for(
unsigned int scinId=0; scinId<2; scinId++) {
63 double dx1Scin(0.), dzScin(0.), zposScin(0.), rposScin(0.), scineta(0.), scindeta(0.),
deltaPhi(0.), startPhi(0.);
65 if(mbtsGen->size()==0) {
67 const IRDBRecord* curScin = (*mbtsScin)[scinId];
69 nScin = curScin->
getInt(
"SCINNUM");
83 startPhi = curScin->
getDouble(
"STARTPHI");
88 std::string scinName = (scinId==0?
"MBTS1":
"MBTS2");
89 const IRDBRecord* curScin = (*mbtsTrds)[trdMap.at(scinName)];
90 nScin = (*mbtsGen)[0]->
getInt(
"NSCIN");
98 startPhi = (*mbtsGen)[0]->getDouble(
"STARTPHI");
107 mbtsDDE->
set_z((globalZMM + zposScin)*sidesign);
109 mbtsDDE->
set_r(rposScin);
117 mbtsManager->
add(mbtsDDE);
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
Identifier channel_id(int type, int module, int channel) const
identifer for one channel of a Tile testbeam detector
StatusCode buildMbtsReadout(StoreGateSvc *detStore, IRDBAccessSvc *paramSvc, IMessageSvc *msgSvc, double zposMM, const std::map< std::string, unsigned > &trdMap, const std::string &detKey, const std::string &detNode)
void set_id(const Identifier &id)
Scalar phi() const
phi method
static const IRDBRecord * getTransformRecord(IRDBRecordset_ptr positionRecSet, const std::string &key)
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.
Scalar eta() const
pseudorapidity method
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
void set_deta(double deta)
void set_dphi(double dphi)
static GeoTrf::Transform3D getTransform(const IRDBRecord *currentRec)
void add(CaloDetDescrElement *element)
The Athena Transient Store API.
Definition of the abstract IRDBAccessSvc interface.
msgSvc
Provide convenience handles for various services.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
IRDBRecord is one record in the IRDBRecordset object.
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
Definition of the abstract IRDBRecordset interface.
Helper function for building readout geometry of the MBTS.
Calo Subsystem specific Detector Elements + Dummy element for testing.