|
ATLAS Offline Software
|
Go to the documentation of this file.
21 return StatusCode::SUCCESS;
29 if (testCham.size() != 6) {
31 return StatusCode::FAILURE;
34 std::string statName = testCham.substr(0, 3);
35 unsigned int statEta =
std::atoi(testCham.substr(3, 1).c_str()) *
36 (testCham[4] ==
'A' ? 1 : -1);
37 unsigned int statPhi =
std::atoi(testCham.substr(5, 1).c_str());
39 const Identifier eleId = id_helper.elementID(statName, statEta, statPhi, is_valid);
41 ATH_MSG_FATAL(
"Failed to deduce a station name for " << testCham);
42 return StatusCode::FAILURE;
45 id_helper.detectorElement_end(),
48 return id_helper.elementID(id) == eleId;
53 std::copy(id_helper.detectorElement_begin(),
54 id_helper.detectorElement_end(),
57 std::stringstream sstr{};
61 ATH_MSG_INFO(
"Test only the following stations "<<std::endl<<sstr.str());
63 return StatusCode::SUCCESS;
66 const EventContext& ctx{Gaudi::Hive::currentContext()};
68 if (!detMgr.isValid()) {
71 return StatusCode::FAILURE;
84 <<
m_idHelperSvc->toStringDetEl(test_me) <<
". But got instead "
86 return StatusCode::FAILURE;
90 return StatusCode::SUCCESS;
99 int stML = id_helper.multilayer(readoutEle->
identify());
108 const Identifier genStripID =id_helper.channelID(stIndex, stEta, stPhi,
109 stML, 1, sTgcIdHelper::sTgcChannelTypes::Strip, 1);
110 const Identifier genPadID =id_helper.channelID(stIndex, stEta, stPhi,
111 stML, 1, sTgcIdHelper::sTgcChannelTypes::Pad, 1);
149 for (
int lay = 1; lay <=
numLayers; ++lay) {
150 const Identifier layWireID =id_helper.channelID(stIndex, stEta, stPhi,
151 stML, lay, sTgcIdHelper::sTgcChannelTypes::Wire, 1);
152 const Identifier layStripID =id_helper.channelID(stIndex, stEta, stPhi,
153 stML, lay, sTgcIdHelper::sTgcChannelTypes::Strip, 1);
154 const Identifier layPadID =id_helper.padID(stIndex, stEta, stPhi,
155 stML, lay, sTgcIdHelper::sTgcChannelTypes::Pad, 1, 1);
158 unsigned int numWires = readoutEle->
numberOfWires(layWireID);
162 double wirePitch = readoutEle->
wirePitch();
175 for (
int wireGroupIndex = 1; wireGroupIndex <= numWireGroups; ++wireGroupIndex) {
177 const Identifier wireGroupID =id_helper.channelID(stIndex, stEta, stPhi, stML, lay,
178 sTgcIdHelper::sTgcChannelTypes::Wire, wireGroupIndex,
isValid);
180 ATH_MSG_WARNING(
"The following wire group ID is not valid: " << wireGroupID);
191 if (wireGroupIndex != 1)
continue;
199 double stripPitch = readoutEle->
channelPitch(layStripID);
209 for (
int stripIndex = 1; stripIndex <= numStrips; ++stripIndex) {
211 const Identifier stripID =id_helper.channelID(stIndex, stEta, stPhi, stML, lay,
212 sTgcIdHelper::sTgcChannelTypes::Strip, stripIndex,
isValid);
227 if (stripIndex != 1)
continue;
234 unsigned int numPads = readoutEle->
numberOfPads(layPadID);
256 for(
int etaIndex = 1; etaIndex <= numPadEta; ++etaIndex) {
258 const Identifier padID =id_helper.padID(stIndex, stEta, stPhi, stML, lay,
265 std::array<Amg::Vector2D,4> localPadCorners{make_array<Amg::Vector2D, 4>(
Amg::Vector2D::Zero())};
266 std::array<Amg::Vector3D,4> globalPadCorners{make_array<Amg::Vector3D, 4>(
Amg::Vector3D::Zero())};
270 readoutEle->
padCorners(padID, localPadCorners);
294 if (etaIndex != 1 ||
phiIndex != 1)
continue;
302 return m_tree.
fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
MuonVal::ScalarBranch< float > & m_chamberHeight
bool padCorners(const Identifier &id, std::array< Amg::Vector2D, 4 > &corners) const
pad corners
MuonVal::VectorBranch< uint8_t > & m_padRotGasGap
MuonVal::ScalarBranch< float > & m_yCutout
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
MuonVal::ScalarBranch< uint > & m_numStrips
Strip dimensions.
MuonVal::ScalarBranch< float > & m_stripWidth
StatusCode execute() override
Ensure that the Athena extensions are properly loaded.
MuonVal::VectorBranch< float > & m_stripLengths
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::VectorBranch< uint8_t > & m_padGasGap
Eigen::Matrix< double, 2, 1 > Vector2D
MuonVal::VectorBranch< uint > & m_padPhi
MuonVal::ThreeVectorBranch m_globalPadCornerTL
MuonVal::TwoVectorBranch m_localWireGroupPos
MuonVal::ThreeVectorBranch m_globalPadCornerBL
MuonVal::VectorBranch< float > & m_firstPadHeight
MuonVal::ScalarBranch< short > & m_stEta
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::VectorBranch< float > & m_firstPadPhiDiv
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
MuonVal::MuonTesterTree m_tree
MuonVal::ScalarBranch< float > & m_stripPitch
int numberOfWires(const Identifier &id) const
Get the total number of wires (single wires) of a chamber.
MuonVal::ScalarBranch< float > & m_sChamberLength
Chamber Length for debug.
int numberOfPads(const Identifier &layerId) const
Get the number of pad per layer.
MuonVal::TwoVectorBranch m_localPadPos
#define ATH_MSG_VERBOSE(x)
MuonVal::VectorBranch< uint8_t > & m_wireGroupGasGap
std::set< Identifier > m_testStations
Set of stations to be tested.
MuonVal::VectorBranch< uint > & m_numPadPhi
double radialDistance
DT-2015-11-29 distance from the beamline to the center of the module.
MuonVal::VectorBranch< uint > & m_numWireGroups
MuonVal::VectorBranch< uint8_t > & m_stripGasGap
bool padGlobalCorners(const Identifier &id, std::array< Amg::Vector3D, 4 > &gcorners) const
pad global corners
MuonVal::ScalarBranch< float > & m_gasTck
MuonVal::VectorBranch< uint > & m_numPads
Pad dimensions.
MuonVal::TwoVectorBranch m_localPadCornerTR
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position - should be renamed to channel position If the strip number is outside the range of va...
int padNumber(const Amg::Vector2D &pos, const Identifier &id) const
pad number corresponding to local position
MuonVal::ThreeVectorBranch m_globalPadCornerBR
MuonVal::ScalarBranch< float > & m_lChamberLength
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
MuonVal::VectorBranch< int > & m_padNumber
MuonVal::ScalarBranch< std::string > & m_chamberDesign
MuonVal::VectorBranch< float > & m_padPhiShift
MuonVal::ScalarBranch< float > & m_beamlineRadius
MuonVal::ThreeVectorBranch m_globalPadPos
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
MuonVal::TwoVectorBranch m_localPadCornerTL
bool padGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
pad global position
MuonVal::CoordSystemsBranch m_wireGroupRot
Rotation matrix of the respective wireGroup layers.
::StatusCode StatusCode
StatusCode definition for legacy code.
MuonVal::VectorBranch< uint > & m_padEta
MuonVal::ScalarBranch< uint > & m_wireGroupWidth
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
MuonVal::ScalarBranch< float > & m_sPadLength
Eigen::Affine3d Transform3D
MuonVal::ScalarBranch< float > & m_wireWidth
MuonVal::VectorBranch< uint8_t > & m_wireGroupRotGasGap
GeoModelsTgcTest(const std::string &name, ISvcLocator *pSvcLocator)
Out copy_if(In first, const In &last, Out res, const Pred &p)
bool padPosition(const Identifier &id, Amg::Vector2D &pos) const
pad position
MuonVal::VectorBranch< float > & m_wireCutout
MuonVal::ScalarBranch< float > & m_sGapLength
GasGap Lengths for debug.
MuonVal::ThreeVectorBranch m_globalPadCornerTR
MuonVal::ScalarBranch< float > & m_anglePadPhi
MuonVal::VectorBranch< uint > & m_stripNum
double channelPitch(const Identifier &id) const
Channel pitch.
MuonVal::ScalarBranch< short > & m_stIndex
Identifier of the readout element.
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::ThreeVectorBranch m_globalWireGroupPos
MuonVal::ScalarBranch< float > & m_lPadLength
StatusCode finalize() override
MuonVal::CoordSystemsBranch m_padRot
Rotation matrix of the respective pad layers.
virtual int numberOfLayers(bool) const override final
number of layers in phi/eta projection
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
StatusCode initialize(bool used=true)
constexpr unsigned int numLayers()
StatusCode dumpToTree(const EventContext &ctx, const sTgcReadoutElement *readoutEle)
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< float > & m_gapHeight
MuonVal::ScalarBranch< short > & m_numLayers
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
MuonVal::VectorBranch< uint > & m_numPadEta
MuonVal::TwoVectorBranch m_localPadCornerBL
int getStationIndex() const
MuonVal::VectorBranch< float > & m_firstStripPitch
#define ATH_MSG_WARNING(x)
std::string getStationType() const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
void push_back(const Amg::Transform3D &trans)
MuonVal::ScalarBranch< short > & m_stPhi
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.
MuonVal::TwoVectorBranch m_hitPosition
MuonVal::VectorBranch< uint > & m_numWires
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
MuonVal::TwoVectorBranch m_localStripPos
MuonVal::ThreeVectorBranch m_globalStripPos
const MuonPadDesign * getPadDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
double wirePitch(int gas_gap=1) const
single wire pitch.
MuonVal::TwoVectorBranch m_localPadCornerBR
MuonVal::VectorBranch< uint8_t > & m_stripRotGasGap
MuonVal::ScalarBranch< float > & m_wirePitch
MuonVal::ScalarBranch< short > & m_stML
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
MuonVal::VectorBranch< uint > & m_firstWireGroupWidth
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
MuonVal::CoordSystemsBranch m_stripRot
Rotation matrix of the respective strip layers.
MuonVal::VectorBranch< uint8_t > & m_wireGroupNum
MuonVal::VectorBranch< float > & m_padHeight
int getStationPhi() const
int getStationEta() const
StatusCode initialize() override
MuonVal::ScalarBranch< float > & m_lGapLength