ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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
More...
 
std::string stationLayerIdentifier (MuonFixedIdManipulator::StationIndex stIndex) const
 prints a station layer identifier for the give station index More...
 
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 More...
 
std::string chamberIdentifier (const MuonFixedId &id) const
 prints chamber Identifier for the give id. More...
 
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: More...
 
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: More...
 
std::string fullIdentifier (const MuonFixedId &id) const
 prints full Identifier for the give id More...
 
std::string gasGapIdentifierForMap (const MuonFixedId &id, bool includeMeasuresPhi=false) const
 print gapGap Id to be used in map More...
 

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  }

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

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

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

◆ 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  {
13  return stationLayerIdentifier(stIndex);
14  }

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

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:
MuonCalib::MuonFixedIdManipulator::EMA
@ EMA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdPrinter::stationIdentifier
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...
Definition: MuonFixedIdPrinter.cxx:45
MuonCalib::MuonFixedIdManipulator::StationIndex
StationIndex
enum defining station layers
Definition: MuonFixedIdManipulator.h:17
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonCalib::MuonFixedIdManipulator::BM
@ BM
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::BO
@ BO
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOC
@ EOC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdPrinter::gasGapIdentifier
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...
Definition: MuonFixedIdPrinter.cxx:73
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
MuonCalib::MuonFixedIdManipulator::EMC
@ EMC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EEC
@ EEC
Definition: MuonFixedIdManipulator.h:17
createDCubeDigitHistograms.rpcMeasuresPhi
rpcMeasuresPhi
Definition: createDCubeDigitHistograms.py:67
MuonCalib::MuonFixedIdManipulator::BI
@ BI
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::measuresPhi
bool measuresPhi(const MuonFixedId &id) const
returns whether this is a phi measurement
Definition: MuonFixedIdManipulator.h:67
MuonCalib::MuonFixedIdManipulator::EIA
@ EIA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdPrinter::moduleIdentifier
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...
Definition: MuonFixedIdPrinter.cxx:62
MuonCalib::MuonFixedIdPrinter::m_manipulator
MuonFixedIdManipulator m_manipulator
Definition: MuonFixedIdPrinter.h:54
MuonCalib::MuonFixedIdManipulator::EEA
@ EEA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdPrinter::stationLayerIdentifier
std::string stationLayerIdentifier(const MuonFixedId &id) const
prints a station layer identifier for the give identifier
Definition: MuonFixedIdPrinter.cxx:11
MuonCalib::MuonFixedIdManipulator::stationLayerIndex
StationIndex stationLayerIndex(const MuonFixedId &id) const
returns station layer index for a give identifier
Definition: MuonFixedIdManipulator.cxx:87
MuonCalib::MuonFixedIdManipulator::EIC
@ EIC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOA
@ EOA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdPrinter::chamberIdentifier
std::string chamberIdentifier(const MuonFixedId &id) const
prints chamber Identifier for the give id.
Definition: MuonFixedIdPrinter.cxx:53
MuonCalib::MuonFixedIdManipulator::BE
@ BE
Definition: MuonFixedIdManipulator.h:17