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 
13 
14 using namespace MuonGM;
15 using namespace Trk;
16 using namespace Muon;
17 
18 namespace {
19  std::atomic<bool> hitNegativeCharge{false};
20 }
21 //============================================================================
22 Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p)
23 : base_class(t,n,p){}
24 
25 
26 //============================================================================
28 {
29  ATH_MSG_DEBUG(" in initialize()");
30  ATH_CHECK( m_idHelperSvc.retrieve() );
31  // check if the initialization of the data container is success
32  ATH_CHECK(m_stgcPrepDataContainerKey.initialize());
33  ATH_CHECK(m_rdoContainerKey.initialize());
34  ATH_CHECK(m_muDetMgrKey.initialize());
35  ATH_CHECK(m_calibTool.retrieve());
36  ATH_CHECK(m_prdContainerCacheKey.initialize(!m_prdContainerCacheKey.key().empty()) );
37 
38  if (m_useNewGeo) {
39  ATH_CHECK(detStore()->retrieve(m_detMgrR4));
40  }
41 
42  ATH_CHECK(m_xAODStripKey.initialize(!m_xAODStripKey.empty()));
43  ATH_CHECK(m_xAODWireKey.initialize(!m_xAODWireKey.empty()));
44  ATH_CHECK(m_xAODPadKey.initialize(!m_xAODPadKey.empty()));
45  return StatusCode::SUCCESS;
46 }
47 
48 
49 //============================================================================
51  outputCache& xAODcontainers,
52  const STGC_RawDataCollection *rdoColl) const {
53 
54  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
55  const IdentifierHash hash = rdoColl->identifyHash();
56 
57  ATH_MSG_DEBUG(" ***************** Start of process STGC Collection with hash Id: " << hash);
58 
59  auto stgcPrepDataContainer = xAODcontainers.prd;
60  // check if the collection already exists, otherwise add it
61  if ( stgcPrepDataContainer->indexFindPtr(hash) != nullptr ) {
62  ATH_MSG_DEBUG("In processCollection: collection already contained in the sTGC PrepData container");
63  return StatusCode::FAILURE;
64 
65  }
66 
67  // Get write handle for this collection
68  sTgcPrepDataContainer::IDC_WriteHandle lock = stgcPrepDataContainer->getWriteHandle( hash );
69  // Check if collection already exists (via the cache, i.e. in online trigger mode)
70  if( lock.OnlineAndPresentInAnotherView() ) {
71  ATH_MSG_DEBUG("In processCollection: collection already available in the sTgc PrepData container (via cache)");
72  return StatusCode::SUCCESS;
73  }
74 
75  // Make the PRD collection (will be added to container later
76  std::unique_ptr<sTgcPrepDataCollection> prdColl = std::make_unique<sTgcPrepDataCollection>(hash);
77 
78  // set the offline identifier of the collection Id
79  IdContext context = id_helper.module_context();
80  Identifier moduleId;
81  int getId = id_helper.get_id(hash, moduleId, &context);
82  if ( getId != 0 ) {
83  ATH_MSG_ERROR("Could not convert the hash Id: " << hash << " to identifier");
84  } else {
85  prdColl->setIdentifier(moduleId);
86  }
87 
88  // vectors to hold PRDs decoded for this RDO collection
89  std::vector<sTgcPrepData> sTgcStripPrds;
90  std::vector<sTgcPrepData> sTgcWirePrds;
91  std::vector<sTgcPrepData> sTgcPadPrds;
92  sTgcStripPrds.reserve(rdoColl->size());
93  sTgcPadPrds.reserve(rdoColl->size());
94  sTgcWirePrds.reserve(rdoColl->size());
95 
96  // Count hits with negative charge, which indicates bad calibration
97 
98 
99  // MuonDetectorManager from the conditions store
100  SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDetMgr{m_muDetMgrKey,ctx};
101  if(!muonDetMgr.isValid()){
102  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
103  return StatusCode::FAILURE;
104  }
105  // convert the RDO collection to a PRD collection
106  for ( const STGC_RawData* rdo : * rdoColl) {
107 
108  ATH_MSG_DEBUG("Adding a new sTgc PrepRawData");
109 
110  const Identifier rdoId = rdo->identify();
111 
112  if (!m_idHelperSvc->issTgc(rdoId)) {
113  ATH_MSG_WARNING("The given Identifier "<<rdoId.get_compact()<<" ("<<m_idHelperSvc->toString(rdoId)<<") is no sTGC Identifier, continuing");
114  continue;
115  }
116 
117  std::vector<Identifier> rdoList;
118  rdoList.push_back(rdoId);
119 
120  // get the local and global positions
121  const MuonGM::sTgcReadoutElement* detEl = muonDetMgr->getsTgcReadoutElement(rdoId);
123 
124  int channelType = id_helper.channelType(rdoId);
125  if (channelType < 0 || channelType > 2) {
126  ATH_MSG_ERROR("Unknown sTGC channel type");
127  return StatusCode::FAILURE;
128  }
129 
130  bool getLocalPos = detEl->stripPosition(rdoId, localPos);
131  if ( !getLocalPos ) {
132  ATH_MSG_ERROR("Could not get the local strip position for "<<m_idHelperSvc->toString(rdoId));
133  return StatusCode::FAILURE;
134  }
135 
136  // get the resolution from strip width
137  // to be fixed: for now do not set the resolution, it will be added in the next update
138  const int gasGap = id_helper.gasGap(rdoId);
139  const int channel = id_helper.channel(rdoId);
140 
141  NSWCalib::CalibratedStrip calibStrip;
142  ATH_CHECK (m_calibTool->calibrateStrip(ctx, rdo, calibStrip));
143  int calibratedCharge = static_cast<int>(calibStrip.charge);
144  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.
145  if (!hitNegativeCharge) {
146  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");
147  hitNegativeCharge = true;
148  }
149  continue;
150  }
151 
152  double width{0.};
153  if (channelType == sTgcIdHelper::sTgcChannelTypes::Pad) { // Pads
154  const MuonGM::MuonPadDesign* design = detEl->getPadDesign(rdoId);
155  if (!design) {
156  ATH_MSG_WARNING("Failed to get design for sTGC pad" );
157  } else {
158  width = design->channelWidth(localPos, true);
159  }
160  } else { // Strips and wires
161  const MuonGM::MuonChannelDesign* design = detEl->getDesign(rdoId);
162  if (!design) {
163  ATH_MSG_WARNING("Failed to get design for sTGC strip/wire" );
164  } else {
165  width = design->channelWidth();
166  }
167  }
168 
169  const double resolution = width/ std::sqrt(12.);
170  auto cov = Amg::MatrixX(1,1);
171  cov.setIdentity();
172  (cov)(0,0) = resolution*resolution;
173 
174  ATH_MSG_DEBUG("Adding a new STGC PRD, gasGap: " << gasGap << " channel: " << channel << " type: " << channelType << " resolution " << resolution );
175 
176  if(m_merge) {
177  std::vector<sTgcPrepData>& sTgcPrds = channelType == sTgcIdHelper::Pad ? sTgcPadPrds :
178  (channelType == sTgcIdHelper::Strip ? sTgcStripPrds : sTgcWirePrds);
179 
180  // check if the same RdoId is already present; keep the one with the smallest time
181  auto it = std::find_if(sTgcPrds.begin(), sTgcPrds.end(), [&rdoId](const sTgcPrepData& prd) {
182  return (prd.identify() == rdoId);
183  });
184  if (it == sTgcPrds.end()) {
185  sTgcPrds.emplace_back(rdoId, hash, std::move(localPos), std::move(rdoList), std::move(cov), detEl, calibratedCharge, calibStrip.time);
186  sTgcPrds.back().setAuthor(sTgcPrepData::Author::RdoToPrdConverter);
187  } else if (it->time() > calibStrip.time) {
188  *it = sTgcPrepData(rdoId, hash, std::move(localPos), std::move(rdoList), std::move(cov), detEl, calibratedCharge, calibStrip.time);
190  }
191 
192  // TODO - add merging for xAOD
193 
194  } else {
195  // if not merging just add the PRD to the collection
196  prdColl->push_back(std::make_unique<sTgcPrepData>(rdoId,
197  hash,
198  std::move(localPos),
199  std::move(rdoList),
200  std::move(cov),
201  detEl,
202  calibratedCharge,
203  calibStrip.time));
204  }
205  }
206 
207  if(m_merge) {
208  // merge strip prds that fire closeby channels (not clusterizing wires and pads)
209  std::vector<std::unique_ptr<Muon::sTgcPrepData>> sTgcStripClusters;
210  ATH_CHECK(m_clusterBuilderTool->getClusters(ctx, std::move(sTgcStripPrds), sTgcStripClusters)); // Clusterize strips
211 
212  for ( std::unique_ptr<Muon::sTgcPrepData>& it : sTgcStripClusters ) {
213  it->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
214  prdColl->push_back(std::move(it));
215  }
216  for ( Muon::sTgcPrepData& prd : sTgcWirePrds ) {
217  prd.setHashAndIndex(prdColl->identifyHash(), prdColl->size());
218  prdColl->push_back(std::make_unique<sTgcPrepData>(std::move(prd)));
219  }
220  for (Muon::sTgcPrepData& prd : sTgcPadPrds ) {
221  prd.setHashAndIndex(prdColl->identifyHash(), prdColl->size());
222  prdColl->push_back(std::make_unique<sTgcPrepData>(std::move(prd)));
223  }
224  }
225  const bool convertXAOD = !m_xAODPadKey.empty() || !m_xAODStripKey.empty() ||
226  !m_xAODWireKey.empty();
227 
228  if (convertXAOD) {
229  for (const Muon::sTgcPrepData* prd : *prdColl) {
230  const Identifier prdId = prd->identify();
231  const int gasGap = id_helper.gasGap(prdId);
232  const int channel = id_helper.channel(prdId);
233  const int chType = id_helper.channelType(prdId);
234  xAOD::sTgcMeasurement* outHit{nullptr};
235  ATH_MSG_VERBOSE("Convert "
236  <<m_idHelperSvc->toString(prdId)<<". "<<Amg::toString(prd->localPosition())
237  <<", cov: "<<prd->localCovariance()(0,0)
238  <<" global pos: "<<Amg::toString(prd->globalPosition()));
239  if (!m_xAODPadKey.empty() && chType == sTgcIdHelper::sTgcChannelTypes::Pad) {
240  outHit = xAODcontainers.pad->push_back(std::make_unique<xAOD::sTgcPadHit>());
242  lCov(0,0) = prd->localCovariance()(0,0);
244  // lCov(1,1) = prd->localCovariance()(1,1);
245  outHit->setMeasurement<2>(m_idHelperSvc->detElementHash(prdId),
246  xAOD::toStorage(prd->localPosition()),
247  std::move(lCov));
248  } else if (chType == sTgcIdHelper::sTgcChannelTypes::Wire && !m_xAODWireKey.empty()) {
249  outHit = xAODcontainers.wire->push_back(std::make_unique<xAOD::sTgcWireHit>());
250  } else if (chType == sTgcIdHelper::sTgcChannelTypes::Strip && !m_xAODStripKey.empty()) {
251  auto stripHit = xAODcontainers.strip->push_back(std::make_unique<xAOD::sTgcStripCluster>());
252  stripHit->setStripCharges(prd->stripCharges());
253  stripHit->setStripNumbers(prd->stripNumbers());
254  stripHit->setStripTimes(prd->stripTimes());
255  outHit = stripHit;
256  }
257  if (!outHit) {
258  continue;
259  }
260  if (chType != sTgcIdHelper::sTgcChannelTypes::Pad){
261  xAOD::MeasVector<1> lPos = prd->localPosition().x() * xAOD::MeasVector<1>::UnitX();
262  xAOD::MeasMatrix<1> lCov{};
263  lCov(0,0) = prd->localCovariance()(0,0);
264  outHit->setMeasurement<1>(m_idHelperSvc->detElementHash(prdId),
265  std::move(lPos),
266  std::move(lCov));
267 
268  }
269  outHit->setChannelNumber(channel);
270  outHit->setGasGap(gasGap);
271  outHit->setAuthor(prd->author());
272  outHit->setTime(prd->time());
273  outHit->setCharge(prd->charge());
274  outHit->setIdentifier(prdId.get_compact());
275  if (m_detMgrR4) {
276  outHit->setReadoutElement(m_detMgrR4->getsTgcReadoutElement(prdId));
277  }
278  }
279  }
280 
281 
282  // now add the collection to the container
283  ATH_CHECK( lock.addOrDelete(std::move( prdColl ) ) );
284  ATH_MSG_DEBUG("PRD hash " << hash << " has been moved to container");
285 
286  return StatusCode::SUCCESS;
287 }
288 
289 
290 //============================================================================
292 {
293  auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey, ctx);
294  if(rdoContainerHandle.isValid()) {
295  ATH_MSG_DEBUG("STGC_getRdoContainer success");
296  return rdoContainerHandle.cptr();
297  }
298  ATH_MSG_WARNING("Retrieval of STGC_RawDataContainer failed !");
299 
300  return nullptr;
301 }
302 
303 
304 //============================================================================
306  outputCache& xAODcontainers,
307  const std::vector<IdentifierHash>& idsToDecode) const
308 {
309  ATH_MSG_DEBUG("In processRDOContainer");
310  const STGC_RawDataContainer* rdoContainer = getRdoContainer(ctx);
311  if (!rdoContainer) return;
312 
313  // run in unseeded mode
314  for (const STGC_RawDataCollection* rdoColl : *rdoContainer) {
315  if (rdoColl->empty()) continue;
316  ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "STGC Hits");
317 
318  const IdentifierHash hash = rdoColl->identifyHash();
319 
320  // check if we actually want to decode this RDO collection
321  if(!idsToDecode.empty() and std::find(idsToDecode.begin(), idsToDecode.end(), hash)==idsToDecode.end()) {
322  ATH_MSG_DEBUG("Hash ID " << hash << " not in input list, ignore");
323  continue;
324  } else ATH_MSG_DEBUG("Going to decode " << hash);
325 
326  if(processCollection(ctx, xAODcontainers, rdoColl).isFailure()) {
327  ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
328  }
329  }
330 }
331 
332 // methods for ROB-based decoding
333 //============================================================================
335  const std::vector<IdentifierHash>& idVect) const {
336  ATH_MSG_DEBUG("Size of the input hash id vector: " << idVect.size());
337 
338  outputCache outCache = setupOutputContainers(ctx);
339  if (!outCache.isValid) return StatusCode::FAILURE;
340 
341  processRDOContainer(ctx, outCache, idVect);
342  return StatusCode::SUCCESS;
343 }
344 
345 
346 //============================================================================
347 StatusCode Muon::sTgcRdoToPrepDataToolMT::decode(const EventContext&, const std::vector<uint32_t>& ) const {
348  ATH_MSG_FATAL("ROB based decoding is not supported....");
349  return StatusCode::FAILURE;
350 }
352  return setupOutputContainers(ctx).isValid ? StatusCode::SUCCESS : StatusCode::FAILURE;
353 }
354 
355 
357  sTgcRdoToPrepDataToolMT::setupOutputContainers(const EventContext& ctx) const {
359  if (!m_xAODStripKey.empty()) {
361  if (!containers.strip.record(std::make_unique<xAOD::sTgcStripContainer>(),
362  std::make_unique<xAOD::sTgcStripAuxContainer>()).isSuccess()){
363  ATH_MSG_FATAL("Failed to record "<<m_xAODStripKey.fullKey());
364  return containers;
365  }
366  }
367  if (!m_xAODPadKey.empty()) {
369  if (!containers.pad.record(std::make_unique<xAOD::sTgcPadContainer>(),
370  std::make_unique<xAOD::sTgcPadAuxContainer>()).isSuccess()){
371  ATH_MSG_FATAL("Failed to record "<<m_xAODPadKey.fullKey());
372  return containers;
373  }
374  }
375  if (!m_xAODWireKey.empty()) {
377  if (!containers.wire.record(std::make_unique<xAOD::sTgcWireContainer>(),
378  std::make_unique<xAOD::sTgcWireAuxContainer>()).isSuccess()){
379  ATH_MSG_FATAL("Failed to record "<<m_xAODWireKey.fullKey());
380  return containers;
381  }
382  }
383 
385  if(m_prdContainerCacheKey.key().empty()) {
386  // No external cache, just record the container
387  const int hashMax = m_idHelperSvc->stgcIdHelper().module_hash_max();
388  if (!containers.prd.record(std::make_unique<Muon::sTgcPrepDataContainer>(hashMax)).isSuccess()){
389  ATH_MSG_FATAL("Faile to record "<<m_stgcPrepDataContainerKey.fullKey());
390  return containers;
391  }
392  } else {
395  if (!update.isValid()) {
396  ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
397  return containers;
398  }
399  if (!containers.prd.record(std::make_unique<Muon::sTgcPrepDataContainer>(update.ptr())).isSuccess()) {
400  ATH_MSG_FATAL("Failed to record "<<m_stgcPrepDataContainerKey.fullKey()
401  <<" from "<<m_prdContainerCacheKey.fullKey());
402  return containers;
403  }
404  }
405  containers.isValid = true;
406  return containers;
407 }
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:29
Muon::sTgcPrepData::Author::RdoToPrdConverter
@ RdoToPrdConverter
Muon::sTgcRdoToPrepDataToolMT::outputCache::pad
SG::WriteHandle< xAOD::sTgcPadContainer > pad
Definition: sTgcRdoToPrepDataToolMT.h:58
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
NSWCalib::CalibratedStrip::charge
double charge
Definition: INSWCalibTool.h:21
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
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:69
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:22
Muon::sTgcRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: sTgcRdoToPrepDataToolMT.h:76
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:423
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
Muon::sTgcRdoToPrepDataToolMT::outputCache::wire
SG::WriteHandle< xAOD::sTgcWireContainer > wire
Definition: sTgcRdoToPrepDataToolMT.h:57
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:281
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:56
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition: sTgcIdHelper.h:190
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::sTgcRdoToPrepDataToolMT::getRdoContainer
const STGC_RawDataContainer * getRdoContainer(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:291
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:50
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:323
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
Muon::sTgcRdoToPrepDataToolMT::setupOutputContainers
outputCache setupOutputContainers(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:357
sTgcWireAuxContainer.h
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:305
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:60
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:28
sTgcRdoToPrepDataToolMT.h
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
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:87
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:334
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:91
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:80
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:55
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
dqt_zlumi_pandas.update
update
Definition: dqt_zlumi_pandas.py:42
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:59
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:27
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:735
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:287
Muon::sTgcRdoToPrepDataToolMT::m_xAODWireKey
SG::WriteHandleKey< xAOD::sTgcWireContainer > m_xAODWireKey
Definition: sTgcRdoToPrepDataToolMT.h:92
Muon::sTgcRdoToPrepDataToolMT::m_xAODStripKey
SG::WriteHandleKey< xAOD::sTgcStripContainer > m_xAODStripKey
Definition: sTgcRdoToPrepDataToolMT.h:90
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
class IdContext
Definition: IdContext.h:34
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:19
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Muon::sTgcRdoToPrepDataToolMT::provideEmptyContainer
StatusCode provideEmptyContainer(const EventContext &ctx) const override
Definition: sTgcRdoToPrepDataToolMT.cxx:351