ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
MuonCalib::MuonCalibExtendedRawHits Class Reference

#include <MuonCalibExtendedRawHits.h>

Collaboration diagram for MuonCalib::MuonCalibExtendedRawHits:

Classes

struct  ExtendedChannelInfo
 
struct  ExtendedInfo
 
struct  MdtRegionInfo
 

Public Types

using MdtCalibRawHitPtr = MuonCalibRawHitCollection::MdtCalibRawHitPtr
 
using CscCalibRawHitPtr = MuonCalibRawHitCollection::CscCalibRawHitPtr
 
using RpcCalibRawHitPtr = MuonCalibRawHitCollection::RpcCalibRawHitPtr
 
using TgcCalibRawHitPtr = MuonCalibRawHitCollection::TgcCalibRawHitPtr
 
using ExtendedSegPtr = std::shared_ptr< MuonCalibExtendedSegment >
 
using ExtendedTrkPtr = std::shared_ptr< MuonCalibExtendedTrack >
 
typedef std::map< MuonFixedId, ExtendedChannelInfoMdtHitInfoMap
 
typedef MdtHitInfoMap::iterator MdtHitInfoIt
 
typedef MdtHitInfoMap::const_iterator MdtHitInfoCit
 
typedef std::map< MuonFixedId, MdtRegionInfoMdtHitChamberIdMap
 
typedef std::map< MuonFixedIdManipulator::StationIndex, MdtRegionInfoMdtHitStationIndexMap
 
typedef std::pair< RpcCalibRawHitPtr, ExtendedInfoRpcHitInfo
 
typedef std::vector< RpcHitInfoRpcHitInfoVec
 
typedef std::map< MuonFixedId, RpcHitInfoRpcHitChamberIdMap
 
typedef std::map< MuonFixedIdManipulator::StationIndex, RpcHitInfoVecRpcHitStationIndexMap
 
typedef std::pair< TgcCalibRawHitPtr, ExtendedInfoTgcHitInfo
 
typedef std::vector< TgcHitInfoTgcHitInfoVec
 
typedef std::map< MuonFixedId, TgcHitInfoTgcHitChamberIdMap
 
typedef std::map< MuonFixedIdManipulator::StationIndex, TgcHitInfoVecTgcHitStationIndexMap
 
typedef std::pair< CscCalibRawHitPtr, ExtendedInfoCscHitInfo
 
typedef std::vector< CscHitInfoCscHitInfoVec
 
typedef std::map< MuonFixedId, CscHitInfoCscHitChamberIdMap
 
typedef std::map< MuonFixedIdManipulator::StationIndex, CscHitInfoVecCscHitStationIndexMap
 

Public Member Functions

 MuonCalibExtendedRawHits ()
 Default constructor . More...
 
 MuonCalibExtendedRawHits (const MuonCalibRawHitCollection &rawHits, const std::vector< ExtendedSegPtr > &segments, const std::vector< ExtendedTrkPtr > &tracks)
 
std::string dumpMdtHits () const
 
const MdtHitChamberIdMapmdtHitChamberIdMap () const
 access to the mdt hits per chamber and station More...
 
const MdtHitStationIndexMapmdtChamberIndexMap () const
 
const RpcHitChamberIdMaprpcHitChamberIdMap () const
 access to the rpc hits per chamber and station More...
 
const RpcHitStationIndexMaprpcChamberIndexMap () const
 
const TgcHitChamberIdMaptgcHitChamberIdMap () const
 access to the tgc hits per chamber and station More...
 
const TgcHitStationIndexMaptgcChamberIndexMap () const
 
const CscHitChamberIdMapcscHitChamberIdMap () const
 access to the csc hits per chamber and station More...
 
const CscHitStationIndexMapcscChamberIndexMap () const
 

Private Attributes

double m_adcThreshold {50.}
 
MdtHitChamberIdMap m_mdtChamberIdMap
 
MdtHitStationIndexMap m_mdtChamberIndexMap
 
RpcHitChamberIdMap m_rpcChamberIdMap
 
RpcHitStationIndexMap m_rpcChamberIndexMap
 
TgcHitChamberIdMap m_tgcChamberIdMap
 
TgcHitStationIndexMap m_tgcChamberIndexMap
 
CscHitChamberIdMap m_cscChamberIdMap
 
CscHitStationIndexMap m_cscChamberIndexMap
 

Detailed Description

Access to all raw hits with layer/station granularity. Also information on whether the hits are associated with segments or tracks

Definition at line 28 of file MuonCalibExtendedRawHits.h.

Member Typedef Documentation

◆ CscCalibRawHitPtr

Definition at line 31 of file MuonCalibExtendedRawHits.h.

◆ CscHitChamberIdMap

Definition at line 76 of file MuonCalibExtendedRawHits.h.

◆ CscHitInfo

Definition at line 73 of file MuonCalibExtendedRawHits.h.

◆ CscHitInfoVec

Definition at line 75 of file MuonCalibExtendedRawHits.h.

◆ CscHitStationIndexMap

Definition at line 77 of file MuonCalibExtendedRawHits.h.

◆ ExtendedSegPtr

Definition at line 36 of file MuonCalibExtendedRawHits.h.

◆ ExtendedTrkPtr

Definition at line 37 of file MuonCalibExtendedRawHits.h.

◆ MdtCalibRawHitPtr

Definition at line 30 of file MuonCalibExtendedRawHits.h.

◆ MdtHitChamberIdMap

Definition at line 55 of file MuonCalibExtendedRawHits.h.

◆ MdtHitInfoCit

typedef MdtHitInfoMap::const_iterator MuonCalib::MuonCalibExtendedRawHits::MdtHitInfoCit

Definition at line 46 of file MuonCalibExtendedRawHits.h.

◆ MdtHitInfoIt

typedef MdtHitInfoMap::iterator MuonCalib::MuonCalibExtendedRawHits::MdtHitInfoIt

Definition at line 45 of file MuonCalibExtendedRawHits.h.

◆ MdtHitInfoMap

Definition at line 44 of file MuonCalibExtendedRawHits.h.

◆ MdtHitStationIndexMap

Definition at line 56 of file MuonCalibExtendedRawHits.h.

◆ RpcCalibRawHitPtr

Definition at line 33 of file MuonCalibExtendedRawHits.h.

◆ RpcHitChamberIdMap

Definition at line 65 of file MuonCalibExtendedRawHits.h.

◆ RpcHitInfo

Definition at line 63 of file MuonCalibExtendedRawHits.h.

◆ RpcHitInfoVec

Definition at line 64 of file MuonCalibExtendedRawHits.h.

◆ RpcHitStationIndexMap

Definition at line 66 of file MuonCalibExtendedRawHits.h.

◆ TgcCalibRawHitPtr

Definition at line 34 of file MuonCalibExtendedRawHits.h.

◆ TgcHitChamberIdMap

Definition at line 70 of file MuonCalibExtendedRawHits.h.

◆ TgcHitInfo

Definition at line 68 of file MuonCalibExtendedRawHits.h.

◆ TgcHitInfoVec

Definition at line 69 of file MuonCalibExtendedRawHits.h.

◆ TgcHitStationIndexMap

Definition at line 71 of file MuonCalibExtendedRawHits.h.

Constructor & Destructor Documentation

◆ MuonCalibExtendedRawHits() [1/2]

MuonCalib::MuonCalibExtendedRawHits::MuonCalibExtendedRawHits ( )

Default constructor .

Definition at line 24 of file MuonCalibExtendedRawHits.cxx.

24 : m_adcThreshold(50.) {}

◆ MuonCalibExtendedRawHits() [2/2]

MuonCalib::MuonCalibExtendedRawHits::MuonCalibExtendedRawHits ( const MuonCalibRawHitCollection rawHits,
const std::vector< ExtendedSegPtr > &  segments,
const std::vector< ExtendedTrkPtr > &  tracks 
)

Definition at line 26 of file MuonCalibExtendedRawHits.cxx.

28  :
29  m_adcThreshold(70.) {
30  MuonFixedIdManipulator idManip;
31  // loop over MDT raw hits and
32  for (const MdtCalibRawHitPtr& rawHit : rawHits.MdtContainer()) {
33  const MuonFixedId id = rawHit->identify();
34  // create ChamberId + StationIndex
35  MuonFixedId chId = idManip.chamberIdentifier(id);
36  MuonFixedIdManipulator::StationIndex stationIndex = idManip.stationLayerIndex(id);
37 
38  MdtRegionInfo& chInfo = m_mdtChamberIdMap[chId];
39  ExtendedChannelInfo& channelChInfo = chInfo.hits[id];
40  MdtRegionInfo& stInfo = m_mdtChamberIndexMap[stationIndex];
41  ExtendedChannelInfo& channelStInfo = stInfo.hits[id];
42 
43  channelChInfo.hits.emplace_back(rawHit);
44  channelStInfo.hits.emplace_back(rawHit);
45 
46  const bool above_thresh = {rawHit->adcCount() > m_adcThreshold};
47  chInfo.nhitsAboveAdcThreshold += above_thresh;
48  stInfo.nhitsAboveAdcThreshold += above_thresh;
49 
50  // only increase the hit counters once
51  bool isFirst = true;
52  // loop over tracks and check whether hit is 'on-track'
53  for (const ExtendedTrkPtr& trk : tracks) {
54  // look for id in map
55  const IdHitMap& idHitMap = trk->idHitMap();
56  IdHitMap::const_iterator pos = idHitMap.find(id);
57  if (pos == idHitMap.end()) continue;
58 
59  // if we get here the hit was found, now check that it is a hit on track
60  const MuonCalibHit_E& hit = *pos->second;
61  if (hit.type() < 4) {
62  if (isFirst) {
63  ++chInfo.nhitsOnTrack;
64  ++stInfo.nhitsOnTrack;
65  isFirst = false;
66  }
67  trk->rawHitAssociationMap().addMdtRawHit(rawHit);
68  channelChInfo.associatedTracks.emplace_back(trk);
69  channelStInfo.associatedTracks.emplace_back(trk);
70  }
71  }
72 
73  // only increase the hit counters once
74  isFirst = true;
75  // loop over segments and check whether hit is 'on-segment'
76  for (const ExtendedSegPtr& seg : segments) {
77  // look for id in segment
78  if (!seg->idSet().count(id)) continue;
79 
80  if (isFirst) {
81  ++chInfo.nhitsOnSegment;
82  ++stInfo.nhitsOnSegment;
83  isFirst = false;
84  }
85  seg->rawHitAssociationMap().addMdtRawHit(rawHit);
86  channelChInfo.associatedSegments.emplace_back(seg);
87  channelStInfo.associatedSegments.emplace_back(seg);
88  }
89  }
90  }

Member Function Documentation

◆ cscChamberIndexMap()

const CscHitStationIndexMap& MuonCalib::MuonCalibExtendedRawHits::cscChamberIndexMap ( ) const
inline

Definition at line 102 of file MuonCalibExtendedRawHits.h.

102 { return m_cscChamberIndexMap; }

◆ cscHitChamberIdMap()

const CscHitChamberIdMap& MuonCalib::MuonCalibExtendedRawHits::cscHitChamberIdMap ( ) const
inline

access to the csc hits per chamber and station

Definition at line 101 of file MuonCalibExtendedRawHits.h.

101 { return m_cscChamberIdMap; }

◆ dumpMdtHits()

std::string MuonCalib::MuonCalibExtendedRawHits::dumpMdtHits ( ) const

Definition at line 92 of file MuonCalibExtendedRawHits.cxx.

92  {
93  std::ostringstream sout;
94  MuonFixedIdPrinter printer{};
95 
96  sout << " number of MDT chambers with hits: " << m_mdtChamberIdMap.size() << std::endl;
97  for (const auto& chIt : m_mdtChamberIdMap) {
98  if (chIt.second.nhitsAboveAdcThreshold < 3) continue;
99  const MuonFixedId& chId = chIt.first;
100  sout << " " << std::setw(20) << printer.chamberIdentifier(chId) << " nhits " << std::setw(3) << chIt.second.hits.size()
101  << " above ADC cut " << std::setw(3) << chIt.second.nhitsAboveAdcThreshold << " on segment " << std::setw(3)
102  << chIt.second.nhitsOnSegment << " on track " << std::setw(3) << chIt.second.nhitsOnTrack;
103 
104  // look at next iterator to decide whether to add endl or not
105  sout << std::endl;
106  }
107  return sout.str();
108  }

◆ mdtChamberIndexMap()

const MdtHitStationIndexMap& MuonCalib::MuonCalibExtendedRawHits::mdtChamberIndexMap ( ) const
inline

Definition at line 90 of file MuonCalibExtendedRawHits.h.

90 { return m_mdtChamberIndexMap; }

◆ mdtHitChamberIdMap()

const MdtHitChamberIdMap& MuonCalib::MuonCalibExtendedRawHits::mdtHitChamberIdMap ( ) const
inline

access to the mdt hits per chamber and station

Definition at line 89 of file MuonCalibExtendedRawHits.h.

89 { return m_mdtChamberIdMap; }

◆ rpcChamberIndexMap()

const RpcHitStationIndexMap& MuonCalib::MuonCalibExtendedRawHits::rpcChamberIndexMap ( ) const
inline

Definition at line 94 of file MuonCalibExtendedRawHits.h.

94 { return m_rpcChamberIndexMap; }

◆ rpcHitChamberIdMap()

const RpcHitChamberIdMap& MuonCalib::MuonCalibExtendedRawHits::rpcHitChamberIdMap ( ) const
inline

access to the rpc hits per chamber and station

Definition at line 93 of file MuonCalibExtendedRawHits.h.

93 { return m_rpcChamberIdMap; }

◆ tgcChamberIndexMap()

const TgcHitStationIndexMap& MuonCalib::MuonCalibExtendedRawHits::tgcChamberIndexMap ( ) const
inline

Definition at line 98 of file MuonCalibExtendedRawHits.h.

98 { return m_tgcChamberIndexMap; }

◆ tgcHitChamberIdMap()

const TgcHitChamberIdMap& MuonCalib::MuonCalibExtendedRawHits::tgcHitChamberIdMap ( ) const
inline

access to the tgc hits per chamber and station

Definition at line 97 of file MuonCalibExtendedRawHits.h.

97 { return m_tgcChamberIdMap; }

Member Data Documentation

◆ m_adcThreshold

double MuonCalib::MuonCalibExtendedRawHits::m_adcThreshold {50.}
private

Definition at line 105 of file MuonCalibExtendedRawHits.h.

◆ m_cscChamberIdMap

CscHitChamberIdMap MuonCalib::MuonCalibExtendedRawHits::m_cscChamberIdMap
private

Definition at line 116 of file MuonCalibExtendedRawHits.h.

◆ m_cscChamberIndexMap

CscHitStationIndexMap MuonCalib::MuonCalibExtendedRawHits::m_cscChamberIndexMap
private

Definition at line 117 of file MuonCalibExtendedRawHits.h.

◆ m_mdtChamberIdMap

MdtHitChamberIdMap MuonCalib::MuonCalibExtendedRawHits::m_mdtChamberIdMap
private

Definition at line 107 of file MuonCalibExtendedRawHits.h.

◆ m_mdtChamberIndexMap

MdtHitStationIndexMap MuonCalib::MuonCalibExtendedRawHits::m_mdtChamberIndexMap
private

Definition at line 108 of file MuonCalibExtendedRawHits.h.

◆ m_rpcChamberIdMap

RpcHitChamberIdMap MuonCalib::MuonCalibExtendedRawHits::m_rpcChamberIdMap
private

Definition at line 110 of file MuonCalibExtendedRawHits.h.

◆ m_rpcChamberIndexMap

RpcHitStationIndexMap MuonCalib::MuonCalibExtendedRawHits::m_rpcChamberIndexMap
private

Definition at line 111 of file MuonCalibExtendedRawHits.h.

◆ m_tgcChamberIdMap

TgcHitChamberIdMap MuonCalib::MuonCalibExtendedRawHits::m_tgcChamberIdMap
private

Definition at line 113 of file MuonCalibExtendedRawHits.h.

◆ m_tgcChamberIndexMap

TgcHitStationIndexMap MuonCalib::MuonCalibExtendedRawHits::m_tgcChamberIndexMap
private

Definition at line 114 of file MuonCalibExtendedRawHits.h.


The documentation for this class was generated from the following files:
MuonCalib::MuonCalibExtendedRawHits::ExtendedTrkPtr
std::shared_ptr< MuonCalibExtendedTrack > ExtendedTrkPtr
Definition: MuonCalibExtendedRawHits.h:37
MuonCalib::MuonCalibExtendedRawHits::m_cscChamberIndexMap
CscHitStationIndexMap m_cscChamberIndexMap
Definition: MuonCalibExtendedRawHits.h:117
MuonCalib::MuonFixedIdManipulator::StationIndex
StationIndex
enum defining station layers
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibExtendedRawHits::MdtCalibRawHitPtr
MuonCalibRawHitCollection::MdtCalibRawHitPtr MdtCalibRawHitPtr
Definition: MuonCalibExtendedRawHits.h:30
MuonCalib::MuonCalibExtendedRawHits::m_rpcChamberIdMap
RpcHitChamberIdMap m_rpcChamberIdMap
Definition: MuonCalibExtendedRawHits.h:110
MuonCalib::MuonCalibExtendedRawHits::m_tgcChamberIdMap
TgcHitChamberIdMap m_tgcChamberIdMap
Definition: MuonCalibExtendedRawHits.h:113
MuonCalib::MuonCalibExtendedRawHits::m_adcThreshold
double m_adcThreshold
Definition: MuonCalibExtendedRawHits.h:105
MuonCalib::MuonCalibExtendedRawHits::m_tgcChamberIndexMap
TgcHitStationIndexMap m_tgcChamberIndexMap
Definition: MuonCalibExtendedRawHits.h:114
MuonCalib::MuonCalibExtendedRawHits::m_mdtChamberIdMap
MdtHitChamberIdMap m_mdtChamberIdMap
Definition: MuonCalibExtendedRawHits.h:107
MuonCalib::MuonCalibExtendedRawHits::m_cscChamberIdMap
CscHitChamberIdMap m_cscChamberIdMap
Definition: MuonCalibExtendedRawHits.h:116
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
MuonCalib::MuonCalibExtendedRawHits::ExtendedSegPtr
std::shared_ptr< MuonCalibExtendedSegment > ExtendedSegPtr
Definition: MuonCalibExtendedRawHits.h:36
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonCalib::MuonCalibExtendedRawHits::m_rpcChamberIndexMap
RpcHitStationIndexMap m_rpcChamberIndexMap
Definition: MuonCalibExtendedRawHits.h:111
MuonCalib::MuonCalibExtendedRawHits::m_mdtChamberIndexMap
MdtHitStationIndexMap m_mdtChamberIndexMap
Definition: MuonCalibExtendedRawHits.h:108
MuonCalib::IdHitMap
std::map< MuonFixedId, CalibHitE_Ptr > IdHitMap
hit information per identifier
Definition: MuonCalibLayerMapping.h:27