![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
14 GeoModelRpcTest::GeoModelRpcTest(
const std::string&
name, ISvcLocator* pSvcLocator):
26 if (testCham.size() != 6) {
28 return StatusCode::FAILURE;
31 std::string statName = testCham.substr(0, 3);
32 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
33 (testCham[4] ==
'A' ? 1 : -1);
34 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
36 const Identifier eleId = id_helper.elementID(statName, statEta, statPhi, 1, is_valid);
38 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
39 return StatusCode::FAILURE;
42 id_helper.detectorElement_end(),
44 [&](
const Identifier&
id) {
45 return id_helper.stationName(id) == id_helper.stationName(eleId) &&
46 id_helper.stationEta(id) == id_helper.stationEta(eleId) &&
47 id_helper.stationPhi(id) == id_helper.stationPhi(eleId);
52 std::copy(id_helper.detectorElement_begin(),
53 id_helper.detectorElement_end(),
56 std::stringstream sstr{};
60 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
63 return StatusCode::SUCCESS;
67 return StatusCode::SUCCESS;
70 const EventContext& ctx{Gaudi::Hive::currentContext()};
83 if (reElement->
identify() != test_me) {
86 return StatusCode::FAILURE;
96 return StatusCode::FAILURE;
100 for (
int doubPhi = reElement->
doubletPhi(); doubPhi <= reElement->doubletPhiMax(); ++doubPhi) {
101 for (
bool measPhi: {
false,
true}) {
102 unsigned int numStrip = (measPhi ? reElement->
nPhiStrips() :
104 for (
unsigned int strip = 1; strip < numStrip ; ++strip) {
106 const Identifier chId = id_helper.channelID(reElement->
identify(),
114 const IdentifierHash layHash = reElement->
layerHash(chId);
116 <<
" --> layerHash: "<<
static_cast<unsigned>(layHash));
117 const Identifier backCnv = reElement->
measurementId(measHash);
118 if (backCnv != chId) {
121 return StatusCode::FAILURE;
123 if (layHash != reElement->
layerHash(measHash)) {
124 ATH_MSG_FATAL(
"Constructing the layer hash from the identifier "<<
125 m_idHelperSvc->toString(chId)<<
" leadds to different layer hashes "<<
126 layHash<<
" vs. "<< reElement->
layerHash(measHash));
127 return StatusCode::FAILURE;
136 return StatusCode::SUCCESS;
174 for (
int doubPhi = reElement->
doubletPhi(); doubPhi <= reElement->doubletPhiMax(); ++doubPhi) {
175 for (
bool measPhi: {
false,
true}) {
176 unsigned int numStrip = (measPhi ? reElement->
nPhiStrips() :
178 for (
unsigned int strip = 1; strip <= numStrip ; ++strip) {
181 const Identifier stripID = id_helper.channelID(reElement->
identify(),
187 <<
" gap: "<<
gasGap<<
" strip: "<<strip<<
" meas phi: "<<measPhi);
191 const IdentifierHash layHash = reElement->
layerHash(measHash);
200 if (strip != 1)
continue;
210 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
MuonVal::ScalarBranch< std::string > & m_chamberDesign
double stripPhiLength() const
Returns the length of a phi strip.
MuonVal::ScalarBranch< float > & m_stripEtaLength
MuonVal::ScalarBranch< float > & m_stripPhiWidth
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::CoordSystemsBranch m_stripRot
Rotation matrix of the respective layers.
int doubletR() const
Returns the doublet R field of the MuonReadoutElement identifier.
MuonVal::VectorBranch< bool > & m_stripPosMeasPhi
MuonVal::VectorBranch< uint8_t > & m_stripRotDblPhi
double stripEtaPitch() const
Strip pitch in eta.
StatusCode initialize() override
std::string chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
unsigned int nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
MuonVal::CoordTransformBranch m_alignableNode
MuonVal::ScalarBranch< uint8_t > & m_numStripsPhi
MuonVal::TwoVectorBranch m_locStripPos
double stripPhiPitch() const
Strip pitch in phi.
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
#define ATH_MSG_VERBOSE(x)
int nPhiPanels() const
Returns the number of phi panels (1 or 2)
MuonVal::ScalarBranch< short > & m_stPhi
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
unsigned int nEtaStrips() const
Number of strips measuring the eta coordinate.
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
MuonVal::ScalarBranch< uint8_t > & m_doubletPhi
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
MuonVal::ScalarBranch< uint8_t > & m_doubletR
MuonVal::MuonTesterTree m_tree
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
MuonVal::ThreeVectorBranch m_stripPos
Strip positions.
::StatusCode StatusCode
StatusCode definition for legacy code.
int doubletPhi() const
Returns the doublet Phi field of the MuonReadoutElement identifier.
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 stripPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the position of the strip center.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
MuonVal::ScalarBranch< float > & m_stripPhiLength
MuonVal::ScalarBranch< uint8_t > & m_numGasGapsPhi
Out copy_if(In first, const In &last, Out res, const Pred &p)
int doubletZ() const
Returns the doublet Z field of the MuonReadoutElement identifier.
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
Include the GeoPrimitives which need to be put first.
MuonVal::ScalarBranch< uint8_t > & m_numRpcLayers
Number of eta & phi gas gaps.
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::ScalarBranch< float > & m_stripPhiPitch
std::set< Identifier > m_testStations
Set of stations to be tested.
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
MuonVal::ScalarBranch< short > & m_stEta
IdentifierHash layerHash(const Identifier &measId) const override final
MuonVal::ScalarBranch< float > & m_stripEtaPitch
Strip dimensions.
Identifier identify() const override final
Return the athena identifier.
unsigned int nPhiStrips() const
Number of strips measuring the phi coordinate.
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< float > & m_stripEtaWidth
MuonVal::VectorBranch< bool > & m_stripRotMeasPhi
MuonVal::VectorBranch< uint8_t > & m_stripPosGasGap
StatusCode dumpToTree(const EventContext &ctx, const ActsGeometryContext &gctx, const RpcReadoutElement *readoutEle)
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
StatusCode execute() override
#define ATH_MSG_WARNING(x)
void push_back(const Amg::Transform3D &trans)
const MuonDetectorManager * m_detMgr
bool fill(const EventContext &ctx)
Fills the tree per call.
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.
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...
double stripPhiWidth() const
Strip width in phi.
int stationEta() const
Returns the stationEta (positive A site, negative O site)
MuonVal::ScalarBranch< uint8_t > & m_numStripsEta
Number of strips, strip pitch in eta & phi direction.
StatusCode finalize() override
MuonVal::ScalarBranch< uint8_t > & m_numPhiPanels
MuonVal::VectorBranch< uint8_t > & m_stripRotGasGap
MuonVal::VectorBranch< uint8_t > & m_stripDblPhi
MuonVal::VectorBranch< uint8_t > & m_stripPosNum
double stripEtaWidth() const
Strip width in eta.
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
MuonVal::ScalarBranch< uint8_t > & m_doubletZ
double stripEtaLength() const
Returns the length of an eta strip.
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>