ATLAS Offline Software
sTgcRdoToPrepDataToolMT.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
14 
15 using namespace MuonGM;
16 using namespace Trk;
17 using namespace Muon;
18 
19 namespace {
20  std::atomic<bool> hitNegativeCharge{false};
21 }
22 //============================================================================
23 Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p)
24 : base_class(t,n,p){}
25 
26 
27 //============================================================================
29 {
30  ATH_MSG_DEBUG(" in initialize()");
31  ATH_CHECK( m_idHelperSvc.retrieve() );
32  // check if the initialization of the data container is success
33  ATH_CHECK(m_stgcPrepDataContainerKey.initialize());
34  ATH_CHECK(m_rdoContainerKey.initialize());
35  ATH_CHECK(m_muDetMgrKey.initialize());
36  ATH_CHECK(m_calibTool.retrieve());
37  ATH_CHECK(m_prdContainerCacheKey.initialize(!m_prdContainerCacheKey.key().empty()) );
38 
39  if (m_useNewGeo) {
40  ATH_CHECK(detStore()->retrieve(m_detMgrR4));
41  }
42 
43  ATH_CHECK(m_xAODStripKey.initialize(!m_xAODStripKey.empty()));
44  ATH_CHECK(m_xAODWireKey.initialize(!m_xAODWireKey.empty()));
45  ATH_CHECK(m_xAODPadKey.initialize(!m_xAODPadKey.empty()));
46  return StatusCode::SUCCESS;
47 }
48 
49 
50 //============================================================================
52  outputCache& xAODcontainers,
53  const STGC_RawDataCollection *rdoColl) const {
54 
55  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
56  const IdentifierHash hash = rdoColl->identifyHash();
57 
58  ATH_MSG_DEBUG(" ***************** Start of process STGC Collection with hash Id: " << hash);
59 
60  auto stgcPrepDataContainer = xAODcontainers.prd;
61  // check if the collection already exists, otherwise add it
62  if ( stgcPrepDataContainer->indexFindPtr(hash) != nullptr ) {
63  ATH_MSG_DEBUG("In processCollection: collection already contained in the sTGC PrepData container");
64  return StatusCode::FAILURE;
65 
66  }
67 
68  // Get write handle for this collection
69  sTgcPrepDataContainer::IDC_WriteHandle lock = stgcPrepDataContainer->getWriteHandle( hash );
70  // Check if collection already exists (via the cache, i.e. in online trigger mode)
71  if( lock.OnlineAndPresentInAnotherView() ) {
72  ATH_MSG_DEBUG("In processCollection: collection already available in the sTgc PrepData container (via cache)");
73  return StatusCode::SUCCESS;
74  }
75 
76  // Make the PRD collection (will be added to container later
77  std::unique_ptr<sTgcPrepDataCollection> prdColl = std::make_unique<sTgcPrepDataCollection>(hash);
78 
79  // set the offline identifier of the collection Id
80  IdContext context = id_helper.module_context();
81  Identifier moduleId;
82  int getId = id_helper.get_id(hash, moduleId, &context);
83  if ( getId != 0 ) {
84  ATH_MSG_ERROR("Could not convert the hash Id: " << hash << " to identifier");
85  } else {
86  prdColl->setIdentifier(moduleId);
87  }
88 
89  // vectors to hold PRDs decoded for this RDO collection
90  std::vector<sTgcPrepData> sTgcStripPrds;
91  std::vector<sTgcPrepData> sTgcWirePrds;
92  std::vector<sTgcPrepData> sTgcPadPrds;
93  sTgcStripPrds.reserve(rdoColl->size());
94  sTgcPadPrds.reserve(rdoColl->size());
95  sTgcWirePrds.reserve(rdoColl->size());
96 
97  // Count hits with negative charge, which indicates bad calibration
98 
99 
100  // MuonDetectorManager from the conditions store
101  SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDetMgr{m_muDetMgrKey,ctx};
102  if(!muonDetMgr.isValid()){
103  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
104  return StatusCode::FAILURE;
105  }
106  // convert the RDO collection to a PRD collection
107  for ( const STGC_RawData* rdo : * rdoColl) {
108 
109  ATH_MSG_DEBUG("Adding a new sTgc PrepRawData");
110 
111  const Identifier rdoId = rdo->identify();
112 
113  if (!m_idHelperSvc->issTgc(rdoId)) {
114  ATH_MSG_WARNING("The given Identifier "<<rdoId.get_compact()<<" ("<<m_idHelperSvc->toString(rdoId)<<") is no sTGC Identifier, continuing");
115  continue;
116  }
117 
118  std::vector<Identifier> rdoList;
119  rdoList.push_back(rdoId);
120 
121  // get the local and global positions
122  const MuonGM::sTgcReadoutElement* detEl = muonDetMgr->getsTgcReadoutElement(rdoId);
124 
125  int channelType = id_helper.channelType(rdoId);
126  if (channelType < 0 || channelType > 2) {
127  ATH_MSG_ERROR("Unknown sTGC channel type");
128  return StatusCode::FAILURE;
129  }
130 
131  bool getLocalPos = detEl->stripPosition(rdoId, localPos);
132  if ( !getLocalPos ) {
133  ATH_MSG_ERROR("Could not get the local strip position for "<<m_idHelperSvc->toString(rdoId));
134  return StatusCode::FAILURE;
135  }
136 
137  // get the resolution from strip width
138  // to be fixed: for now do not set the resolution, it will be added in the next update
139  const int gasGap = id_helper.gasGap(rdoId);
140  const int channel = id_helper.channel(rdoId);
141 
142  NSWCalib::CalibratedStrip calibStrip;
143  ATH_CHECK (m_calibTool->calibrateStrip(ctx, rdo, calibStrip));
144  int calibratedCharge = static_cast<int>(calibStrip.charge);
145  if (calibratedCharge < 0 && channelType == 1) { // we only want to protect against negatively charged strips and we should not lose wire or pad hits because of bad calibrations since charge does not matter for them in reco.
146  if (!hitNegativeCharge) {
147  ATH_MSG_WARNING("One sTGC RDO or more, such as one with pdo = "<<rdo->charge() << " counts, corresponds to a negative charge (" << calibratedCharge << "). Skipping these RDOs");
148  hitNegativeCharge = true;
149  }
150  continue;
151  }
152 
153  double width{0.};
154  if (channelType == sTgcIdHelper::sTgcChannelTypes::Pad) { // Pads
155  const MuonGM::MuonPadDesign* design = detEl->getPadDesign(rdoId);
156  if (!design) {
157  ATH_MSG_WARNING("Failed to get design for sTGC pad" );
158  } else {
159  width = design->channelWidth(localPos, true);
160  }
161  } else { // Strips and wires
162  const MuonGM::MuonChannelDesign* design = detEl->getDesign(rdoId);
163  if (!design) {
164  ATH_MSG_WARNING("Failed to get design for sTGC strip/wire" );
165  } else {
166  width = design->channelWidth();
167  }
168  }
169 
170  const double resolution = width/ std::sqrt(12.);
171  auto cov = Amg::MatrixX(1,1);
172  cov.setIdentity();
173  (cov)(0,0) = resolution*resolution;
174 
175  ATH_MSG_DEBUG("Adding a new STGC PRD, gasGap: " << gasGap << " channel: " << channel << " type: " << channelType << " resolution " << resolution );
176 
177  if(m_merge) {
178  std::vector<sTgcPrepData>& sTgcPrds = channelType == sTgcIdHelper::Pad ? sTgcPadPrds :
179  (channelType == sTgcIdHelper::Strip ? sTgcStripPrds : sTgcWirePrds);
180 
181  // check if the same RdoId is already present; keep the one with the smallest time
182  auto it = std::find_if(sTgcPrds.begin(), sTgcPrds.end(), [&rdoId](const sTgcPrepData& prd) {
183  return (prd.identify() == rdoId);
184  });
185  if (it == sTgcPrds.end()) {
186  sTgcPrds.emplace_back(rdoId, hash, std::move(localPos), std::move(rdoList), std::move(cov), detEl, calibratedCharge, calibStrip.time);
187  sTgcPrds.back().setAuthor(sTgcPrepData::Author::RdoToPrdConverter);
188  } else if (it->time() > calibStrip.time) {
189  *it = sTgcPrepData(rdoId, hash, std::move(localPos), std::move(rdoList), std::move(cov), detEl, calibratedCharge, calibStrip.time);
191  }
192 
193  // TODO - add merging for xAOD
194 
195  } else {
196  // if not merging just add the PRD to the collection
197  prdColl->push_back(std::make_unique<sTgcPrepData>(rdoId,
198  hash,
199  std::move(localPos),
200  std::move(rdoList),
201  std::move(cov),
202  detEl,
203  calibratedCharge,
204  calibStrip.time));
205  }
206  }
207 
208  if(m_merge) {
209  // merge strip prds that fire closeby channels (not clusterizing wires and pads)
210  std::vector<std::unique_ptr<Muon::sTgcPrepData>> sTgcStripClusters;
211  ATH_CHECK(m_clusterBuilderTool->getClusters(ctx, std::move(sTgcStripPrds), sTgcStripClusters)); // Clusterize strips
212 
213  for ( std::unique_ptr<Muon::sTgcPrepData>& it : sTgcStripClusters ) {
214  it->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
215  prdColl->push_back(std::move(it));
216  }
217  for ( Muon::sTgcPrepData& prd : sTgcWirePrds ) {
218  prd.setHashAndIndex(prdColl->identifyHash(), prdColl->size());
219  prdColl->push_back(std::make_unique<sTgcPrepData>(std::move(prd)));
220  }
221  for (Muon::sTgcPrepData& prd : sTgcPadPrds ) {
222  prd.setHashAndIndex(prdColl->identifyHash(), prdColl->size());
223  prdColl->push_back(std::make_unique<sTgcPrepData>(std::move(prd)));
224  }
225  }
226  const bool convertXAOD = !m_xAODPadKey.empty() || !m_xAODStripKey.empty() ||
227  !m_xAODWireKey.empty();
228 
229  if (convertXAOD) {
230  for (const Muon::sTgcPrepData* prd : *prdColl) {
231  const Identifier prdId = prd->identify();
232  const int gasGap = id_helper.gasGap(prdId);
233  const int channel = id_helper.channel(prdId);
234  const int chType = id_helper.channelType(prdId);
235  xAOD::sTgcMeasurement* outHit{nullptr};
236  ATH_MSG_VERBOSE("Convert "
237  <<m_idHelperSvc->toString(prdId)<<". "<<Amg::toString(prd->localPosition())
238  <<", cov: "<<prd->localCovariance()(0,0)
239  <<" global pos: "<<Amg::toString(prd->globalPosition()));
240  if (!m_xAODPadKey.empty() && chType == sTgcIdHelper::sTgcChannelTypes::Pad) {
241  outHit = xAODcontainers.pad->push_back(std::make_unique<xAOD::sTgcPadHit>());
243  lCov(0,0) = prd->localCovariance()(0,0);
245  // lCov(1,1) = prd->localCovariance()(1,1);
246  outHit->setMeasurement<2>(m_idHelperSvc->detElementHash(prdId),
247  xAOD::toStorage(prd->localPosition()),
248  std::move(lCov));
249  } else if (chType == sTgcIdHelper::sTgcChannelTypes::Wire && !m_xAODWireKey.empty()) {
250  outHit = xAODcontainers.wire->push_back(std::make_unique<xAOD::sTgcWireHit>());
251  } else if (chType == sTgcIdHelper::sTgcChannelTypes::Strip && !m_xAODStripKey.empty()) {
252  auto stripHit = xAODcontainers.strip->push_back(std::make_unique<xAOD::sTgcStripCluster>());
253  stripHit->setStripCharges(prd->stripCharges());
254  stripHit->setStripNumbers(prd->stripNumbers());
255  stripHit->setStripTimes(prd->stripTimes());
256  outHit = stripHit;
257  }
258  if (!outHit) {
259  continue;
260  }
261  if (chType != sTgcIdHelper::sTgcChannelTypes::Pad){
262  xAOD::MeasVector<1> lPos = prd->localPosition().x() * xAOD::MeasVector<1>::UnitX();
263  xAOD::MeasMatrix<1> lCov{};
264  lCov(0,0) = prd->localCovariance()(0,0);
265  outHit->setMeasurement<1>(m_idHelperSvc->detElementHash(prdId),
266  std::move(lPos),
267  std::move(lCov));
268 
269  }
270  outHit->setChannelNumber(channel);
271  outHit->setGasGap(gasGap);
272  outHit->setAuthor(prd->author());
273  outHit->setTime(prd->time());
274  outHit->setCharge(prd->charge());
275  outHit->setIdentifier(prdId.get_compact());
276  if (m_detMgrR4) {
277  outHit->setReadoutElement(m_detMgrR4->getsTgcReadoutElement(prdId));
278  }
279  }
280  }
281 
282 
283  // now add the collection to the container
284  ATH_CHECK( lock.addOrDelete(std::move( prdColl ) ) );
285  ATH_MSG_DEBUG("PRD hash " << hash << " has been moved to container");
286 
287  return StatusCode::SUCCESS;
288 }
289 
290 
291 //============================================================================
293 {
294  auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey, ctx);
295  if(rdoContainerHandle.isValid()) {
296  ATH_MSG_DEBUG("STGC_getRdoContainer success");
297  return rdoContainerHandle.cptr();
298  }
299  ATH_MSG_WARNING("Retrieval of STGC_RawDataContainer failed !");
300 
301  return nullptr;
302 }
303 
304 
305 //============================================================================
307  outputCache& xAODcontainers,
308  const std::vector<IdentifierHash>& idsToDecode) const
309 {
310  ATH_MSG_DEBUG("In processRDOContainer");
311  const STGC_RawDataContainer* rdoContainer = getRdoContainer(ctx);
312  if (!rdoContainer) return;
313 
314  // run in unseeded mode
315  for (const STGC_RawDataCollection* rdoColl : *rdoContainer) {
316  if (rdoColl->empty()) continue;
317  ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "STGC Hits");
318 
319  const IdentifierHash hash = rdoColl->identifyHash();
320 
321  // check if we actually want to decode this RDO collection
322  if(!idsToDecode.empty() and std::find(idsToDecode.begin(), idsToDecode.end(), hash)==idsToDecode.end()) {
323  ATH_MSG_DEBUG("Hash ID " << hash << " not in input list, ignore");
324  continue;
325  } else ATH_MSG_DEBUG("Going to decode " << hash);
326 
327  if(processCollection(ctx, xAODcontainers, rdoColl).isFailure()) {
328  ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
329  }
330  }
331 }
332 
333 // methods for ROB-based decoding
334 //============================================================================
336  const std::vector<IdentifierHash>& idVect) const {
337  ATH_MSG_DEBUG("Size of the input hash id vector: " << idVect.size());
338 
339  outputCache outCache = setupOutputContainers(ctx);
340  if (!outCache.isValid) return StatusCode::FAILURE;
341 
342  processRDOContainer(ctx, outCache, idVect);
343  return StatusCode::SUCCESS;
344 }
345 
346 
347 //============================================================================
348 StatusCode Muon::sTgcRdoToPrepDataToolMT::decode(const EventContext&, const std::vector<uint32_t>& ) const {
349  ATH_MSG_FATAL("ROB based decoding is not supported....");
350  return StatusCode::FAILURE;
351 }
353  return setupOutputContainers(ctx).isValid ? StatusCode::SUCCESS : StatusCode::FAILURE;
354 }
355 
356 
358  sTgcRdoToPrepDataToolMT::setupOutputContainers(const EventContext& ctx) const {
360  if (!m_xAODStripKey.empty()) {
362  if (!containers.strip.record(std::make_unique<xAOD::sTgcStripContainer>(),
363  std::make_unique<xAOD::sTgcStripAuxContainer>()).isSuccess()){
364  ATH_MSG_FATAL("Failed to record "<<m_xAODStripKey.fullKey());
365  return containers;
366  }
367  }
368  if (!m_xAODPadKey.empty()) {
370  if (!containers.pad.record(std::make_unique<xAOD::sTgcPadContainer>(),
371  std::make_unique<xAOD::sTgcPadAuxContainer>()).isSuccess()){
372  ATH_MSG_FATAL("Failed to record "<<m_xAODPadKey.fullKey());
373  return containers;
374  }
375  }
376  if (!m_xAODWireKey.empty()) {
378  if (!containers.wire.record(std::make_unique<xAOD::sTgcWireContainer>(),
379  std::make_unique<xAOD::sTgcWireAuxContainer>()).isSuccess()){
380  ATH_MSG_FATAL("Failed to record "<<m_xAODWireKey.fullKey());
381  return containers;
382  }
383  }
384 
386  if(m_prdContainerCacheKey.key().empty()) {
387  // No external cache, just record the container
388  const int hashMax = m_idHelperSvc->stgcIdHelper().module_hash_max();
389  if (!containers.prd.record(std::make_unique<Muon::sTgcPrepDataContainer>(hashMax)).isSuccess()){
390  ATH_MSG_FATAL("Faile to record "<<m_stgcPrepDataContainerKey.fullKey());
391  return containers;
392  }
393  } else {
396  if (!update.isValid()) {
397  ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
398  return containers;
399  }
400  if (!containers.prd.record(std::make_unique<Muon::sTgcPrepDataContainer>(update.ptr())).isSuccess()) {
401  ATH_MSG_FATAL("Failed to record "<<m_stgcPrepDataContainerKey.fullKey()
402  <<" from "<<m_prdContainerCacheKey.fullKey());
403  return containers;
404  }
405  }
406  containers.isValid = true;
407  return containers;
408 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonGM::MuonPadDesign
Parameters defining the design of the readout sTGC pads.
Definition: MuonPadDesign.h:40
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
NSWCalib::CalibratedStrip::time
double time
Definition: INSWCalibTool.h:22
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Muon::sTgcPrepData::Author::RdoToPrdConverter
@ RdoToPrdConverter
Muon::sTgcRdoToPrepDataToolMT::outputCache::pad
SG::WriteHandle< xAOD::sTgcPadContainer > pad
Definition: sTgcRdoToPrepDataToolMT.h:61
NSWCalib::CalibratedStrip::charge
double charge
Definition: INSWCalibTool.h:21
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
MuonIdHelper::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
Definition: MuonIdHelper.cxx:70
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
sTgcReadoutElement.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT
sTgcRdoToPrepDataToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: sTgcRdoToPrepDataToolMT.cxx:23
Muon::sTgcRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: sTgcRdoToPrepDataToolMT.h:79
IdentifiableContainerMT::IDC_WriteHandle::OnlineAndPresentInAnotherView
bool OnlineAndPresentInAnotherView()
This method is to avoid calling an expensive operation in the offline case.
Definition: IdentifiableContainerMT.h:64
skel.it
it
Definition: skel.GENtoEVGEN.py:396
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
Muon::sTgcRdoToPrepDataToolMT::outputCache::wire
SG::WriteHandle< xAOD::sTgcWireContainer > wire
Definition: sTgcRdoToPrepDataToolMT.h:60
Muon::STGC_RawDataContainer
Definition: STGC_RawDataContainer.h:18
MuonGM::sTgcReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:279
xAOD::toStorage
MeasVector< N > toStorage(const AmgVector(N)&amgVec)
Converts the double precision of the AmgVector into the floating point storage precision of the MeasV...
Definition: MeasurementDefs.h:68
sTgcIdHelper::Strip
@ Strip
Definition: sTgcIdHelper.h:190
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::sTgcRdoToPrepDataToolMT::outputCache::strip
SG::WriteHandle< xAOD::sTgcStripContainer > strip
Definition: sTgcRdoToPrepDataToolMT.h:59
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition: sTgcIdHelper.h:190
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
Muon::sTgcRdoToPrepDataToolMT::getRdoContainer
const STGC_RawDataContainer * getRdoContainer(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:292
Muon::MuonPrepDataCollection::setIdentifier
virtual void setIdentifier(Identifier id)
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
Muon::sTgcRdoToPrepDataToolMT::processCollection
StatusCode processCollection(const EventContext &ctx, outputCache &xAODcontainers, const STGC_RawDataCollection *rdoColl) const
Definition: sTgcRdoToPrepDataToolMT.cxx:51
Muon::STGC_RawDataCollection::identifyHash
const IdentifierHash & identifyHash() const
Definition: STGC_RawDataCollection.h:26
MuonGM::sTgcReadoutElement::stripPosition
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...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:321
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
Muon::sTgcRdoToPrepDataToolMT::setupOutputContainers
outputCache setupOutputContainers(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:358
sTgcWireAuxContainer.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::MuonPrepDataCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Muon::sTgcRdoToPrepDataToolMT::processRDOContainer
void processRDOContainer(const EventContext &ctx, outputCache &xAODcontainers, const std::vector< IdentifierHash > &idsToDecode) const
Definition: sTgcRdoToPrepDataToolMT.cxx:306
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IsoCloseByCorrectionTest.containers
containers
Associate the close-by pflow objects and the calorimeter clusters.
Definition: IsoCloseByCorrectionTest.py:82
Muon::STGC_RawData
Definition: STGC_RawData.h:14
beamspotman.n
n
Definition: beamspotman.py:731
Muon::sTgcRdoToPrepDataToolMT::outputCache::isValid
bool isValid
Definition: sTgcRdoToPrepDataToolMT.h:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
sTgcRdoToPrepDataToolMT.h
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
MuonDetectorManager.h
IdentifiableContainerMT::IDC_WriteHandle
Definition: IdentifiableContainerMT.h:34
Muon::sTgcRdoToPrepDataToolMT::m_prdContainerCacheKey
SG::UpdateHandleKey< sTgcPrepDataCollection_Cache > m_prdContainerCacheKey
This is the key for the cache for the sTGC PRD containers, can be empty.
Definition: sTgcRdoToPrepDataToolMT.h:90
sTgcPadAuxContainer.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::sTgcRdoToPrepDataToolMT::decode
StatusCode decode(const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
Decode RDO to PRD A vector of IdentifierHash are passed in, and the data corresponding to this list...
Definition: sTgcRdoToPrepDataToolMT.cxx:335
NSWCalib::CalibratedStrip
Definition: INSWCalibTool.h:20
MuonGM::MuonPadDesign::channelWidth
double channelWidth(const Amg::Vector2D &pos, bool measPhi, bool preciseMeas=false) const
calculate local channel width
Definition: MuonPadDesign.h:142
sTgcStripAuxContainer.h
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:52
Muon::sTgcRdoToPrepDataToolMT::m_xAODPadKey
SG::WriteHandleKey< xAOD::sTgcPadContainer > m_xAODPadKey
Definition: sTgcRdoToPrepDataToolMT.h:94
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::sTgcRdoToPrepDataToolMT::m_stgcPrepDataContainerKey
SG::WriteHandleKey< sTgcPrepDataContainer > m_stgcPrepDataContainerKey
Definition: sTgcRdoToPrepDataToolMT.h:83
sTgcMeasurement.h
SG::UpdateHandle
Definition: UpdateHandle.h:94
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
sTgcIdHelper
Definition: sTgcIdHelper.h:55
Muon::sTgcRdoToPrepDataToolMT::outputCache
Definition: sTgcRdoToPrepDataToolMT.h:58
IdentifiableContainerMT::IDC_WriteHandle::addOrDelete
StatusCode addOrDelete(std::unique_ptr< T > ptr)
Definition: IdentifiableContainerMT.h:56
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonGM::MuonChannelDesign
Definition: MuonChannelDesign.h:24
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Muon::sTgcRdoToPrepDataToolMT::outputCache::prd
SG::WriteHandle< Muon::sTgcPrepDataContainer > prd
Definition: sTgcRdoToPrepDataToolMT.h:62
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
sTgcIdHelper::Pad
@ Pad
Definition: sTgcIdHelper.h:190
Muon::sTgcRdoToPrepDataToolMT::initialize
virtual StatusCode initialize() override
Standard AthAlgTool initialize method.
Definition: sTgcRdoToPrepDataToolMT.cxx:28
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:731
Muon::STGC_RawDataCollection
Definition: STGC_RawDataCollection.h:18
xAOD::MeasMatrix
Eigen::Matrix< float, N, N > MeasMatrix
Definition: MeasurementDefs.h:54
MuonGM::sTgcReadoutElement::getPadDesign
const MuonPadDesign * getPadDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:285
Muon::sTgcRdoToPrepDataToolMT::m_xAODWireKey
SG::WriteHandleKey< xAOD::sTgcWireContainer > m_xAODWireKey
Definition: sTgcRdoToPrepDataToolMT.h:95
Muon::sTgcRdoToPrepDataToolMT::m_xAODStripKey
SG::WriteHandleKey< xAOD::sTgcStripContainer > m_xAODStripKey
Definition: sTgcRdoToPrepDataToolMT.h:93
MuonStation.h
MuonGM::MuonChannelDesign::channelWidth
double channelWidth() const
calculate local channel width
Definition: MuonChannelDesign.h:399
Muon::sTgcPrepData
Class to represent sTgc measurements.
Definition: sTgcPrepData.h:20
sTgcIdHelper::channelType
int channelType(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1022
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:21
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Muon::sTgcRdoToPrepDataToolMT::provideEmptyContainer
StatusCode provideEmptyContainer(const EventContext &ctx) const override
Definition: sTgcRdoToPrepDataToolMT.cxx:352
Identifier
Definition: IdentifierFieldParser.cxx:14