|
ATLAS Offline Software
|
Go to the documentation of this file.
14 GeoModelRpcTest::GeoModelRpcTest(
const std::string&
name, ISvcLocator* pSvcLocator):
31 if (testCham.size() != 6) {
33 return StatusCode::FAILURE;
36 std::string statName = testCham.substr(0, 3);
37 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
38 (testCham[4] ==
'A' ? 1 : -1);
39 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
41 const Identifier eleId = id_helper.elementID(statName, statEta, statPhi, 1, is_valid);
43 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
44 return StatusCode::FAILURE;
47 id_helper.detectorElement_end(),
50 return id_helper.stationName(id) == id_helper.stationName(eleId) &&
51 id_helper.stationEta(id) == id_helper.stationEta(eleId) &&
52 id_helper.stationPhi(id) == id_helper.stationPhi(eleId);
58 std::set<Identifier> excludedStations{};
61 if (testCham.size() != 6) {
63 return StatusCode::FAILURE;
66 std::string statName = testCham.substr(0, 3);
67 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) * (testCham[4] ==
'A' ? 1 : -1);
68 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
70 const Identifier eleId = id_helper.elementID(statName, statEta, statPhi, 1, is_valid);
72 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
73 return StatusCode::FAILURE;
77 id_helper.detectorElement_end(),
78 std::inserter(excludedStations, excludedStations.end()),
80 return id_helper.stationName(id) == id_helper.stationName(eleId) &&
81 id_helper.stationEta(id) == id_helper.stationEta(eleId) &&
82 id_helper.stationPhi(id) == id_helper.stationPhi(eleId);
87 id_helper.detectorElement_end(),
90 return excludedStations.count(id) == 0;
93 if (!excludedStations.empty()) {
94 std::stringstream excluded_report{};
96 excluded_report <<
" *** " <<
m_idHelperSvc->toString(
id) << std::endl;
98 ATH_MSG_INFO(
"Test all station except the following excluded ones " << std::endl << excluded_report.str());
101 std::stringstream sstr{};
105 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
108 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
115 const EventContext& ctx{Gaudi::Hive::currentContext()};
128 if (reElement->
identify() != test_me) {
131 return StatusCode::FAILURE;
141 return StatusCode::FAILURE;
145 for (
int doubPhi = reElement->
doubletPhi(); doubPhi <= reElement->doubletPhiMax(); ++doubPhi) {
146 for (
bool measPhi: {
false,
true}) {
147 unsigned int numStrip = (measPhi ? reElement->
nPhiStrips() :
149 for (
unsigned int strip = 1; strip < numStrip ; ++strip) {
159 const IdentifierHash layHash = reElement->
layerHash(chId);
161 <<
" --> layerHash: "<<
static_cast<unsigned>(layHash));
163 if (backCnv != chId) {
166 return StatusCode::FAILURE;
168 if (layHash != reElement->
layerHash(measHash)) {
169 ATH_MSG_FATAL(
"Constructing the layer hash from the identifier "<<
170 m_idHelperSvc->toString(chId)<<
" leadds to different layer hashes "<<
171 layHash<<
" vs. "<< reElement->
layerHash(measHash));
172 return StatusCode::FAILURE;
181 return StatusCode::SUCCESS;
219 for (
int doubPhi = reElement->
doubletPhi(); doubPhi <= reElement->doubletPhiMax(); ++doubPhi) {
220 for (
bool measPhi: {
false,
true}) {
221 unsigned int numStrip = (measPhi ? reElement->
nPhiStrips() :
223 for (
unsigned int strip = 1; strip <= numStrip ; ++strip) {
232 <<
" gap: "<<
gasGap<<
" strip: "<<strip<<
" meas phi: "<<measPhi);
236 const IdentifierHash layHash = reElement->
layerHash(measHash);
245 if (strip != 1)
continue;
255 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.
std::string find(const std::string &s)
return a remapped string
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.
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
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.
Gaudi::Property< std::vector< std::string > > m_excludeStat
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>