ATLAS Offline Software
MuonPatternCalibration.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 #include <set>
9 #include <sstream>
10 
20 namespace Muon {
21 
22 MuonPatternCalibration::MuonPatternCalibration(const std::string& t, const std::string& n, const IInterface* p)
23  : AthAlgTool(t, n, p) {
24  declareInterface<IMuonPatternCalibration>(this);
25 }
26 
29 {
30  ATH_MSG_VERBOSE("MuonPatternCalibration::Initializing");
31  ATH_CHECK(m_mdtCreator.retrieve());
32  ATH_CHECK(m_printer.retrieve());
33  ATH_CHECK(m_idHelperSvc.retrieve());
34  ATH_CHECK(m_clusterCreator.retrieve());
35  ATH_CHECK(m_keyRpc.initialize());
36  ATH_CHECK(m_keyTgc.initialize());
37  return StatusCode::SUCCESS;
38 }
39 
40 
41 
42 StatusCode MuonPatternCalibration::calibrate(const EventContext& ctx, const MuonPatternCombination& pattern, ROTsPerRegion& hitsPerRegion) const {
44  bool hasPhiMeasurements = checkForPhiMeasurements(pattern);
45  ATH_CHECK(createRegionMap(ctx, pattern, regionMap, hasPhiMeasurements));
46  // calibrate hits
47  calibrateRegionMap(regionMap, hitsPerRegion);
48  return StatusCode::SUCCESS;
49 }
50 
51 
53 
54  // simple division of MuonSpectrometer in regions using barrel/endcap seperation plus
55  // inner/middle/outer seperation
56  return m_idHelperSvc->stationIndex(id)* ( m_idHelperSvc->stationEta(id) > 0 ? 1 : -1);
57 }
58 
59 
60 bool
62 
63  for (const MuonPatternChamberIntersect& intersect : pat.chamberData()) {
64  for (const Trk::PrepRawData* prd : intersect.prepRawDataVec()){
65  const Identifier id = prd->identify();
67  if (!m_idHelperSvc->issTgc(id) &&
68  m_idHelperSvc->measuresPhi(id)) return true;
69  }
70  }
71  return false;
72 }
73 
76  RegionMap& regionMap, bool hasPhiMeasurements ) const
77 {
78  if (hasPhiMeasurements)
79  ATH_MSG_DEBUG("pattern has phi measurements using extrapolation to determine second coordinate");
80  else
81  ATH_MSG_DEBUG("No phi measurements using center tubes");
82 
83 
84  const Muon::TgcPrepDataContainer* tgcPrdCont{nullptr};
85  const Muon::RpcPrepDataContainer* rpcPrdCont{nullptr};
86  ATH_CHECK(loadFromStoreGate(ctx, m_keyRpc, rpcPrdCont));
87  ATH_CHECK(loadFromStoreGate(ctx, m_keyTgc, tgcPrdCont));
88 
89  for (const MuonPatternChamberIntersect& isect : pat.chamberData()) {
90 
91  if (isect.prepRawDataVec().empty()) continue;
92 
93  const Amg::Vector3D& patpose = isect.intersectPosition();
94  const Amg::Vector3D patdire = isect.intersectDirection().unit();
95 
101  std::map<int, EtaPhiHits> etaPhiHitsPerChamber;
102  std::set<Identifier> clusterIds;
103 
104 
105  const Trk::PrepRawData* prd = isect.prepRawDataVec().front();
106  const Identifier id = prd->identify();
107 
108  // apply cut on the opening angle between pattern and chamber phi
109  // do some magic to avoid problems at phi = 0 and 2*pi
110  double phiStart = patdire.phi();
111  double chPhi = prd->detectorElement()->center().phi();
112  constexpr double phiRange = 0.75 * M_PI;
113  constexpr double phiRange2 = 0.25 * M_PI;
114  double phiOffset = 0.;
115  if (phiStart > phiRange || phiStart < -phiRange)
116  phiOffset = 2 * M_PI;
117  else if (phiStart > -phiRange2 && phiStart < phiRange2)
118  phiOffset = M_PI;
119 
120  if (phiOffset > 1.5 * M_PI) {
121  if (phiStart < 0) phiStart += phiOffset;
122  if (chPhi < 0) chPhi += phiOffset;
123  } else if (phiOffset > 0.) {
124  phiStart += phiOffset;
125  chPhi += phiOffset;
126  }
127  double dphi = std::abs(phiStart - chPhi);
128 
129  if (dphi > m_phiAngleCut) {
130  ATH_MSG_DEBUG("Large angular phi difference between pattern and chamber, phi pattern "
131  << patdire.phi() << " phi chamber " << prd->detectorElement()->center().phi());
132  continue;
133  }
134 
135  // map to find duplicate hits in the chamber
136  std::map<Identifier, const MdtPrepData*> idMdtMap{};
137 
138  for (const Trk::PrepRawData* isect_prd : isect.prepRawDataVec()) {
139 
140  if (isect_prd->type(Trk::PrepRawDataType::MdtPrepData)) {
141  const MdtPrepData* mdt = dynamic_cast<const MdtPrepData*>(isect_prd);
142  if (m_removeDoubleMdtHits) {
143  const MdtPrepData*& previousMdt = idMdtMap[mdt->identify()];
144  if (!previousMdt || previousMdt->tdc() > mdt->tdc())
145  previousMdt = mdt;
146  else
147  continue;
148  }
149  insertMdt(*mdt, regionMap, patpose, patdire, hasPhiMeasurements);
150  continue;
151  }
152  else if (isect_prd->type(Trk::PrepRawDataType::MMPrepData) || isect_prd->type(Trk::PrepRawDataType::sTgcPrepData)){
153  continue;
154  }
155  const MuonCluster* clus = dynamic_cast<const MuonCluster*>(isect_prd);
156  if (!clus) continue;
157  const Identifier id = clus->identify();
158  if (!clusterIds.insert(id).second) continue;
159 
160  if (m_recoverTriggerHits) {
161  bool measuresPhi = m_idHelperSvc->measuresPhi(id);
162  int colHash = clus->collectionHash();
163  EtaPhiHits& hitsPerChamber = etaPhiHitsPerChamber[colHash];
164  if (measuresPhi)
165  ++hitsPerChamber.nphi;
166  else
167  ++hitsPerChamber.neta;
168  }
169  insertCluster(*clus, regionMap, patpose, patdire, hasPhiMeasurements);
170  }
171  for (const auto& [coll_hash, hits] : etaPhiHitsPerChamber) {
172  if ((hits.neta > 0 && hits.nphi == 0) || (hits.nphi > 0 && hits.neta == 0)) {
173  if (m_idHelperSvc->isRpc(id) && rpcPrdCont) {
174 
175  const Muon::RpcPrepDataCollection* prd_coll = rpcPrdCont->indexFindPtr(coll_hash);
176  if (!prd_coll) {
177  ATH_MSG_VERBOSE("RpcPrepDataCollection not found in container!!"<< m_keyRpc);
178  continue;
179  }
180  for (const Muon::RpcPrepData* rpc_prd : *prd_coll) {
181  if (!clusterIds.insert(rpc_prd->identify()).second) continue;
182  insertCluster(*rpc_prd, regionMap, patpose, patdire, hasPhiMeasurements);
183  }
184  } else if (m_idHelperSvc->isTgc(id) && tgcPrdCont) {
185  const Muon::TgcPrepDataCollection* prd_coll = tgcPrdCont->indexFindPtr(coll_hash);
186  if (!prd_coll) {
187  ATH_MSG_DEBUG("TgcPrepDataCollection not found in container!! "<< m_keyTgc);
188  continue;
189  }
190 
191  for (const Muon::TgcPrepData* tgc_prd : *prd_coll) {
192  if (!clusterIds.insert(tgc_prd->identify()).second) continue;
193  insertCluster(*tgc_prd, regionMap, patpose, patdire, hasPhiMeasurements);
194  }
195  }
196  }
197  }
198  }
199  return StatusCode::SUCCESS;
200 }
201 
202 void
204  const Amg::Vector3D& patdire, bool hasPhiMeasurements) const
205 {
206 
207  const Identifier id = clus.identify();
208  // check whether we are measuring phi or eta
209  const bool measuresPhi = m_idHelperSvc->measuresPhi(id);
210 
211  Amg::Vector3D globalpos = clus.globalPosition();
213 
214  if (hasPhiMeasurements) {
215  // if there is a phi measurement in the pattern use the global direction to calculate the intersect with
216  // measurement plane and use the intersect to calculate the position along the strip
217 
218  // calculate intersect pattern measurement plane
219  const Trk::Surface& surf = clus.detectorElement()->surface(id);
220  Amg::Vector3D planepostion = surf.center();
221  Amg::Vector3D planenormal = surf.normal();
222  double denom = patdire.dot(planenormal);
223  double u = (planenormal.dot(planepostion - patpose)) / (denom);
224  Amg::Vector3D piOnPlane = (patpose + u * patdire);
225 
226  // transform to local plane coordiantes
227  const Amg::Transform3D gToLocal = clus.detectorElement()->surface().transform().inverse();
228  Amg::Vector3D ilpos = gToLocal * piOnPlane;
229  Amg::Vector3D glpos = gToLocal * globalpos;
230 
231  // strip length
232  double striplen(0.);
233 
234  // projective strips
235  bool hasPointingPhiStrips = false;
236 
237  // detector specific stuff
238  const RpcPrepData* rpc = dynamic_cast<const RpcPrepData*>(&clus);
239  if (rpc) {
240  striplen = rpc->detectorElement()->StripLength(measuresPhi);
241  } else {
242  const TgcPrepData* tgc = dynamic_cast<const TgcPrepData*>(&clus);
243  if (!tgc) return;
244 
245  int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(id);
246  if (measuresPhi) {
247  hasPointingPhiStrips = true;
248  striplen = tgc->detectorElement()->stripLength();
249  } else {
250  int wire = m_idHelperSvc->tgcIdHelper().channel(id);
251  striplen = tgc->detectorElement()->gangCentralWidth(gasGap, wire);
252  }
253  }
254 
255  // set the position along the strip
256  if (!measuresPhi) {
257  glpos[0] = ilpos.x();
258  } else {
259  if (hasPointingPhiStrips) {
260  // do some special for tgcs
261  glpos[1] = ilpos.y();
262  } else {
263  glpos[1] = ilpos.y();
264  }
265  }
266 
267  // transform back to global coordinates
268  intersect = gToLocal.inverse() * glpos;
269  Amg::Vector3D dif = globalpos - intersect;
270  if ((intersect - piOnPlane).mag() > m_dropDistance || dif.mag() > 0.5 * striplen + m_dropDistance) {
271 
272  ATH_MSG_VERBOSE(">>>> extrapolated position far outside volume, dropping hit "
273  << m_idHelperSvc->toString(id) << ". dist along strip " << dif.mag() << " 1/2 strip len "
274  << 0.5 * striplen << " dist measurement plane " << (intersect - piOnPlane).mag());
275  return;
276  }
277  if (dif.mag() > 0.5 * striplen) {
278  Amg::Vector3D newpos = globalpos - dif * (0.5 * striplen / dif.mag());
279 
280  ATH_MSG_VERBOSE(">>>> extrapolated position outside volume, shifting position "
281  << m_idHelperSvc->toString(id) << ". position along strip " << dif.mag() << " 1/2 tube len "
282  << 0.5 * striplen << " dist To strip " << (intersect - piOnPlane).mag()
283  << ". dist to newpos " << (newpos - globalpos).mag() << " pos " << newpos);
284 
285  intersect = newpos;
286  }
287  } else {
288  // no phi measurements, use strip center
289  intersect = globalpos;
290  }
291 
292  // enter hit in map
293  int regionId = getRegionId(id);
294 
295  Region& region = regionMap[regionId];
296  if (!region.init) {
297  region.regionDir = patdire;
298  region.regionPos = patpose;
299  region.init = true;
300  }
301  region.triggerPrds.emplace_back(intersect, &clus);
302 }
303 
304 
305 void
307  const Amg::Vector3D& patdire, bool hasPhiMeasurements) const
308 {
309 
311  const Identifier& id = mdt.identify();
312 
313  const MuonGM::MdtReadoutElement* detEl = mdt.detectorElement();
314  const Amg::Vector3D& tubePos = mdt.globalPosition();
315 
316  if (hasPhiMeasurements) {
317  // if there is a phi measurement in the pattern use the global direction to calculate the intersect with the
318  // tube use the intersect to calculate the second coordinate
319 
320  const Amg::Transform3D amdbToGlobal = detEl->AmdbLRSToGlobalTransform();
321 
322 
323  // calculate intersect pattern measurement plane
324  const Amg::Vector3D& planepostion = tubePos;
325 
326  // always project on plane with normal in radial direction
327  Amg::Vector3D planenormal = m_idHelperSvc->mdtIdHelper().isBarrel(id)
328  ? amdbToGlobal.linear() * Amg::Vector3D(0., 0., 1.)
329  : amdbToGlobal.linear() * Amg::Vector3D(0., 1., 0.);
330 
331  double denom = patdire.dot(planenormal);
332  double u = (planenormal.dot(planepostion - patpose)) / (denom);
333  Amg::Vector3D piOnPlane = (patpose + u * patdire);
334 
335  Amg::Vector3D lpiOnPlane = amdbToGlobal.inverse() * piOnPlane;
336  Amg::Vector3D ltubePos = amdbToGlobal.inverse() * tubePos;
337 
338  intersect = amdbToGlobal * Amg::Vector3D(lpiOnPlane.x(), ltubePos.y(), ltubePos.z());
339 
340  Amg::Vector3D dif = tubePos - intersect;
341  double tubelen = detEl->getActiveTubeLength(m_idHelperSvc->mdtIdHelper().tubeLayer(id),
342  m_idHelperSvc->mdtIdHelper().tube(id));
343 
344  if (dif.mag() > 0.5 * tubelen) {
345  Amg::Vector3D newpos = tubePos - dif * (0.5 * tubelen / dif.mag());
346 
347  ATH_MSG_VERBOSE(">>>> extrapolated position outside volume, shifting position "
348  << m_idHelperSvc->toString(id) << ". position along strip " << dif.mag() << " 1/2 tube len "
349  << 0.5 * tubelen << " dist To Wire " << (piOnPlane - intersect).mag() << ". dist to newpos "
350  << (newpos - tubePos).mag() << " pos " << newpos);
351 
352  intersect = newpos;
353  }
354  } else {
355  // not phi measurement, use tube center
356  intersect = tubePos;
357  }
358 
359  // enter hit in map
360  Identifier elId = m_idHelperSvc->mdtIdHelper().elementID(id);
361 
362  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(elId);
363  int chFlag = elId.get_identifier32().get_compact();
364  if (m_doMultiAnalysis) {
365  if (m_idHelperSvc->isSmallChamber(id)) {
366  ATH_MSG_VERBOSE(" Small chamber " << m_idHelperSvc->toString(elId));
367  chFlag = 0;
368  if (chIndex == MuonStationIndex::BIS) {
369  int eta = m_idHelperSvc->stationEta(elId);
370  if (std::abs(eta) == 8) {
371  ATH_MSG_VERBOSE(" BIS8 chamber " << m_idHelperSvc->toString(elId));
372  chFlag = 3;
373  }
374  }
375  } else {
376  ATH_MSG_VERBOSE(" Large chamber " << m_idHelperSvc->toString(elId));
377  chFlag = 1;
378  if (chIndex == MuonStationIndex::BIL) {
379  std::string stName = m_idHelperSvc->chamberNameString(id);
380  if (stName[2] == 'R') {
381  ATH_MSG_VERBOSE(" BIR chamber " << m_idHelperSvc->toString(elId));
382  chFlag = 2;
383  }
384  } else if (chIndex == MuonStationIndex::BOL) {
385  if (std::abs(m_idHelperSvc->stationEta(id)) == 7) {
386  ATH_MSG_VERBOSE(" BOE chamber " << m_idHelperSvc->toString(elId));
387  chFlag = 4;
388  }
389  }
390  }
391  int phi = m_idHelperSvc->mdtIdHelper().stationPhi(id);
392 
393  chFlag += 10 * phi;
394  }
395  // use center tube for region assignment
396  int regionId = getRegionId(id);
397 
398  Region& region = regionMap[regionId];
399  if (!region.init) {
400  region.regionPos = patpose;
401  region.regionDir = patdire;
402  region.init = true;
403  }
404  region.mdtPrdsPerChamber[chFlag].emplace_back(intersect, &mdt);
405 }
406 
407 void
409 {
410 
411  ATH_MSG_INFO("Summarizing input");
412 
413  for (const auto& [detRegionId, chamberData] : regionMap) {
414  ATH_MSG_INFO("new region " << detRegionId << " trigger " << chamberData.triggerPrds.size() << " mdt ch "
415  << chamberData.mdtPrdsPerChamber.size());
416  if (!chamberData.triggerPrds.empty()) ATH_MSG_INFO("trigger hits " << chamberData.triggerPrds.size());
417 
418  for (const auto& [globalPos, prd] : chamberData.triggerPrds) {
419  ATH_MSG_INFO(" " << m_printer->print(*prd)<<" "<<globalPos);
420  }
421  for (const auto& [statId, MdtChamHits]: chamberData.mdtPrdsPerChamber) {
422  ATH_MSG_INFO("new MDT chamber with " << MdtChamHits.size() << " hits");
423  for (const auto& [globalPos, prd] : MdtChamHits) {
424  ATH_MSG_INFO(" " << m_printer->print(*prd)<<" "<<globalPos);
425  }
426  }
427  }
428 }
429 
430 void
432  IMuonPatternCalibration::ROTsPerRegion& hitsPerRegion) const {
433 
434 
435  for (const auto& [regionId, regMeasColl] : regionMap) {
436 
437  ROTRegion rotRegion{};
438  rotRegion.regionId = regionId;
439  rotRegion.regionPos = regMeasColl.regionPos;
440  rotRegion.regionDir = regMeasColl.regionDir;
441 
442  for (const auto& [globalPos, prd] : regMeasColl.triggerPrds) {
443  std::unique_ptr<const MuonClusterOnTrack> cluster{m_clusterCreator->createRIO_OnTrack(*prd, globalPos)};
444  if (!cluster) continue;
445  rotRegion.push_back(std::move(cluster));
446  }
447  for (const auto& [regionId, MdtsWithIsect] :regMeasColl.mdtPrdsPerChamber) {
448  ATH_MSG_VERBOSE("Run over region id "<<regionId);
449  MdtVec mdtROTs{};
450  for (const auto& [globalPos, prd] : MdtsWithIsect) {
451  ATH_MSG_VERBOSE("Calibrate prd"<<m_idHelperSvc->toString(prd->identify())
452  <<",tdc: "<<prd->tdc()<<",adc: "<<prd->adc()<<" at "<<Amg::toString(globalPos));
453  const MdtDriftCircleOnTrack* mdt = m_mdtCreator->createRIO_OnTrack(*prd, globalPos, &globalPos);
454  if (!mdt) {
455  ATH_MSG_VERBOSE("Failed to calibrate " << m_idHelperSvc->toString(prd->identify()));
456  continue;
457  }
458  mdtROTs.push_back(mdt);
459  }
460  if (!mdtROTs.empty()) rotRegion.push_back(std::move(mdtROTs));
461  }
462  hitsPerRegion.push_back(std::move(rotRegion));
463  }
464 }
465 
466 template <class ContType> StatusCode MuonPatternCalibration::loadFromStoreGate(const EventContext& ctx,
468  const ContType* & cont_ptr) const {
469  if (key.empty()){
470  ATH_MSG_VERBOSE("Empty key given for "<<typeid(ContType).name()<<".");
471  cont_ptr = nullptr;
472  return StatusCode::SUCCESS;
473  }
474  SG::ReadHandle<ContType> readHandle{key, ctx};
475  if (!readHandle.isValid()) {
476  ATH_MSG_FATAL("Failed to retrieve "<<key.fullKey()<<" from store gate");
477  return StatusCode::FAILURE;
478  }
479  cont_ptr = readHandle.cptr();
480  return StatusCode::SUCCESS;
481 }
482 
483 } // namespace Muon
Muon::MuonStationIndex::BIS
@ BIS
Definition: MuonStationIndex.h:17
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
Muon::MuonPatternCalibration::Region::mdtPrdsPerChamber
RegionIdMap mdtPrdsPerChamber
Definition: MuonPatternCalibration.h:44
Muon::MuonPatternCalibration::m_removeDoubleMdtHits
Gaudi::Property< bool > m_removeDoubleMdtHits
Definition: MuonPatternCalibration.h:110
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
MdtReadoutElement.h
Muon::IMuonPatternCalibration::MdtVec
std::vector< const MdtDriftCircleOnTrack * > MdtVec
Definition: IMuonPatternCalibration.h:27
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
Muon::MuonPatternCalibration::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonPatternCalibration.h:99
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:145
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonPatternChamberIntersect.h
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonGM::RpcReadoutElement::StripLength
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
Trk::PrepRawDataType::MMPrepData
@ MMPrepData
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Muon::MuonPatternCalibration::calibrate
StatusCode calibrate(const EventContext &ctx, const MuonPatternCombination &pat, ROTsPerRegion &hitsPerRegion) const override
Definition: MuonPatternCalibration.cxx:42
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Muon::MuonPatternCalibration::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonPatternCalibration.h:93
Muon::MuonPatternCalibration::Region::regionPos
Amg::Vector3D regionPos
Definition: MuonPatternCalibration.h:41
IRIO_OnTrackCreator.h
Muon::MuonCluster::collectionHash
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the PRD collection in the PRD container.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:104
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Muon::MuonPatternCalibration::getRegionId
int getRegionId(const Identifier &id) const override
Definition: MuonPatternCalibration.cxx:52
MuonGM::TgcReadoutElement::stripLength
double stripLength() const
Returns the length of each strip which is equal to the height of the chamber.
Muon::TgcPrepData::detectorElement
virtual const MuonGM::TgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD The pointer will be zero if the det el is not ...
Definition: TgcPrepData.h:120
Muon::MuonPatternCalibration::initialize
virtual StatusCode initialize() override
Definition: MuonPatternCalibration.cxx:28
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Muon::MuonCluster::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Returns the global position of the measurement (calculated on the fly)
MuonPrepDataContainer.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Muon::MuonPatternCalibration::calibrateRegionMap
void calibrateRegionMap(const RegionMap &regionMap, IMuonPatternCalibration::ROTsPerRegion &hitsPerRegion) const
Definition: MuonPatternCalibration.cxx:431
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MuonPatternCalibration::m_recoverTriggerHits
Gaudi::Property< bool > m_recoverTriggerHits
Definition: MuonPatternCalibration.h:109
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
Muon::MuonPatternCalibration::Region
Definition: MuonPatternCalibration.h:39
Muon::MuonPatternCalibration::m_clusterCreator
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
Definition: MuonPatternCalibration.h:88
MuonPatternCalibration.h
Muon::IMuonPatternCalibration::ROTRegion
Definition: IMuonPatternCalibration.h:30
Muon::MuonPatternCalibration::RegionMap
std::map< int, Region > RegionMap
Definition: MuonPatternCalibration.h:49
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
EventPrimitivesToStringConverter.h
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
Muon::RpcPrepData
Class to represent RPC measurements.
Definition: RpcPrepData.h:35
Muon::RpcPrepData::detectorElement
virtual const MuonGM::RpcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
Definition: RpcPrepData.h:202
Muon::MuonPatternChamberIntersect
This class holds information needed for the Moore and MoMu pattern recognition for a muon chamber.
Definition: MuonPatternChamberIntersect.h:38
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
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
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
Muon::MuonPatternCalibration::Region::triggerPrds
ISPrdVec triggerPrds
Definition: MuonPatternCalibration.h:43
MuonGM::MdtReadoutElement::getActiveTubeLength
double getActiveTubeLength(const int tubeLayer, const int tube) const
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Muon::IMuonPatternCalibration::ROTRegion::regionId
int regionId
Definition: IMuonPatternCalibration.h:31
CscReadoutElement.h
Muon::MuonPatternCalibration::EtaPhiHits
Definition: MuonPatternCalibration.h:51
Muon::MdtPrepData::globalPosition
virtual const Amg::Vector3D & globalPosition() const
Returns the global position of the CENTER of the drift tube (i.e.
Definition: MdtPrepData.h:149
Trk::Surface::normal
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonPatternCalibration::insertCluster
void insertCluster(const MuonCluster &mdt, RegionMap &regionMap, const Amg::Vector3D &patpose, const Amg::Vector3D &patdire, bool hasPhiMeasurements) const
Definition: MuonPatternCalibration.cxx:203
Muon::MuonPatternCalibration::Region::regionDir
Amg::Vector3D regionDir
Definition: MuonPatternCalibration.h:42
MuonGM::TgcReadoutElement::gangCentralWidth
double gangCentralWidth(int gasGap, int gang) const
Returns the length of the central wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:92
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
compute_lumi.denom
denom
Definition: compute_lumi.py:76
Muon::MuonPatternCalibration::m_dropDistance
Gaudi::Property< double > m_dropDistance
Definition: MuonPatternCalibration.h:106
Muon::MuonPatternCalibration::checkForPhiMeasurements
bool checkForPhiMeasurements(const MuonPatternCombination &pat) const override
Definition: MuonPatternCalibration.cxx:61
Muon::IMuonPatternCalibration::ROTsPerRegion
std::vector< ROTRegion > ROTsPerRegion
Definition: IMuonPatternCalibration.h:55
Trk::PrepRawData
Definition: PrepRawData.h:62
dso-stats.pat
pat
Definition: dso-stats.py:39
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MuonPatternCalibration::loadFromStoreGate
StatusCode loadFromStoreGate(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, const ContType *&cont_ptr) const
load the container from storegate given a ReadHandleKey.
Definition: MuonPatternCalibration.cxx:466
Muon::MuonPatternCalibration::insertMdt
void insertMdt(const MdtPrepData &clus, RegionMap &regionMap, const Amg::Vector3D &patpose, const Amg::Vector3D &patdire, bool hasPhiMeasurements) const
Definition: MuonPatternCalibration.cxx:306
Muon::MuonPatternCalibration::MuonPatternCalibration
MuonPatternCalibration(const std::string &, const std::string &, const IInterface *)
Definition: MuonPatternCalibration.cxx:22
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:161
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::PrepRawDataType::sTgcPrepData
@ sTgcPrepData
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonPatternCalibration::m_phiAngleCut
Gaudi::Property< double > m_phiAngleCut
Definition: MuonPatternCalibration.h:107
MuonDetectorManager.h
Muon::MuonPatternCalibration::EtaPhiHits::nphi
unsigned int nphi
Definition: MuonPatternCalibration.h:54
Muon::MuonPatternCalibration::m_keyTgc
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_keyTgc
Definition: MuonPatternCalibration.h:113
Muon::MuonPatternCalibration::m_mdtCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: MuonPatternCalibration.h:83
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:302
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
Muon::MuonPatternCalibration::Region::init
bool init
Definition: MuonPatternCalibration.h:45
Muon::TgcPrepData
Class to represent TGC measurements.
Definition: TgcPrepData.h:32
Muon::MuonPatternCalibration::printRegionMap
void printRegionMap(const RegionMap &regionMap) const
Definition: MuonPatternCalibration.cxx:408
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonPatternCalibration::createRegionMap
StatusCode createRegionMap(const EventContext &ctx, const MuonPatternCombination &pat, RegionMap &regionMap, bool hasPhiMeasurements) const
Definition: MuonPatternCalibration.cxx:75
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
TgcReadoutElement.h
LArCellBinning.phiRange
phiRange
Filling Phi ranges.
Definition: LArCellBinning.py:107
Muon::MuonPatternCalibration::EtaPhiHits::neta
unsigned int neta
Definition: MuonPatternCalibration.h:53
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonCluster::detectorElement
virtual const MuonGM::MuonClusterReadoutElement * detectorElement() const override=0
Returns the detector element corresponding to this PRD.
Muon::MuonPatternCalibration::m_keyRpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_keyRpc
Definition: MuonPatternCalibration.h:112
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MuonPatternCalibration::m_doMultiAnalysis
Gaudi::Property< bool > m_doMultiAnalysis
Definition: MuonPatternCalibration.h:105
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
Muon::MuonStationIndex::BOL
@ BOL
Definition: MuonStationIndex.h:17
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:156
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
RpcReadoutElement.h