![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 GeoModelMdtTest::GeoModelMdtTest(
const std::string&
name, ISvcLocator* pSvcLocator):
28 if (testCham.size() != 6) {
30 return StatusCode::FAILURE;
33 std::string statName = testCham.substr(0, 3);
34 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
35 (testCham[4] ==
'A' ? 1 : -1);
36 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
38 const Identifier eleId =
39 id_helper.elementID(statName, statEta, statPhi, is_valid);
41 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
42 return StatusCode::FAILURE;
46 const Identifier secMl = id_helper.multilayerID(eleId, 2, is_valid);
52 for(
auto itr = id_helper.detectorElement_begin();
53 itr!= id_helper.detectorElement_end();++itr){
58 return StatusCode::SUCCESS;
62 return StatusCode::SUCCESS;
65 const EventContext& ctx{Gaudi::Hive::currentContext()};
73 const int ml = id_helper.multilayer(test_me);
74 const std::string detStr =
m_idHelperSvc->toStringDetEl(test_me);
75 ATH_MSG_DEBUG(
"Test retrieval of Mdt detector element "<<detStr);
81 if (reElement->
identify() != test_me) {
83 return StatusCode::FAILURE;
92 return StatusCode::FAILURE;
94 for (
unsigned int lay = 1 ; lay <= reElement->
numLayers() ; ++lay ) {
96 const Identifier
tube_id = id_helper.channelID(test_me,ml,lay,
tube);
99 const Identifier cnv_tube_id = reElement->
measurementId(measHash);
102 return StatusCode::FAILURE;
108 return StatusCode::SUCCESS;
113 if (!swapReadXML.good()) {
117 std::set<Identifier> chamberIDs{};
119 swapReadXML<<
"<Table name=\"MdtTubeROSides\">"<<std::endl;
122 itr != idHelper.detectorElement_end();
124 const Identifier
swap{*itr};
126 if(!readoutEle)
continue;
127 if (!chamberIDs.insert(idHelper.elementID(
swap)).second)
continue;
129 swapReadXML<<
" <Row ";
130 swapReadXML<<
"MDTTUBEROSIDES_DATA_ID=\""<<
counter<<
"\" ";
134 swapReadXML<<
"side=\""<<
side<<
"\" ";
135 swapReadXML<<
"/>"<<std::endl;
138 swapReadXML<<
"</Table>"<<std::endl;
163 for (
unsigned int lay = 1; lay <= readoutEle->
numLayers(); ++lay) {
166 if (!readoutEle->
isValid(measHash))
continue;
172 readoutEle->
center(gctx, measHash));
180 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
unsigned int numTubesInLay() const
Returns the number of tubes per layer.
StatusCode init(OWNER *instance)
Initialize method.
double tubeLength(const IdentifierHash &hash) const
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
std::string chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
void dumpReadoutSideXML() const
double activeTubeLength(const IdentifierHash &hash) const
Amg::Vector3D readOutPos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the readout card.
MuonVal::ScalarBranch< short > & m_stML
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Gaudi::Property< std::string > m_swapRead
MuonVal::ScalarBranch< unsigned short > & m_numTubes
Number of tubes per layer.
MuonVal::VectorBranch< unsigned short > & m_tubeNum
MuonVal::MuonTesterTree m_tree
MuonVal::CoordTransformBranch m_alignableNode
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
MuonVal::ScalarBranch< short > & m_stPhi
double readoutSide
Is the readout chip at positive or negative Z?
StatusCode execute() override
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
double wireLength(const IdentifierHash &hash) const
std::set< Identifier > m_testStations
Set of stations to be tested.
const MuonDetectorManager * m_detMgr
MuonVal::ScalarBranch< std::string > & m_chamberDesign
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
A muon chamber is a collection of readout elements belonging to the same station.
MuonVal::ScalarBranch< unsigned short > & m_numLayers
Number of tubes per layer.
MuonVal::ScalarBranch< short > & m_stEta
::StatusCode StatusCode
StatusCode definition for legacy code.
unsigned int numLayers() const
Returns the number of tube layer.
Eigen::Affine3d Transform3D
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
const MuonChamber * getChamber() const
Amg::Vector3D center(const ActsGeometryContext &ctx) const
Returns the detector center (Which is the same as the detector center of the first measurement layer)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
MuonVal::VectorBranch< double > & m_wireLength
Include the GeoPrimitives which need to be put first.
double innerTubeRadius() const
Returns the inner tube radius.
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::VectorBranch< double > & m_tubeLength
MuonVal::CoordSystemsBranch m_tubeTransform
Transformation to each tube.
MuonVal::ThreeVectorBranch m_tubePosInCh
Position of the tube in the chamber frame.
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::VectorBranch< unsigned short > & m_tubeLay
Readout each tube specifically.
Identifier identify() const override final
Return the athena identifier.
double tubePitch() const
Returns the pitch between 2 tubes in a layer.
MuonVal::VectorBranch< double > & m_activeTubeLength
StatusCode initialize() override
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
void push_back(const Amg::Transform3D &trans)
MuonVal::ScalarBranch< double > & m_tubePitch
bool fill(const EventContext &ctx)
Fills the tree per call.
MuonVal::ThreeVectorBranch m_roPos
Position of the readout.
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
StatusCode write()
Finally write the TTree objects.
std::vector< Identifier >::const_iterator const_id_iterator
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
StatusCode finalize() override
int stationEta() const
Returns the stationEta (positive A site, negative O site)
const parameterBook & getParameters() const
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
MuonVal::ScalarBranch< double > & m_tubeRad
bool isValid(const IdentifierHash &measHash) const
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
StatusCode dumpToTree(const EventContext &ctx, const ActsGeometryContext &gctx, const MdtReadoutElement *readoutEle)