Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 return StatusCode::SUCCESS;
27 auto translateTokenList = [
this, &idHelper](
const std::vector<std::string>& chNames){
29 std::set<Identifier> transcriptedIds{};
30 for (
const std::string& token : chNames) {
31 if (token.size() != 6) {
32 ATH_MSG_WARNING(
"Wrong format given for "<<token<<
". Expecting 6 characters");
36 const std::string statName = token.substr(0, 3);
37 const unsigned statEta =
std::atoi(token.substr(3, 1).c_str()) * (token[4] ==
'A' ? 1 : -1);
38 const unsigned statPhi =
std::atoi(token.substr(5, 1).c_str());
45 transcriptedIds.insert(eleId);
51 return transcriptedIds;
54 std::vector <std::string>& selectedSt =
m_selectStat.value();
55 const std::vector <std::string>& excludedSt =
m_excludeStat.value();
56 selectedSt.erase(std::remove_if(selectedSt.begin(), selectedSt.end(),
57 [&excludedSt](
const std::string& token){
58 return std::ranges::find(excludedSt, token) != excludedSt.end();
59 }), selectedSt.end());
61 if (selectedSt.size()) {
63 std::stringstream sstr{};
67 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
69 const std::set<Identifier> excluded = translateTokenList(excludedSt);
71 for(
auto itr = idHelper.detectorElement_begin();
72 itr!= idHelper.detectorElement_end();++itr){
73 if (!excluded.count(*itr)) {
78 if (!excluded.empty()) {
79 std::stringstream excluded_report{};
81 excluded_report <<
" *** " <<
m_idHelperSvc->toStringDetEl(
id) << std::endl;
83 ATH_MSG_INFO(
"Test all station except the following excluded ones " << std::endl << excluded_report.str());
86 return StatusCode::SUCCESS;
89 const EventContext& ctx{Gaudi::Hive::currentContext()};
91 if (!detMgr.isValid()) {
94 return StatusCode::FAILURE;
105 if (reElement->
identify() != test_me) {
107 <<
m_idHelperSvc->toStringDetEl(test_me) <<
". But got instead "
109 return StatusCode::FAILURE;
113 return StatusCode::SUCCESS;
135 for (
bool measPhi : {
false,
true}) {
143 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
MuonVal::ScalarBranch< float > & m_ALineTransS
Alignment parameters.
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
double getALine_trat() const
Ensure that the Athena extensions are properly loaded.
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::ScalarBranch< short > & m_stEta
double getALine_rotz() const
double getALine_traz() const
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
double getALine_tras() const
MuonVal::VectorBranch< bool > & m_layMeasPhi
#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.
MuonVal::ScalarBranch< short > & m_stPhi
MuonVal::ScalarBranch< short > & m_stMultiLayer
MuonVal::ScalarBranch< float > & m_ALineRotZ
StatusCode initialize() override
MuonVal::ScalarBranch< float > & m_ALineRotT
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::ScalarBranch< float > & m_ALineTransZ
MuonVal::CoordSystemsBranch m_layerTrans
double getALine_rott() const
Gaudi::Property< std::vector< std::string > > m_excludeStat
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Transform3D localToGlobalTransf(const Identifier &id) const
const MuonStation * parentMuonStation() const
Eigen::Affine3d Transform3D
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::VectorBranch< uint8_t > & m_layNumber
MuonVal::MuonTesterTree m_tree
StatusCode execute() override
StatusCode finalize() override
StatusCode initialize(bool used=true)
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
MuonVal::ScalarBranch< float > & m_ALineRotS
int getStationIndex() const
#define ATH_MSG_WARNING(x)
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
void push_back(const Amg::Transform3D &trans)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonDetectorManager from the conditions store.
bool fill(const EventContext &ctx)
Fills the tree per call.
StatusCode write()
Finally write the TTree objects.
virtual int numberOfLayers(bool) const override final
number of layers in phi/eta projection
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
StatusCode dumpToTree(const EventContext &ctx, const CscReadoutElement *readoutEle)
double getALine_rots() const
MuonVal::ScalarBranch< float > & m_ALineTransT
int getStationPhi() const
int getStationEta() const
std::set< Identifier > m_testStations
Set of stations to be tested.