|
ATLAS Offline Software
|
Go to the documentation of this file.
21 return StatusCode::SUCCESS;
32 if (testCham.size() != 6) {
34 return StatusCode::FAILURE;
37 std::string statName = testCham.substr(0, 3);
38 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
39 (testCham[4] ==
'A' ? 1 : -1);
40 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
42 const Identifier eleId = id_helper.elementID(statName, statEta, statPhi, is_valid);
44 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
45 return StatusCode::FAILURE;
48 id_helper.detectorElement_end(),
51 return id_helper.elementID(id) == eleId;
57 id_helper.detectorElement_end());
59 std::stringstream sstr{};
63 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
65 return StatusCode::SUCCESS;
69 const EventContext& ctx{Gaudi::Hive::currentContext()};
71 if (!detMgr.isValid()) {
74 return StatusCode::FAILURE;
89 <<
m_idHelperSvc->toStringDetEl(test_me) <<
". But got instead "
91 return StatusCode::FAILURE;
94 const Identifier layerId = id_helper.channelID(test_me, id_helper.multilayer(test_me),
gasGap, 1024);
100 const Identifier strip_id = id_helper.channelID(test_me, id_helper.multilayer(test_me),
110 const double stripLength = 0.49 * reElement->
stripLength(strip_id);
111 if (design.channelNumber(locPos) !=
channel ||
112 design.channelNumber(locPos + stripLength *Amg::Vector2D::UnitY()) !=
channel ||
113 design.channelNumber(locPos - stripLength *Amg::Vector2D::UnitY()) !=
channel ){
114 ATH_MSG_FATAL(
"Conversion of channel -> strip -> channel failed for "
117 <<
", backward channel: "<<design.channelNumber(locPos));
118 return StatusCode::FAILURE;
125 return StatusCode::SUCCESS;
137 const int multilayer = id_helper.
multilayer(detElId);
145 for (
int gasgap = 1; gasgap <= 4; ++gasgap) {
153 bool is_valid{
false};
156 if (!is_valid)
continue;
175 design.rightEdge(
channel, l_right);
197 if (
channel != fStrip)
continue;
206 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
MuonVal::ScalarBranch< float > & m_ActiveHeightR
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Ensure that the Athena extensions are properly loaded.
StatusCode execute() override
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like MM<L or S><1 or 2><A/C><layer> Example string MML1A6 ,...
MuonVal::MuonTesterTree m_tree
MuonVal::ScalarBranch< float > & m_ActiveWidthS
StatusCode init(OWNER *instance)
Initialize method.
StatusCode initialize() override
MuonVal::VectorBranch< float > & m_stripActiveLengthRight
Eigen::Matrix< double, 2, 1 > Vector2D
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
MuonVal::VectorBranch< uint > & m_channel
MuonVal::TwoVectorBranch m_locStripCenter
std::set< Identifier > m_testStations
Set of stations to be tested.
MuonVal::VectorBranch< float > & m_stripActiveLength
int stationName(const Identifier &id) const
GeoModelMmTest(const std::string &name, ISvcLocator *pSvcLocator)
#define ATH_MSG_VERBOSE(x)
MuonVal::ScalarBranch< short > & m_stationEta
double stripActiveLength(const Identifier &id) const
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
MuonVal::ScalarBranch< short > & m_stationPhi
MuonVal::ThreeVectorBranch m_stripRightEdge
int multilayer(const Identifier &id) const
MuonVal::VectorBranch< uint8_t > & m_stripRotGasGap
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
double stripActiveLengthRight(const Identifier &id) const
MuonVal::ThreeVectorBranch m_stripCenter
MuonVal::VectorBranch< short > & m_gasGap
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
MuonVal::ScalarBranch< float > & m_ActiveWidthL
::StatusCode StatusCode
StatusCode definition for legacy code.
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
MuonVal::ThreeVectorBranch m_stripLeftEdge
Out copy_if(In first, const In &last, Out res, const Pred &p)
MuonVal::ScalarBranch< unsigned short > & m_stationIndex
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::ScalarBranch< float > & m_stStripPitch
MuonVal::TwoVectorBranch m_firstStripPos
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
MuonVal::CoordSystemsBranch m_stripRot
Rotation matrix of the respective strip layers.
StatusCode initialize(bool used=true)
const std::array< int, 4 > & getReadoutSide() const
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonDetectorManager from the conditions store.
int getStationIndex() const
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
int numberOfMissingBottomStrips(const Identifier &layerId) const
double stripLength(const Identifier &id) const
strip length Wrappers to MuonChannelDesign::channelLength() taking into account the passivated width
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
MuonVal::ScalarBranch< short > & m_multilayer
void push_back(const Amg::Transform3D &trans)
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
bool fill(const EventContext &ctx)
Fills the tree per call.
StatusCode write()
Finally write the TTree objects.
StatusCode finalize() override
int numberOfMissingTopStrips(const Identifier &layerId) const
Number of missing bottom and top strips (not read out)
MuonVal::VectorBranch< unsigned > & m_readoutFirstStrip
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 MuonGM::MMReadoutElement *detEl)
MuonVal::ScalarBranch< int > & m_stationName
MuonVal::VectorBranch< int > & m_readoutSide
MuonVal::VectorBranch< float > & m_stripLength
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
MuonVal::VectorBranch< float > & m_stripActiveLengthLeft
int getStationPhi() const
int getStationEta() const
bool leftEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the left edge of the strip.
MuonVal::VectorBranch< bool > & m_isStereo
double stripActiveLengthLeft(const Identifier &id) const