ATLAS Offline Software
MuonChamberLayerDescription.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 
9 namespace Muon {
10 
12 
15  bool isSmall = (sector % 2 == 0);
17  if (chIndex < 0 || chIndex >= Muon::MuonStationIndex::ChIndexMax) {
18  MuonChamberLayerDescriptor descriptor;
19  return descriptor;
20  }
21 
23  descriptor.sector = sector;
24  // exceptions for a few barrel regions
25  if (region == Muon::MuonStationIndex::Barrel) {
26  if ((sector == 10 || sector == 14) && layer == Muon::MuonStationIndex::Inner)
27  descriptor.referencePosition = 5400.;
28  else if ((sector == 11 || sector == 13) && layer == Muon::MuonStationIndex::Outer)
29  descriptor.referencePosition = 10650.;
30  } else if (region == Muon::MuonStationIndex::EndcapC) { // multiply reference position by -1 for C side
31  descriptor.region = region;
33  descriptor.yMinRange *= -1;
34  descriptor.yMaxRange *= -1;
35  std::swap(descriptor.yMinRange, descriptor.yMaxRange);
36  } else {
37  descriptor.referencePosition *= -1;
38  }
39  }
40 
41  if (descriptor.chIndex < 0 || descriptor.chIndex >= Muon::MuonStationIndex::ChIndexMax) {
42  std::cout << " bad descriptor!!!! " << Muon::MuonStationIndex::regionName(region) << " "
43  << Muon::MuonStationIndex::layerName(layer) << " " << isSmall << " " << chIndex << std::endl;
44  }
45  return descriptor;
46  }
47 
80  }
81 
82 } // namespace Muon
Muon::MuonStationIndex::BIS
@ BIS
Definition: MuonStationIndex.h:17
Muon::MuonChamberLayerDescriptor::yMinRange
float yMinRange
Definition: MuonChamberLayerDescriptor.h:41
Muon::MuonStationIndex::toChamberIndex
static ChIndex toChamberIndex(DetectorRegionIndex region, LayerIndex layer, bool isSmall)
convert DetectorRegionIndex + LayerIndex + isSmall into ChIndex
Definition: MuonStationIndex.cxx:98
Muon::MuonStationIndex::CSS
@ CSS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BarrelExtended
@ BarrelExtended
EE.
Definition: MuonStationIndex.h:42
Muon::MuonStationIndex::EndcapA
@ EndcapA
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::Inner
@ Inner
Definition: MuonStationIndex.h:40
Muon::MuonChamberLayerDescriptor
struct containing all information to build a Hough transform for a given chamber index
Definition: MuonChamberLayerDescriptor.h:13
Muon::MuonStationIndex::Outer
@ Outer
Definition: MuonStationIndex.h:40
Muon::MuonStationIndex::EEL
@ EEL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BML
@ BML
Definition: MuonStationIndex.h:17
Muon::MuonChamberLayerDescriptor::region
Muon::MuonStationIndex::DetectorRegionIndex region
Definition: MuonChamberLayerDescriptor.h:38
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::MuonChamberLayerDescription::getDescriptor
MuonChamberLayerDescriptor getDescriptor(int sector, Muon::MuonStationIndex::DetectorRegionIndex region, Muon::MuonStationIndex::LayerIndex layer) const
Definition: MuonChamberLayerDescription.cxx:13
Muon::MuonChamberLayerDescription::initDefaultRegions
void initDefaultRegions()
initialize default geometry
Definition: MuonChamberLayerDescription.cxx:48
Muon::MuonStationIndex::BOS
@ BOS
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::BMS
@ BMS
Definition: MuonStationIndex.h:17
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MuonStationIndex::EIS
@ EIS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EOS
@ EOS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::regionName
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:176
Muon::MuonChamberLayerDescriptor::referencePosition
float referencePosition
Definition: MuonChamberLayerDescriptor.h:40
Muon::MuonChamberLayerDescriptor::chIndex
Muon::MuonStationIndex::ChIndex chIndex
Definition: MuonChamberLayerDescriptor.h:39
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonStationIndex::Barrel
@ Barrel
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::layerName
static const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:192
Muon::MuonChamberLayerDescription::MuonChamberLayerDescription
MuonChamberLayerDescription()
constructor
Definition: MuonChamberLayerDescription.cxx:11
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
Muon::MuonStationIndex::EES
@ EES
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
Muon::MuonChamberLayerDescriptor::sector
int sector
Definition: MuonChamberLayerDescriptor.h:37
MuonChamberLayerDescription.h
Muon::MuonStationIndex::ChIndexMax
@ ChIndexMax
Definition: MuonStationIndex.h:19
Muon::MuonStationIndex::EML
@ EML
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::EndcapC
@ EndcapC
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::BEE
@ BEE
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonChamberLayerDescriptor::yMaxRange
float yMaxRange
Definition: MuonChamberLayerDescriptor.h:42
Muon::MuonChamberLayerDescription::m_chamberLayerDescriptors
MuonChamberLayerDescriptorVec m_chamberLayerDescriptors
Definition: MuonChamberLayerDescription.h:29
Muon::MuonStationIndex::EMS
@ EMS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EOL
@ EOL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BOL
@ BOL
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::EIL
@ EIL
Definition: MuonStationIndex.h:18