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

#include <MuonFixedIdPrinter.h>

Collaboration diagram for MuonCalib::MuonFixedIdPrinter:

Public Member Functions

std::string stationLayerIdentifier (const MuonFixedId &id) const
 prints a station layer identifier for the give identifier
std::string stationLayerIdentifier (MuonFixedIdManipulator::StationIndex stIndex) const
 prints a station layer identifier for the give station index
std::string stationIdentifier (const MuonFixedId &id) const
 prints station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MDT station TGC: station name (T1)/eta/phi
std::string chamberIdentifier (const MuonFixedId &id) const
 prints chamber Identifier for the give id.
std::string moduleIdentifier (const MuonFixedId &id) const
 prints layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/double [R,Z,phi]/measuresPhi (if selected) TGC:
std::string gasGapIdentifier (const MuonFixedId &id, bool includeMeasuresPhi=false) const
 prints gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/double [R,Z,phi]/lay/measuresPhi (if selected) TGC:
std::string fullIdentifier (const MuonFixedId &id) const
 prints full Identifier for the give id
std::string gasGapIdentifierForMap (const MuonFixedId &id, bool includeMeasuresPhi=false) const
 print gapGap Id to be used in map

Private Attributes

MuonFixedIdManipulator m_manipulator

Detailed Description

Definition at line 13 of file MuonFixedIdPrinter.h.

Member Function Documentation

◆ chamberIdentifier()

std::string MuonCalib::MuonFixedIdPrinter::chamberIdentifier ( const MuonFixedId & id) const

prints chamber Identifier for the give id.

Consists of stationIdentifier. RPC: includes DoubletR

Definition at line 53 of file MuonFixedIdPrinter.cxx.

53 {
54 std::ostringstream sout;
55 if (!id.isValid()) return " Invalid Identifier";
56 sout << stationIdentifier(id);
57 if (id.is_rpc()) sout << " doubR " << id.rpcDoubletR();
58
59 return sout.str();
60 }
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
std::string stationIdentifier(const MuonFixedId &id) const
prints station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MDT...

◆ fullIdentifier()

std::string MuonCalib::MuonFixedIdPrinter::fullIdentifier ( const MuonFixedId & id) const

prints full Identifier for the give id

Definition at line 132 of file MuonFixedIdPrinter.cxx.

132 {
133 std::ostringstream sout;
134 if (!id.isValid()) return " Invalid Identifier";
135 sout << gasGapIdentifier(id, false);
136 bool measuresPhi = m_manipulator.measuresPhi(id);
137 if (id.is_rpc())
138 sout << " strip " << std::setw(2) << id.rpcStrip();
139 else if (id.is_tgc())
140 sout << " strip " << std::setw(2) << id.tgcChannel();
141 else if (id.is_csc())
142 sout << " strip " << std::setw(2) << id.cscStrip();
143
144 if (measuresPhi) sout << " measuresPhi";
145
146 return sout.str();
147 }
MuonFixedIdManipulator m_manipulator
std::string gasGapIdentifier(const MuonFixedId &id, bool includeMeasuresPhi=false) const
prints gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/doub...

◆ gasGapIdentifier()

std::string MuonCalib::MuonFixedIdPrinter::gasGapIdentifier ( const MuonFixedId & id,
bool includeMeasuresPhi = false ) const

prints gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/double [R,Z,phi]/lay/measuresPhi (if selected) TGC:

Definition at line 73 of file MuonFixedIdPrinter.cxx.

73 {
74 if (!id.isValid()) return " Invalid Identifier";
75
76 std::ostringstream sout;
77 sout << moduleIdentifier(id);
78 bool measuresPhi = false;
79 if (id.is_rpc()) {
80 sout << " gap " << id.rpcGasGap();
81 measuresPhi = id.rpcMeasuresPhi();
82 } else if (id.is_tgc()) {
83 sout << " gap " << id.tgcGasGap();
84 measuresPhi = id.tgcIsStrip();
85 } else if (id.is_csc()) {
86 sout << " lay " << id.cscWireLayer();
87 measuresPhi = id.cscMeasuresPhi();
88 } else {
89 sout << " lay " << id.mdtTubeLayer() << " tube " << std::setw(2) << id.mdtTube();
90 }
91
92 if (measuresPhi && includeMeasuresPhi) sout << " measuresPhi";
93
94 return sout.str();
95 }
std::string moduleIdentifier(const MuonFixedId &id) const
prints layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/do...

◆ gasGapIdentifierForMap()

std::string MuonCalib::MuonFixedIdPrinter::gasGapIdentifierForMap ( const MuonFixedId & id,
bool includeMeasuresPhi = false ) const

print gapGap Id to be used in map

Definition at line 97 of file MuonFixedIdPrinter.cxx.

97 {
98 std::string st = id.stationNumberToFixedStationString(id.stationName());
99 std::ostringstream secondPart;
100 bool measuresPhi = false;
101 bool addSecondPart = false;
102 std::ostringstream station;
103 station << st << "_" << id.phi() << "_" << id.eta();
104 if (id.is_rpc()) {
105 int doublet = 2 * (id.rpcDoubletZ() - 1) + (id.rpcDoubletPhi() - 1);
106
107 if (id.rpcMeasuresPhi()) measuresPhi = true;
108 addSecondPart = true;
109 secondPart << "_d_" << doublet;
110
111 } else if (id.is_tgc()) {
112 if (id.tgcIsStrip()) measuresPhi = true;
113 addSecondPart = true;
114 secondPart << "_gg_" << id.tgcGasGap();
115
116 } else if (id.is_csc()) {
117 if (id.cscMeasuresPhi()) measuresPhi = true;
118 addSecondPart = true;
119 secondPart << "_wl_" << id.cscWireLayer();
120 }
121 std::string rst = station.str();
122 if (addSecondPart) { rst += secondPart.str(); }
123 if (includeMeasuresPhi) {
124 if (measuresPhi)
125 rst += "_phi";
126 else
127 rst += "_eta";
128 }
129 return rst;
130 }

◆ moduleIdentifier()

std::string MuonCalib::MuonFixedIdPrinter::moduleIdentifier ( const MuonFixedId & id) const

prints layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/double [R,Z,phi]/measuresPhi (if selected) TGC:

Definition at line 62 of file MuonFixedIdPrinter.cxx.

62 {
63 std::ostringstream sout;
64 if (!id.isValid()) return " Invalid Identifier";
65 sout << chamberIdentifier(id);
66 if (id.is_rpc())
67 sout << " doubZ " << id.rpcDoubletZ() << " doubPhi " << id.rpcDoubletPhi();
68 else if (id.is_mdt())
69 sout << " ml " << id.mdtMultilayer();
70 return sout.str();
71 }
std::string chamberIdentifier(const MuonFixedId &id) const
prints chamber Identifier for the give id.

◆ stationIdentifier()

std::string MuonCalib::MuonFixedIdPrinter::stationIdentifier ( const MuonFixedId & id) const

prints station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MDT station TGC: station name (T1)/eta/phi

Definition at line 45 of file MuonFixedIdPrinter.cxx.

45 {
46 std::ostringstream sout;
47 if (!id.isValid()) return " Invalid Identifier";
48 sout << id.technologyString() << " " << id.stationNameString() << " eta " << std::setw(2) << id.eta() << " phi " << std::setw(2)
49 << id.phi();
50 return sout.str();
51 }

◆ stationLayerIdentifier() [1/2]

std::string MuonCalib::MuonFixedIdPrinter::stationLayerIdentifier ( const MuonFixedId & id) const

prints a station layer identifier for the give identifier

Definition at line 11 of file MuonFixedIdPrinter.cxx.

11 {
12 MuonFixedIdManipulator::StationIndex stIndex = m_manipulator.stationLayerIndex(id);
13 return stationLayerIdentifier(stIndex);
14 }
StationIndex
enum defining station layers
std::string stationLayerIdentifier(const MuonFixedId &id) const
prints a station layer identifier for the give identifier

◆ stationLayerIdentifier() [2/2]

std::string MuonCalib::MuonFixedIdPrinter::stationLayerIdentifier ( MuonFixedIdManipulator::StationIndex stIndex) const

prints a station layer identifier for the give station index

Definition at line 16 of file MuonFixedIdPrinter.cxx.

16 {
17 std::string stName = "UnKnown";
18 if (stIndex == MuonFixedIdManipulator::BI)
19 stName = "BI";
20 else if (stIndex == MuonFixedIdManipulator::BM)
21 stName = "BM";
22 else if (stIndex == MuonFixedIdManipulator::BO)
23 stName = "BO";
24 else if (stIndex == MuonFixedIdManipulator::BE)
25 stName = "BE";
26 else if (stIndex == MuonFixedIdManipulator::EIA)
27 stName = "EIA";
28 else if (stIndex == MuonFixedIdManipulator::EMA)
29 stName = "EMA";
30 else if (stIndex == MuonFixedIdManipulator::EOA)
31 stName = "EOA";
32 else if (stIndex == MuonFixedIdManipulator::EEA)
33 stName = "EEA";
34 else if (stIndex == MuonFixedIdManipulator::EIC)
35 stName = "EIC";
36 else if (stIndex == MuonFixedIdManipulator::EMC)
37 stName = "EMC";
38 else if (stIndex == MuonFixedIdManipulator::EOC)
39 stName = "EOC";
40 else if (stIndex == MuonFixedIdManipulator::EEC)
41 stName = "EEC";
42 return stName;
43 }
const std::string & stName(StIndex index)
convert StIndex into a string

Member Data Documentation

◆ m_manipulator

MuonFixedIdManipulator MuonCalib::MuonFixedIdPrinter::m_manipulator
private

Definition at line 54 of file MuonFixedIdPrinter.h.


The documentation for this class was generated from the following files: