ATLAS Offline Software
MuonFixedIdManipulator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONFIXEDIDMANIPULATOR_H
6 #define MUONFIXEDIDMANIPULATOR_H
7 
8 #include <iostream>
9 
11 
12 namespace MuonCalib {
13 
15  public:
17  enum StationIndex { BI = 0, BM, BO, BE, EIA, EMA, EOA, EEA, EIC, EMC, EOC, EEC, CSA, CSC, StationUnknown = 999 };
20 
21  public:
24 
27 
30 
33 
39  MuonFixedId stationIdentifier(const MuonFixedId& id, bool mapOnMdts = false) const;
40 
44  MuonFixedId chamberIdentifier(const MuonFixedId& id) const;
45 
51  MuonFixedId moduleIdentifier(const MuonFixedId& id, bool includeMeasuresPhi = false) const;
52 
58  MuonFixedId gasGapIdentifier(const MuonFixedId& id, bool includeMeasuresPhi = false) const;
59 
61  bool measuresPhi(const MuonFixedId& id) const;
62 
64  bool isEndcap(const MuonFixedId& id) const;
65  };
66 
67  inline bool MuonFixedIdManipulator::measuresPhi(const MuonFixedId& id) const {
68  if (id.is_rpc())
69  return id.rpcMeasuresPhi();
70  else if (id.is_tgc())
71  return id.tgcIsStrip();
72  else if (id.is_csc())
73  return id.cscMeasuresPhi();
74  return false;
75  }
76 
77  inline bool MuonFixedIdManipulator::isEndcap(const MuonFixedId& id) const {
78  if (!id.isValid()) return false;
79  if (id.is_rpc()) return false;
80  if (id.is_csc()) return true;
81  if (id.is_tgc()) return true;
82  if (id.stationNameString()[0] == 'E') return true;
83  return false;
84  }
85 
86 } // namespace MuonCalib
87 
88 #endif
MuonCalib::MuonFixedIdManipulator::EMA
@ EMA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::stationLayerIdentifier
MuonFixedId stationLayerIdentifier(const MuonFixedId &id) const
returns a station layer identifier for the give identifier
Definition: MuonFixedIdManipulator.cxx:34
MuonCalib::MuonFixedIdManipulator::StationIndex
StationIndex
enum defining station layers
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::chamberIdentifier
MuonFixedId chamberIdentifier(const MuonFixedId &id) const
returns chamber Identifier for the give id, same as stationIdentifier RPC: includes doubletR
Definition: MuonFixedIdManipulator.cxx:154
MuonCalib::MuonFixedIdManipulator::CSA
@ CSA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::PhiStationIndex
PhiStationIndex
enum defining trigger phi layers
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::BM
@ BM
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::T1
@ T1
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::phiStationLayerIndex
PhiStationIndex phiStationLayerIndex(const MuonFixedId &id) const
return phi station layer index for a give identifier
Definition: MuonFixedIdManipulator.cxx:9
MuonCalib::MuonFixedIdManipulator::BO
@ BO
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOC
@ EOC
Definition: MuonFixedIdManipulator.h:17
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::gasGapIdentifier
MuonFixedId gasGapIdentifier(const MuonFixedId &id, bool includeMeasuresPhi=false) const
returns gas gap Identifier for the give id MDT: same as tube identifier RPC: station name/eta/phi/dou...
Definition: MuonFixedIdManipulator.cxx:176
MuonCalib::MuonFixedIdManipulator::CS
@ CS
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::RPCBMR1
@ RPCBMR1
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::EMC
@ EMC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator
Definition: MuonFixedIdManipulator.h:14
MuonCalib::MuonFixedIdManipulator::EEC
@ EEC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::RPCBMR2
@ RPCBMR2
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::T2
@ T2
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::BI
@ BI
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::moduleIdentifier
MuonFixedId moduleIdentifier(const MuonFixedId &id, bool includeMeasuresPhi=false) const
returns layer Identifier for the give id MDT: station name/eta/phi/ml/lay RPC: station name/eta/phi/d...
Definition: MuonFixedIdManipulator.cxx:160
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::MuonFixedIdManipulator::T3
@ T3
Definition: MuonFixedIdManipulator.h:19
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonFixedIdManipulator::EEA
@ EEA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::stationIdentifier
MuonFixedId stationIdentifier(const MuonFixedId &id, bool mapOnMdts=false) const
returns station Identifier for the give id MDT: station name (BMS)/eta/phi RPC: name of associated MD...
Definition: MuonFixedIdManipulator.cxx:130
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::MuonFixedIdManipulator::RPCBO
@ RPCBO
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::isEndcap
bool isEndcap(const MuonFixedId &id) const
returns whether this is a phi measurement
Definition: MuonFixedIdManipulator.h:77
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::StationUnknown
@ StationUnknown
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOA
@ EOA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::T4
@ T4
Definition: MuonFixedIdManipulator.h:19
MuonCalib::MuonFixedIdManipulator::CSC
@ CSC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::PhiStationUnknown
@ PhiStationUnknown
Definition: MuonFixedIdManipulator.h:19
MuonFixedId.h
MuonCalib::MuonFixedIdManipulator::BE
@ BE
Definition: MuonFixedIdManipulator.h:17