CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
CSCGeometry Class Reference

#include <CSCGeometry.h>

Inheritance diagram for CSCGeometry:
TrackingGeometry

Public Types

typedef std::vector< const CSCChamber * > ChamberContainer
 
typedef std::vector< const CSCLayer * > LayerContainer
 
- Public Types inherited from TrackingGeometry
using DetContainer = std::vector< const GeomDet * >
 
using DetIdContainer = std::vector< DetId >
 
using DetTypeContainer = std::vector< const GeomDetType * >
 
using mapIdToDet = std::unordered_map< unsigned int, const GeomDet * >
 
using mapIdToDetUnit = std::unordered_map< unsigned int, const GeomDet * >
 

Public Member Functions

const CSCChamberSpecsbuildSpecs (int iChamberType, const std::vector< float > &fpar, const std::vector< float > &fupar, const CSCWireGroupPackage &wg)
 
bool centreTIOffsets () const
 
const CSCChamberchamber (CSCDetId id) const
 Return the chamber corresponding to given DetId. More...
 
const ChamberContainerchambers () const
 Return a vector of all chambers. More...
 
 CSCGeometry ()
 Default constructor. More...
 
 CSCGeometry (bool debugV, bool gangedstripsME1a_, bool onlywiresME1a_, bool realWireGeometry_, bool useCentreTIOffsets_)
 Real constructor. More...
 
const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
const DetContainerdetUnits () const override
 Returm a vector of all GeomDet. More...
 
const CSCChamberSpecsfindSpecs (int iChamberType)
 
bool gangedStrips () const
 
const GeomDetidToDet (DetId) const override
 
const GeomDetidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
const CSCLayerlayer (CSCDetId id) const
 Return the layer corresponding to given DetId. More...
 
const LayerContainerlayers () const
 Return a vector of all layers. More...
 
void queryModelling () const
 Dump parameters for overall strip and wire modelling. More...
 
bool realWireGeometry () const
 
void setDebugV (bool dbgv)
 
void setGangedStripsInME1a (bool gs)
 
void setOnlyWiresInME1a (bool ow)
 
void setUseCentreTIOffsets (bool cti)
 
void setUseRealWireGeometry (bool rwg)
 
bool wiresOnly () const
 
 ~CSCGeometry () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Types

typedef std::map< DetId, GeomDet * > CSCDetMap
 
typedef std::map< int, const CSCChamberSpecs *, std::less< int > > CSCSpecsContainer
 

Private Member Functions

void addChamber (CSCChamber *ch)
 Add a chamber with given DetId. More...
 
void addDet (GeomDet *det)
 Add a GeomDet; not to be called by the builder. More...
 
void addDetId (DetId id)
 Add a DetId. More...
 
void addDetType (GeomDetType *type)
 Add a DetType. More...
 
void addLayer (CSCLayer *l)
 Add a DetUnit. More...
 

Private Attributes

bool debugV_
 
bool gangedstripsME1a_
 
bool onlywiresME1a_
 
bool realWireGeometry_
 
CSCSpecsContainer specsContainer
 
ChamberContainer theChambers
 
DetIdContainer theDetIds
 
DetContainer theDets
 
DetTypeContainer theDetTypes
 
DetIdContainer theDetUnitIds
 
DetContainer theDetUnits
 
LayerContainer theLayers
 
CSCDetMap theMap
 
bool useCentreTIOffsets_
 

Friends

class CSCGeometryBuilder
 
class GeometryAligner
 

Detailed Description

The model of the geometry of the endcap muon CSC detectors.

Author
Tim Cox

Definition at line 24 of file CSCGeometry.h.

Member Typedef Documentation

typedef std::vector<const CSCChamber*> CSCGeometry::ChamberContainer

Definition at line 32 of file CSCGeometry.h.

typedef std::map<DetId, GeomDet*> CSCGeometry::CSCDetMap
private

Definition at line 26 of file CSCGeometry.h.

typedef std::map<int, const CSCChamberSpecs*, std::less<int> > CSCGeometry::CSCSpecsContainer
private

Definition at line 28 of file CSCGeometry.h.

typedef std::vector<const CSCLayer*> CSCGeometry::LayerContainer

Definition at line 33 of file CSCGeometry.h.

Constructor & Destructor Documentation

CSCGeometry::CSCGeometry ( )

Default constructor.

Definition at line 10 of file CSCGeometry.cc.

References debugV_, and queryModelling().

10  : debugV_(false), gangedstripsME1a_(true),
12  if ( debugV_ ) queryModelling();
13 }
void queryModelling() const
Dump parameters for overall strip and wire modelling.
Definition: CSCGeometry.cc:128
bool realWireGeometry_
Definition: CSCGeometry.h:176
bool useCentreTIOffsets_
Definition: CSCGeometry.h:177
bool gangedstripsME1a_
Definition: CSCGeometry.h:174
bool onlywiresME1a_
Definition: CSCGeometry.h:175
CSCGeometry::CSCGeometry ( bool  debugV,
bool  gangedstripsME1a_,
bool  onlywiresME1a_,
bool  realWireGeometry_,
bool  useCentreTIOffsets_ 
)

Real constructor.

Definition at line 15 of file CSCGeometry.cc.

References debugV_, and queryModelling().

15  :
16  debugV_(dbgv), gangedstripsME1a_( gangedstripsME1a ), onlywiresME1a_( onlywiresME1a ),
17  realWireGeometry_( realWireGeometry ), useCentreTIOffsets_( useCentreTIOffsets ) {
18  if ( debugV_ ) queryModelling();
19 }
void queryModelling() const
Dump parameters for overall strip and wire modelling.
Definition: CSCGeometry.cc:128
bool realWireGeometry_
Definition: CSCGeometry.h:176
bool realWireGeometry() const
Definition: CSCGeometry.h:125
bool useCentreTIOffsets_
Definition: CSCGeometry.h:177
bool gangedstripsME1a_
Definition: CSCGeometry.h:174
bool onlywiresME1a_
Definition: CSCGeometry.h:175
CSCGeometry::~CSCGeometry ( )
override

Destructor.

Definition at line 21 of file CSCGeometry.cc.

References specsContainer, and theChambers.

21  {
22 
23  // delete all the chambers (which will delete the layers)
24  for (ChamberContainer::const_iterator ich=theChambers.begin();
25  ich!=theChambers.end(); ++ich) delete (*ich);
26 
27  // delete specs
28  for ( CSCSpecsContainer::const_iterator it =
29  specsContainer.begin(); it!=specsContainer.end(); ++it) {
30  delete (*it).second; // they are never shared per chamber type so should be no possible double deletion.
31  }
32 
33 }
CSCSpecsContainer specsContainer
Definition: CSCGeometry.h:180
ChamberContainer theChambers
Definition: CSCGeometry.h:154

Member Function Documentation

void CSCGeometry::addChamber ( CSCChamber ch)
private

Add a chamber with given DetId.

Definition at line 36 of file CSCGeometry.cc.

References addDet(), and theChambers.

Referenced by centreTIOffsets().

36  {
37  theChambers.emplace_back(ch);
38  addDet(ch);
39 }
void addDet(GeomDet *det)
Add a GeomDet; not to be called by the builder.
Definition: CSCGeometry.cc:56
ChamberContainer theChambers
Definition: CSCGeometry.h:154
void CSCGeometry::addDet ( GeomDet det)
private

Add a GeomDet; not to be called by the builder.

Definition at line 56 of file CSCGeometry.cc.

References GeomDet::geographicalId(), theDetIds, theDets, and theMap.

Referenced by addChamber(), addLayer(), and centreTIOffsets().

56  {
57  theDets.emplace_back(det);
58  theDetIds.emplace_back(det->geographicalId());
59  theMap.insert(CSCDetMap::value_type(det->geographicalId(),det));
60 }
CSCDetMap theMap
Definition: CSCGeometry.h:157
DetContainer theDets
Definition: CSCGeometry.h:162
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetIdContainer theDetIds
Definition: CSCGeometry.h:164
void CSCGeometry::addDetId ( DetId  id)
private

Add a DetId.

Referenced by centreTIOffsets().

void CSCGeometry::addDetType ( GeomDetType type)
private

Add a DetType.

Definition at line 51 of file CSCGeometry.cc.

References theDetTypes.

Referenced by centreTIOffsets().

51  {
52  theDetTypes.emplace_back(type);
53 }
DetTypeContainer theDetTypes
Definition: CSCGeometry.h:161
void CSCGeometry::addLayer ( CSCLayer l)
private

Add a DetUnit.

Definition at line 42 of file CSCGeometry.cc.

References addDet(), CSCLayer::chamber(), GeomDet::geographicalId(), CSCChamber::specs(), theDetTypes, theDetUnitIds, theDetUnits, and theLayers.

Referenced by centreTIOffsets().

42  {
43  theDetUnits.emplace_back(l);
44  theLayers.emplace_back(l);
45  theDetTypes.emplace_back(l->chamber()->specs());
46  theDetUnitIds.emplace_back(l->geographicalId());
47  addDet(l);
48 }
void addDet(GeomDet *det)
Add a GeomDet; not to be called by the builder.
Definition: CSCGeometry.cc:56
DetContainer theDetUnits
Definition: CSCGeometry.h:163
DetTypeContainer theDetTypes
Definition: CSCGeometry.h:161
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:42
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetIdContainer theDetUnitIds
Definition: CSCGeometry.h:165
LayerContainer theLayers
Definition: CSCGeometry.h:168
const CSCChamber * chamber() const
Definition: CSCLayer.h:52
const CSCChamberSpecs * CSCGeometry::buildSpecs ( int  iChamberType,
const std::vector< float > &  fpar,
const std::vector< float > &  fupar,
const CSCWireGroupPackage wg 
)

Build CSCChamberSpecs for given chamber type.

@ a good candidate to be replaced by a factory?

Definition at line 176 of file CSCGeometry.cc.

References specsContainer.

179  {
180 
181  // Note arg list order is hbot, htop, apothem, hthickness
182  TrapezoidalPlaneBounds bounds( fpar[0], fpar[1], fpar[3], fpar[2] );
183  const CSCChamberSpecs* aSpecs = new CSCChamberSpecs( this, iChamberType, bounds, fupar, wg );
184  specsContainer[ iChamberType ] = aSpecs;
185  return aSpecs;
186 }
CSCSpecsContainer specsContainer
Definition: CSCGeometry.h:180
bool CSCGeometry::centreTIOffsets ( ) const
inline

Use the backed-out offsets for theCentreToIntersection in CSCLayerGeometry

Definition at line 131 of file CSCGeometry.h.

References addChamber(), addDet(), addDetId(), addDetType(), addLayer(), checklumidiff::l, queryModelling(), and useCentreTIOffsets_.

131 { return useCentreTIOffsets_; }
bool useCentreTIOffsets_
Definition: CSCGeometry.h:177
const CSCChamber * CSCGeometry::chamber ( CSCDetId  id) const

Return the chamber corresponding to given DetId.

Definition at line 118 of file CSCGeometry.cc.

References makeMuonMisalignmentScenario::endcap, globals_cff::id1, idToDet(), relativeConstraints::ring, and relativeConstraints::station.

Referenced by RPCEfficiency::analyze(), L1MuonRecoTreeProducer::analyze(), BeamHaloAnalyzer::analyze(), CSCSegmentBuilder::build(), CSCTriggerPrimitivesBuilder::build(), GEMCSCSegmentBuilder::build(), CSCSectorReceiverLUT::calcGlobalPhiME(), GlobalHaloAlgo::Calculate(), CSCHaloAlgo::Calculate(), CSCSegtoRPC::CSCSegtoRPC(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCOfflineMonitor::doSegments(), CSCValidation::doSegments(), CSCValidation::doTimeMonitoring(), CSCEfficiency::filter(), CSCComparatorDigiFitter::fit(), CSCUpgradeMotherboardLUTGenerator::generateLUTsME11(), CSCUpgradeMotherboardLUTGenerator::generateLUTsME21(), CSCComparatorDigiFitter::getComparatorDigiCoordinates(), L1TMuon::GeometryTranslator::getCSCSpecificPoint(), AngleConverter::getGlobalEta(), CSCSectorReceiverLUT::getGlobalEtaValue(), AngleConverter::getProcessorPhi(), geometryXMLparser.CSCAlignable::index(), MuonMesh::isClusteredWith(), MuonMesh::isDuplicateOf(), MuonSimHitProducer::produce(), CSCGEMMotherboardME11::run(), CSCAnodeLCTProcessor::run(), CSCCathodeLCTProcessor::run(), and CSCUpgradeMotherboard::setupGeometry().

118  {
119  CSCDetId id1(id.endcap(), id.station(), id.ring(), id.chamber(), 0);
120  return dynamic_cast<const CSCChamber*>(idToDet(id1));
121 }
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:99
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:118
const CSCGeometry::ChamberContainer & CSCGeometry::chambers ( ) const
const CSCGeometry::DetIdContainer & CSCGeometry::detIds ( ) const
overridevirtual

Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)

Implements TrackingGeometry.

Definition at line 87 of file CSCGeometry.cc.

References theDetIds.

88 {
89  return theDetIds;
90 }
DetIdContainer theDetIds
Definition: CSCGeometry.h:164
const CSCGeometry::DetContainer & CSCGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 75 of file CSCGeometry.cc.

References theDets.

Referenced by CSCRecoBadChannelsAnalyzer::analyze().

76 {
77  return theDets;
78 }
DetContainer theDets
Definition: CSCGeometry.h:162
const CSCGeometry::DetTypeContainer & CSCGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 63 of file CSCGeometry.cc.

References theDetTypes.

Referenced by CSCRecoBadChannelsAnalyzer::analyze().

64 {
65  return theDetTypes;
66 }
DetTypeContainer theDetTypes
Definition: CSCGeometry.h:161
const CSCGeometry::DetIdContainer & CSCGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 81 of file CSCGeometry.cc.

References theDetUnitIds.

82 {
83  return theDetUnitIds;
84 }
DetIdContainer theDetUnitIds
Definition: CSCGeometry.h:165
const CSCGeometry::DetContainer & CSCGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 69 of file CSCGeometry.cc.

References theDetUnits.

70 {
71  return theDetUnits;
72 }
DetContainer theDetUnits
Definition: CSCGeometry.h:163
const CSCChamberSpecs * CSCGeometry::findSpecs ( int  iChamberType)

Return the CSCChamberSpecs* for given chamber type if it exists, or 0 if it has not been created.

Definition at line 169 of file CSCGeometry.cc.

References specsContainer.

169  {
170  const CSCChamberSpecs* aSpecs = nullptr;
171  CSCSpecsContainer::const_iterator it = specsContainer.find( iChamberType );
172  if ( it != specsContainer.end() ) aSpecs = (*it).second;
173  return aSpecs;
174 }
CSCSpecsContainer specsContainer
Definition: CSCGeometry.h:180
bool CSCGeometry::gangedStrips ( ) const
inline

Ganged strips in ME1a

Definition at line 111 of file CSCGeometry.h.

References gangedstripsME1a_.

Referenced by CSCChamberSpecs::CSCChamberSpecs(), CSCLayerGeometry::CSCLayerGeometry(), and CSCOfflineMonitor::doPedestalNoise().

111 { return gangedstripsME1a_; }
bool gangedstripsME1a_
Definition: CSCGeometry.h:174
const GeomDet * CSCGeometry::idToDet ( DetId  ) const
overridevirtual
const GeomDet * CSCGeometry::idToDetUnit ( DetId  ) const
overridevirtual
const CSCLayer * CSCGeometry::layer ( CSCDetId  id) const
const CSCGeometry::LayerContainer & CSCGeometry::layers ( ) const

Return a vector of all layers.

Definition at line 112 of file CSCGeometry.cc.

References theLayers.

Referenced by CSCRecoBadChannelsAnalyzer::analyze(), and ValidateGeometry::validateCSCLayerGeometry().

113 {
114  return theLayers;
115 }
LayerContainer theLayers
Definition: CSCGeometry.h:168
void CSCGeometry::queryModelling ( ) const

Dump parameters for overall strip and wire modelling.

Definition at line 128 of file CSCGeometry.cc.

References gangedstripsME1a_, LogTrace, onlywiresME1a_, realWireGeometry_, AlCaHLTBitMon_QueryRunRegistry::string, and useCentreTIOffsets_.

Referenced by centreTIOffsets(), and CSCGeometry().

128  {
129  // Dump user-selected overall modelling parameters.
130  // Only requires calling once per job.
131 
132  LogTrace("CSCGeometry|CSC") << "CSCGeometry::queryModelling entered...";
133 
134  edm::LogInfo("CSC") << "CSCGeometry version 18-Oct-2012 queryModelling...\n";
135 
136  std::string gs = " ";
137  if ( gangedstripsME1a_ )
138  gs = "GANGED";
139  else
140  gs = "UNGANGED";
141 
142  edm::LogInfo("CSC") << "CSCGeometry: in ME1a use " << gs << " strips" << "\n";
143 
144  std::string wo = " ";
145  if ( onlywiresME1a_ )
146  wo = "WIRES ONLY";
147  else
148  wo = "WIRES & STRIPS";
149 
150  edm::LogInfo("CSC") << "CSCGeometry: in ME1a use " << wo << "\n";
151 
152  std::string wg = " ";
153  if ( realWireGeometry_ )
154  wg = "REAL";
155  else
156  wg = "PSEUDO";
157 
158  edm::LogInfo("CSC") << "CSCGeometry: wires are modelled using " << wg << " wire geometry " << "\n";
159 
160  std::string cti = " ";
161  if ( useCentreTIOffsets_ )
162  cti = "WITH";
163  else
164  cti = "WITHOUT";
165 
166  edm::LogInfo("CSC") << "CSCGeometry: strip plane centre-to-intersection ideal " << cti << " corrections " << "\n";
167 }
bool realWireGeometry_
Definition: CSCGeometry.h:176
#define LogTrace(id)
bool useCentreTIOffsets_
Definition: CSCGeometry.h:177
bool gangedstripsME1a_
Definition: CSCGeometry.h:174
Definition: AbsArchive.cc:53
bool onlywiresME1a_
Definition: CSCGeometry.h:175
bool CSCGeometry::realWireGeometry ( ) const
inline

Wire geometry modelled as real hardware (complex groupings of wires and dead regions) or as a pseudo geometry with just one wire grouping per chamber type (as was done in ORCA versions up to and including ORCA_8_8_1).

Definition at line 125 of file CSCGeometry.h.

References realWireGeometry_.

Referenced by CSCLayerGeometry::CSCLayerGeometry().

125 { return realWireGeometry_; }
bool realWireGeometry_
Definition: CSCGeometry.h:176
void CSCGeometry::setDebugV ( bool  dbgv)
inline

Definition at line 106 of file CSCGeometry.h.

References debugV_.

106 { debugV_ = dbgv; }
void CSCGeometry::setGangedStripsInME1a ( bool  gs)
inline

Definition at line 102 of file CSCGeometry.h.

References gangedstripsME1a_.

102 { gangedstripsME1a_ = gs; }
bool gangedstripsME1a_
Definition: CSCGeometry.h:174
Definition: AbsArchive.cc:53
void CSCGeometry::setOnlyWiresInME1a ( bool  ow)
inline

Definition at line 103 of file CSCGeometry.h.

References onlywiresME1a_.

103 { onlywiresME1a_ = ow; }
bool onlywiresME1a_
Definition: CSCGeometry.h:175
void CSCGeometry::setUseCentreTIOffsets ( bool  cti)
inline

Definition at line 105 of file CSCGeometry.h.

References useCentreTIOffsets_.

105 { useCentreTIOffsets_ = cti; }
bool useCentreTIOffsets_
Definition: CSCGeometry.h:177
void CSCGeometry::setUseRealWireGeometry ( bool  rwg)
inline

Definition at line 104 of file CSCGeometry.h.

References realWireGeometry_.

104 { realWireGeometry_ = rwg; }
bool realWireGeometry_
Definition: CSCGeometry.h:176
bool CSCGeometry::wiresOnly ( ) const
inline

Wires only in ME1a

Definition at line 116 of file CSCGeometry.h.

References onlywiresME1a_.

116 { return onlywiresME1a_; }
bool onlywiresME1a_
Definition: CSCGeometry.h:175

Friends And Related Function Documentation

friend class CSCGeometryBuilder
friend

Definition at line 35 of file CSCGeometry.h.

friend class GeometryAligner
friend

Definition at line 36 of file CSCGeometry.h.

Member Data Documentation

bool CSCGeometry::debugV_
private

Definition at line 172 of file CSCGeometry.h.

Referenced by CSCGeometry(), and setDebugV().

bool CSCGeometry::gangedstripsME1a_
private

Definition at line 174 of file CSCGeometry.h.

Referenced by gangedStrips(), queryModelling(), and setGangedStripsInME1a().

bool CSCGeometry::onlywiresME1a_
private

Definition at line 175 of file CSCGeometry.h.

Referenced by queryModelling(), setOnlyWiresInME1a(), and wiresOnly().

bool CSCGeometry::realWireGeometry_
private

Definition at line 176 of file CSCGeometry.h.

Referenced by queryModelling(), realWireGeometry(), and setUseRealWireGeometry().

CSCSpecsContainer CSCGeometry::specsContainer
private

Definition at line 180 of file CSCGeometry.h.

Referenced by buildSpecs(), findSpecs(), and ~CSCGeometry().

ChamberContainer CSCGeometry::theChambers
private

Definition at line 154 of file CSCGeometry.h.

Referenced by addChamber(), chambers(), and ~CSCGeometry().

DetIdContainer CSCGeometry::theDetIds
private

Definition at line 164 of file CSCGeometry.h.

Referenced by addDet(), and detIds().

DetContainer CSCGeometry::theDets
private

Definition at line 162 of file CSCGeometry.h.

Referenced by addDet(), and dets().

DetTypeContainer CSCGeometry::theDetTypes
private

Definition at line 161 of file CSCGeometry.h.

Referenced by addDetType(), addLayer(), and detTypes().

DetIdContainer CSCGeometry::theDetUnitIds
private

Definition at line 165 of file CSCGeometry.h.

Referenced by addLayer(), and detUnitIds().

DetContainer CSCGeometry::theDetUnits
private

Definition at line 163 of file CSCGeometry.h.

Referenced by addLayer(), and detUnits().

LayerContainer CSCGeometry::theLayers
private

Definition at line 168 of file CSCGeometry.h.

Referenced by addLayer(), and layers().

CSCDetMap CSCGeometry::theMap
private

Definition at line 157 of file CSCGeometry.h.

Referenced by addDet(), and idToDet().

bool CSCGeometry::useCentreTIOffsets_
private

Definition at line 177 of file CSCGeometry.h.

Referenced by centreTIOffsets(), queryModelling(), and setUseCentreTIOffsets().