Loading [MathJax]/jax/output/SVG/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
25 auto translateTokenList = [
this, &idHelper](
const std::vector<std::string>& chNames){
27 std::set<Identifier> transcriptedIds{};
28 for (
const std::string& token : chNames) {
29 if (token.size() != 6) {
30 ATH_MSG_WARNING(
"Wrong format given for "<<token<<
". Expecting 6 characters");
34 const std::string statName = token.substr(0, 3);
35 const unsigned statEta =
std::atoi(token.substr(3, 1).c_str()) * (token[4] ==
'A' ? 1 : -1);
36 const unsigned statPhi =
std::atoi(token.substr(5, 1).c_str());
43 transcriptedIds.insert(eleId);
46 transcriptedIds.insert(secMlId);
49 return transcriptedIds;
52 std::vector <std::string>& selectedSt =
m_selectStat.value();
53 const std::vector <std::string>& excludedSt =
m_excludeStat.value();
54 selectedSt.erase(std::remove_if(selectedSt.begin(), selectedSt.end(),
55 [&excludedSt](
const std::string& token){
56 return std::ranges::find(excludedSt, token) != excludedSt.end();
57 }), selectedSt.end());
59 if (selectedSt.size()) {
61 std::stringstream sstr{};
65 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
67 const std::set<Identifier> excluded = translateTokenList(excludedSt);
69 for(
auto itr = idHelper.detectorElement_begin();
70 itr!= idHelper.detectorElement_end();++itr){
71 if (!excluded.count(*itr)) {
76 if (!excluded.empty()) {
77 std::stringstream excluded_report{};
79 excluded_report <<
" *** " <<
m_idHelperSvc->toStringDetEl(
id) << std::endl;
81 ATH_MSG_INFO(
"Test all station except the following excluded ones " << std::endl << excluded_report.str());
84 return StatusCode::SUCCESS;
87 const EventContext& ctx{Gaudi::Hive::currentContext()};
89 if (!detMgr.isValid()) {
92 return StatusCode::FAILURE;
96 const std::string detStr =
m_idHelperSvc->toStringDetEl(test_me);
104 if (reElement->
identify() != test_me) {
106 << detStr <<
". But got instead "
108 return StatusCode::FAILURE;
112 return StatusCode::SUCCESS;
116 return StatusCode::SUCCESS;
162 const multilayer_t asBuiltMl = readoutEle->
getMultilayer() == 1 ? multilayer_t::ML1 : multilayer_t::ML2;
182 cabling = cablingHandle.cptr();
189 for (
int lay = 1; lay <= readoutEle->
getNLayers(); ++lay) {
191 bool is_valid{
false};
194 lay,
tube, is_valid);
195 if (!is_valid)
continue;
199 }
catch (
const std::runtime_error&
err ){
218 !
cabling->getOnlineId(translation, msgStream())){
220 return StatusCode::FAILURE;
229 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
MuonVal::ScalarBranch< float > & m_asBuiltPosPitchY
MuonVal::ScalarBranch< float > & m_asBuiltPosAlpha
double getALine_trat() const
int getNLayers() const
Returns the number of tube layers inside the multilayer.
MuonVal::ScalarBranch< float > & m_asBuiltPosZ0
std::ostream & operator<<(std::ostream &os, const AlignPos &p)
Ensure that the Athena extensions are properly loaded.
MuonVal::ScalarBranch< float > & m_asBuiltPosPitchZ
double tubeLength(const int tubeLayer, const int tube) const
StatusCode initialize() override
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::VectorBranch< double > & m_tubeLength
MuonVal::VectorBranch< unsigned short > & m_tubeLay
Readout each tube specifically.
MuonVal::ScalarBranch< float > & m_BLineTr
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the underlying GeoModel element (Translation, ColX, ColY, ColZ)
double z0(multilayer_t iML, tubeSide_t iTubeSide) const
MuonVal::CoordSystemsBranch m_tubeTransform
Ideal transformations to the tube rest frame.
MuonVal::ScalarBranch< float > & m_BLineEn
double tubePitch() const
Returns the distance between 2 tubes in a tube layer.
SG::ReadCondHandleKey< MuonMDT_CablingMap > m_cablingKey
double getALine_rotz() const
double getALine_traz() const
double getALine_tras() const
Gaudi::Property< std::vector< std::string > > m_excludeStat
multilayer_t
MDT multi-layer index.
MuonVal::VectorBranch< double > & m_wireLength
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const std::string & getTechnologyName() const
double ypitch(multilayer_t iML, tubeSide_t iTubeSide) const
const BLinePar * getBLinePar() const
MuonVal::ScalarBranch< float > & m_ALineRotS
float getParameter(const Parameter p) const
Returns a given parameter.
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
bool empty() const
Test if the key is blank.
MuonVal::ScalarBranch< float > & m_BLineTw
MuonVal::ScalarBranch< float > & m_asBuiltNegAlpha
MuonVal::ScalarBranch< float > & m_BLineBn
std::set< Identifier > m_testStations
Set of stations to be tested.
MuonVal::VectorBranch< uint8_t > & m_cablingTdcId
MuonVal::ScalarBranch< float > & m_ALineTransS
Alignment parameters.
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonVal::ScalarBranch< short > & m_stML
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
double getWireLength(const int tubeLayer, const int tube) const
int stagg(multilayer_t iML, tubeSide_t iTubeSide) const
MuonVal::ScalarBranch< float > & m_ALineTransZ
MuonVal::ScalarBranch< float > & m_BLinePg
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
MuonVal::ScalarBranch< float > & m_BLineSn
MuonVal::VectorBranch< unsigned short > & m_tubeNum
double getALine_rott() const
::StatusCode StatusCode
StatusCode definition for legacy code.
MuonVal::ScalarBranch< float > & m_asBuiltPosY0
AS-built parameters.
const MuonStation * parentMuonStation() const
double getActiveTubeLength(const int tubeLayer, const int tube) const
double zpitch(multilayer_t iML, tubeSide_t iTubeSide) const
MuonVal::ScalarBranch< float > & m_BLineBp
Eigen::Affine3d Transform3D
MuonVal::ScalarBranch< unsigned short > & m_numTubes
Number of tubes per layer.
MuonVal::VectorBranch< uint8_t > & m_cablingTdcCh
MuonVal::ScalarBranch< float > & m_BLineEp
const Amg::Transform3D & getNativeToAmdbLRS() const
MuonVal::CoordTransformBranch m_alignableNode
int getMultilayer() const
Returns the multilayer represented by the readout element.
MuonVal::VectorBranch< uint8_t > & m_cablingMROD
MuonVal::ScalarBranch< double > & m_tubePitch
MuonVal::ScalarBranch< float > & m_ALineRotT
MuonVal::ScalarBranch< float > & m_asBuiltNegPitchZ
MuonVal::ScalarBranch< float > & m_ALineRotZ
const GeoAlignableTransform * getGeoTransform() const
MuonVal::VectorBranch< uint8_t > & m_cablingCSM
Cabling information.
StatusCode dumpToTree(const EventContext &ctx, const MdtReadoutElement *readoutEle)
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::ScalarBranch< int > & m_asBuiltNegStagg
MuonVal::ScalarBranch< double > & m_tubeRad
MuonVal::ScalarBranch< int > & m_asBuiltPosStagg
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
StatusCode initialize(bool used=true)
bool hasMdtAsBuiltParams() const
MuonVal::ScalarBranch< float > & m_asBuiltNegZ0
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< float > & m_BLineEg
Amg::Vector3D ROPos(const int tubelayer, const int tube) const
MuonVal::ScalarBranch< float > & m_BLineBz
B Line chamber defomrations.
double alpha(multilayer_t iML, tubeSide_t iTubeSide) const
MuonVal::ScalarBranch< short > & m_stEta
int getStationIndex() const
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
MuonVal::ScalarBranch< float > & m_asBuiltNegPitchY
#define ATH_MSG_WARNING(x)
MuonVal::ScalarBranch< float > & m_BLineSp
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
const MdtAsBuiltPar * getMdtAsBuiltParams() const
void push_back(const Amg::Transform3D &trans)
bool fill(const EventContext &ctx)
Fills the tree per call.
StatusCode write()
Finally write the TTree objects.
StatusCode execute() override
MuonVal::ScalarBranch< unsigned short > & m_numLayers
Number of tubes per layer.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
double y0(multilayer_t iML, tubeSide_t iTubeSide) const
virtual const Amg::Transform3D & transform(const Identifier &id) const override final
Return local to global transform associated with this identifier.
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
MuonVal::ScalarBranch< short > & m_stPhi
double getALine_rots() const
MuonVal::ThreeVectorBranch m_roPos
Position of the readout.
MuonVal::ScalarBranch< float > & m_asBuiltNegY0
MuonVal::MuonTesterTree m_tree
Write a TTree for validation purposes.
MuonVal::ScalarBranch< std::string > & m_chamberDesign
int getStationPhi() const
MuonVal::VectorBranch< double > & m_activeTubeLength
int getStationEta() const
StatusCode finalize() override
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
MuonVal::ScalarBranch< float > & m_ALineTransT