24 declareInterface<IDataRetriever>(
this);
36 return StatusCode::SUCCESS;
49 for (
const auto stgcCollection : *stgcContainer){
50 ndata += stgcCollection->size();
56 DataVect lengthVec; lengthVec.reserve(ndata);
57 DataVect swidthVec; swidthVec.reserve(ndata);
58 DataVect lwidthVec; lwidthVec.reserve(ndata);
59 DataVect idVec; idVec.reserve(ndata);
60 DataVect identifierVec; identifierVec.reserve(ndata);
61 DataVect barcode; barcode.reserve(ndata);
63 for (
const auto stgcCollection : *stgcContainer){
64 for (
const auto data : *stgcCollection){
76 double shortWidth=0, longWidth=0,
length=0;
86 shortWidth = (corners.at(1)-corners.at(0)).norm();
87 longWidth = (corners.at(3)-corners.at(2)).norm();
89 }
else if (
m_idHelperSvc->stgcIdHelper().channelType(
id)==1) {
93 longWidth = shortWidth;
103 double fulllength = design->
xSize();
105 if (std::abs(locY) > 0.5 * design->
minYSize()) {
107 length = (0.5 * design->
maxYSize() - std::abs(locY)) / dY * fulllength;
108 if (std::abs(locY) > 873) {
118 longWidth = shortWidth;
121 x.push_back(
DataType(globalPos.x()/CLHEP::cm));
122 y.push_back(
DataType(globalPos.y()/CLHEP::cm));
123 z.push_back(
DataType(globalPos.z()/CLHEP::cm));
124 swidthVec.push_back(
DataType(shortWidth/CLHEP::cm));
125 lwidthVec.push_back(
DataType(longWidth/CLHEP::cm));
128 idVec.push_back(
DataType(
id.get_compact() ));
138 myDataMap[
"length"] = lengthVec;
139 myDataMap[
"swidth"] = swidthVec;
140 myDataMap[
"lwidth"] = lwidthVec;
141 myDataMap[
"identifier"] = identifierVec;
142 myDataMap[
"id"] = idVec;
143 myDataMap[
"barcode"] = barcode;
151 std::string emptyStr=
"";
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_sgKey
The storegate key for the STGC collection.
virtual std::string dataTypeName() const
Return the name of the data type.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode initialize()
Default AthAlgTool methods.
sTgcPrepDataRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
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...
bool padCorners(const Identifier &id, std::array< Amg::Vector2D, 4 > &corners) const
pad corners
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
double channelPitch(const Identifier &id) const
Channel pitch.
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
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.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
std::string getFullID(Identifier id, const MdtIdHelper &mdtHelper)
Get the identifier string for an MDT ID with the sequence: Detector/StationName/StationEta/StationPhi...
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< std::string, DataVect > DataMap
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
double firstPos() const
Returns the position of the first strip along the x-axis.
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.