|
ATLAS Offline Software
|
Go to the documentation of this file.
15 GeoModelTgcTest::GeoModelTgcTest(
const std::string&
name, ISvcLocator* pSvcLocator):
31 if (testCham.size() != 7) {
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, 2).c_str());
41 const Identifier eleId{id_helper.elementID(statName, statEta, statPhi, is_valid)};
43 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
44 return StatusCode::FAILURE;
51 std::set<Identifier> excludedStations{};
54 if (testCham.size() != 7) {
56 return StatusCode::FAILURE;
59 std::string statName = testCham.substr(0, 3);
60 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
61 (testCham[4] ==
'A' ? 1 : -1);
62 unsigned int statPhi =
std::atoi(testCham.substr(5, 2).c_str());
64 const Identifier eleId{id_helper.elementID(statName, statEta, statPhi, is_valid)};
66 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
67 return StatusCode::FAILURE;
70 excludedStations.insert(eleId);
74 id_helper.detectorElement_end(),
77 return excludedStations.count(id) == 0;
80 if (!excludedStations.empty()) {
81 std::stringstream excluded_report{};
83 excluded_report <<
" *** " <<
m_idHelperSvc->toString(
id) << std::endl;
85 ATH_MSG_INFO(
"Test all station except the following excluded ones " << std::endl << excluded_report.str());
88 std::stringstream sstr{};
92 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
95 return StatusCode::SUCCESS;
99 return StatusCode::SUCCESS;
102 const EventContext& ctx{Gaudi::Hive::currentContext()};
115 if (reElement->
identify() != test_me) {
118 return StatusCode::FAILURE;
127 return StatusCode::FAILURE;
131 for (
bool isStrip : {
false,
true}) {
139 ATH_MSG_DEBUG(
"No valid Identifier constructed from the fields "
141 <<
"isStrip: "<<(
isStrip ?
"yay" :
"nay")<<
" gasGap: "<<
gasGap<<
150 return StatusCode::FAILURE;
154 <<
" gave something else than doing it from the measurement hash "<<measHash<<
". "<<
162 return StatusCode::SUCCESS;
185 for (
unsigned int strip = 1 ; strip <= reElement->
numStrips(
gap); ++strip) {
216 for (
unsigned int gang = 1; gang <= reElement->
numWireGangs(
gap); ++gang) {
236 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
MuonVal::TwoVectorBranch m_locGangPos
MuonVal::ScalarBranch< uint8_t > & m_nGasGaps
unsigned int numWireGangs(unsigned int gasGap) const
Returns the number of wire gangs for a given gasGap [1-3].
MuonVal::VectorBranch< float > & m_layShortWidth
const WireGroupDesign & wireGangLayout(unsigned int gasGap) const
Returns access to the wire group design of the given gasGap [1-3] If the gap does not have a wires an...
MuonVal::CoordTransformBranch m_alignableNode
StatusCode init(OWNER *instance)
Initialize method.
std::string find(const std::string &s)
return a remapped string
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
MuonVal::TwoVectorBranch m_locStripTop
CheckVector2D leftEdge(int stripNumb) const
Returns the left edge of the strip (Global numbering scheme)
Eigen::Matrix< double, 2, 1 > Vector2D
std::string chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
unsigned int nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
Amg::Vector3D channelPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the center of the measurement channel eta measurement: wire gang center phi measurement: stri...
StatusCode dumpToTree(const EventContext &ctx, const ActsGeometryContext &gctx, const TgcReadoutElement *readoutEle)
MuonVal::ThreeVectorBranch m_stripBottom
double moduleWidthS() const
Returns the length of the bottom edge of the chamber (short width)
const MuonDetectorManager * m_detMgr
StatusCode finalize() override
double moduleWidthL() const
Returns the length of the top edge of the chamber (top width)
MuonVal::ThreeVectorBranch m_stripTop
Gaudi::Property< std::vector< std::string > > m_excludeStat
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
double moduleHeight() const
Returns the height of the chamber (Distance bottom - topWidth)
MuonVal::VectorBranch< uint8_t > & m_gangGasGap
def gap(flags, cells_name, *args, **kw)
MuonVal::VectorBranch< uint8_t > & m_gangNumWires
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
MuonVal::ScalarBranch< short > & m_stEta
double moduleThickness() const
Returns the thickness of the chamber.
unsigned int numStrips(unsigned int gasGap) const
Returns the number of strips for a given gasGap [1-3].
const RadialStripDesign & stripLayout(unsigned int gasGap) const
Returns access to the strip design of the given gasGap [1-3] If the gap does not have strips an excep...
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
MuonVal::ScalarBranch< short > & m_stPhi
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
MuonVal::VectorBranch< float > & m_layLongWidth
MuonVal::CoordSystemsBranch m_layTans
Layer dimensions.
MuonVal::ScalarBranch< std::string > & m_stLayout
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
MuonVal::VectorBranch< unsigned int > & m_gangNum
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
MuonVal::VectorBranch< uint16_t > & m_layNumWires
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
MuonVal::ScalarBranch< float > & m_thickness
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
MuonVal::ScalarBranch< float > & m_shortWidth
Out copy_if(In first, const In &last, Out res, const Pred &p)
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::VectorBranch< uint8_t > & m_stripGasGap
Include the GeoPrimitives which need to be put first.
void push_back(const T &value)
Adds a new element at the end of the vector.
IdentifierHash layerHash(const Identifier &measId) const override final
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
MuonVal::VectorBranch< bool > & m_layMeasPhi
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
MuonVal::TwoVectorBranch m_locStripCenter
Identifier identify() const override final
Return the athena identifier.
Eigen::Matrix< double, 3, 1 > Vector3D
StatusCode execute() override
MuonVal::VectorBranch< float > & m_layHeight
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
MuonVal::ScalarBranch< float > & m_height
void push_back(const Amg::Transform3D &trans)
std::set< Identifier > m_testStations
Set of stations to be tested.
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.
MuonVal::ScalarBranch< float > & m_longWidth
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...
int stationEta() const
Returns the stationEta (positive A site, negative O site)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::TwoVectorBranch m_locStripBottom
MuonVal::ThreeVectorBranch m_stripCenter
MuonVal::ThreeVectorBranch m_gangCenter
Wire gangs.
MuonVal::VectorBranch< uint8_t > & m_layNumber
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
MuonVal::MuonTesterTree m_tree
MuonVal::VectorBranch< unsigned int > & m_stripNum
StatusCode initialize() override
MuonVal::VectorBranch< float > & m_gangLength