ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalib::MuonCalibExtendedRawHits Class Reference

Access to all raw hits with layer/station granularity. More...

#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 .
 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
const MdtHitStationIndexMapmdtChamberIndexMap () const
const RpcHitChamberIdMaprpcHitChamberIdMap () const
 access to the rpc hits per chamber and station
const RpcHitStationIndexMaprpcChamberIndexMap () const
const TgcHitChamberIdMaptgcHitChamberIdMap () const
 access to the tgc hits per chamber and station
const TgcHitStationIndexMaptgcChamberIndexMap () const
const CscHitChamberIdMapcscHitChamberIdMap () const
 access to the csc hits per chamber and station
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

◆ CscHitChamberIdMap

◆ CscHitInfo

◆ CscHitInfoVec

◆ CscHitStationIndexMap

◆ ExtendedSegPtr

◆ ExtendedTrkPtr

◆ MdtCalibRawHitPtr

◆ MdtHitChamberIdMap

◆ 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

◆ MdtHitStationIndexMap

◆ RpcCalibRawHitPtr

◆ RpcHitChamberIdMap

◆ RpcHitInfo

◆ RpcHitInfoVec

◆ RpcHitStationIndexMap

◆ TgcCalibRawHitPtr

◆ TgcHitChamberIdMap

◆ TgcHitInfo

◆ TgcHitInfoVec

◆ TgcHitStationIndexMap

Constructor & Destructor Documentation

◆ MuonCalibExtendedRawHits() [1/2]

MuonCalib::MuonCalibExtendedRawHits::MuonCalibExtendedRawHits ( )

Default constructor .

Definition at line 24 of file MuonCalibExtendedRawHits.cxx.

◆ 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 }
std::shared_ptr< MuonCalibExtendedSegment > ExtendedSegPtr
MuonCalibRawHitCollection::MdtCalibRawHitPtr MdtCalibRawHitPtr
std::shared_ptr< MuonCalibExtendedTrack > ExtendedTrkPtr
StationIndex
enum defining station layers
std::map< MuonFixedId, CalibHitE_Ptr > IdHitMap
hit information per identifier

Member Function Documentation

◆ cscChamberIndexMap()

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

Definition at line 102 of file MuonCalibExtendedRawHits.h.

◆ 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.

◆ 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.

◆ 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.

◆ tgcChamberIndexMap()

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

Definition at line 98 of file MuonCalibExtendedRawHits.h.

◆ 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.

Member Data Documentation

◆ m_adcThreshold

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

Definition at line 105 of file MuonCalibExtendedRawHits.h.

105{50.};

◆ 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: