CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
CSCGeometry Class Reference

#include <CSCGeometry.h>

Inheritance diagram for CSCGeometry:
TrackingGeometry

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...
 
virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit. More...
 
const CSCChamberSpecsfindSpecs (int iChamberType)
 
bool gangedStrips () const
 
virtual const GeomDetidToDet (DetId) const
 
virtual const GeomDetUnitidToDetUnit (DetId) const
 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
 
virtual ~CSCGeometry ()
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Types

typedef std::vector< CSCChamber * > ChamberContainer
 
typedef std::map< DetId,
GeomDet * > 
CSCDetMap
 
typedef std::map< int, const
CSCChamberSpecs *, std::less
< int > > 
CSCSpecsContainer
 
typedef std::vector< CSCLayer * > LayerContainer
 

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
 
DetUnitContainer theDetUnits
 
LayerContainer theLayers
 
CSCDetMap theMap
 
bool useCentreTIOffsets_
 

Friends

class CSCGeometryBuilder
 
class GeometryAligner
 

Additional Inherited Members

- Public Types inherited from TrackingGeometry
typedef std::vector< GeomDet * > DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector
< GeomDetType * > 
DetTypeContainer
 
typedef std::vector
< GeomDetUnit * > 
DetUnitContainer
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDet * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit * > 
mapIdToDetUnit
 

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<CSCChamber*> CSCGeometry::ChamberContainer
private

Definition at line 29 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<CSCLayer*> CSCGeometry::LayerContainer
private

Definition at line 30 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:175
bool useCentreTIOffsets_
Definition: CSCGeometry.h:176
bool gangedstripsME1a_
Definition: CSCGeometry.h:173
bool onlywiresME1a_
Definition: CSCGeometry.h:174
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:175
bool realWireGeometry() const
Definition: CSCGeometry.h:124
bool useCentreTIOffsets_
Definition: CSCGeometry.h:176
bool gangedstripsME1a_
Definition: CSCGeometry.h:173
bool onlywiresME1a_
Definition: CSCGeometry.h:174
CSCGeometry::~CSCGeometry ( )
virtual

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:179
ChamberContainer theChambers
Definition: CSCGeometry.h:153

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.

36  {
37  theChambers.push_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:153
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(), and addLayer().

56  {
57  theDets.push_back(det);
58  theDetIds.push_back(det->geographicalId());
59  theMap.insert(CSCDetMap::value_type(det->geographicalId(),det));
60 }
CSCDetMap theMap
Definition: CSCGeometry.h:156
DetContainer theDets
Definition: CSCGeometry.h:161
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Container::value_type value_type
DetIdContainer theDetIds
Definition: CSCGeometry.h:163
void CSCGeometry::addDetId ( DetId  id)
private

Add a DetId.

void CSCGeometry::addDetType ( GeomDetType type)
private

Add a DetType.

Definition at line 51 of file CSCGeometry.cc.

References theDetTypes.

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

Add a DetUnit.

Definition at line 42 of file CSCGeometry.cc.

References addDet(), GeomDet::geographicalId(), theDetTypes, theDetUnitIds, theDetUnits, theLayers, and CSCLayer::type().

42  {
43  theDetUnits.push_back(l);
44  theLayers.push_back(l);
45  theDetTypes.push_back(const_cast<GeomDetType*>(&(l->type()))); //@@ FIXME drop const_cast asap!
46  theDetUnitIds.push_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
DetUnitContainer theDetUnits
Definition: CSCGeometry.h:162
DetTypeContainer theDetTypes
Definition: CSCGeometry.h:160
const GeomDetType & type() const
Definition: CSCLayer.h:33
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
DetIdContainer theDetUnitIds
Definition: CSCGeometry.h:164
LayerContainer theLayers
Definition: CSCGeometry.h:167
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:179
bool CSCGeometry::centreTIOffsets ( ) const
inline

Use the backed-out offsets for theCentreToIntersection in CSCLayerGeometry

Definition at line 130 of file CSCGeometry.h.

References useCentreTIOffsets_.

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

Return the chamber corresponding to given DetId.

Definition at line 118 of file CSCGeometry.cc.

References Reference_intrackfit_cff::endcap, idToDet(), relativeConstraints::ring, and relativeConstraints::station.

Referenced by CSCSegmentBuilder::build(), CSCHaloAlgo::Calculate(), CSCTriggerGeomManager::chamber(), geometryXMLparser.CSCAlignable::index(), MuonMesh::isClusteredWith(), MuonSimHitProducer::produce(), and CSCTriggerGeomManager::sectorOfChambersInStation().

118  {
119  CSCDetId id1(id.endcap(), id.station(), id.ring(), id.chamber(), 0);
120  return dynamic_cast<const CSCChamber*>(idToDet(id1));
121 }
virtual const GeomDet * idToDet(DetId) const
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

Return a vector of all chambers.

Definition at line 106 of file CSCGeometry.cc.

References theChambers.

Referenced by FWRecoGeometryESProducer::addCSCGeometry(), and AlignableMuon::buildCSCEndcap().

107 {
108  return theChambers;
109 }
ChamberContainer theChambers
Definition: CSCGeometry.h:153
const CSCGeometry::DetIdContainer & CSCGeometry::detIds ( ) const
virtual

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:163
const CSCGeometry::DetContainer & CSCGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 75 of file CSCGeometry.cc.

References theDets.

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

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 63 of file CSCGeometry.cc.

References theDetTypes.

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

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:164
const CSCGeometry::DetUnitContainer & CSCGeometry::detUnits ( ) const
virtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 69 of file CSCGeometry.cc.

References theDetUnits.

70 {
71  return theDetUnits;
72 }
DetUnitContainer theDetUnits
Definition: CSCGeometry.h:162
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 = 0;
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:179
bool CSCGeometry::gangedStrips ( ) const
inline

Ganged strips in ME1a

Definition at line 110 of file CSCGeometry.h.

References gangedstripsME1a_.

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

110 { return gangedstripsME1a_; }
bool gangedstripsME1a_
Definition: CSCGeometry.h:173
const GeomDet * CSCGeometry::idToDet ( DetId  ) const
virtual

Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)

Implements TrackingGeometry.

Definition at line 99 of file CSCGeometry.cc.

References i, and theMap.

Referenced by MuonCSCDetLayerGeometryBuilder::buildLayer(), chamber(), idToDetUnit(), CSCPairResidualsConstraint::isFiducial(), CSCPairResidualsConstraint::radius(), and CSCPairResidualsConstraint::setZplane().

99  {
100  CSCDetMap::const_iterator i = theMap.find(id);
101  return (i != theMap.end()) ?
102  i->second : 0 ;
103 }
int i
Definition: DBlmapReader.cc:9
CSCDetMap theMap
Definition: CSCGeometry.h:156
const GeomDetUnit * CSCGeometry::idToDetUnit ( DetId  ) const
virtual
const CSCLayer * CSCGeometry::layer ( CSCDetId  id) const

Return the layer corresponding to given DetId.

Definition at line 124 of file CSCGeometry.cc.

References idToDetUnit().

Referenced by MuonCSCChamberResidual::addResidual(), MuonTruth::analyze(), MuonTruth::associateCSCHitId(), MuonTruth::associateHitId(), CSCPairResidualsConstraint::calculatePhi(), CSCRecHitDBuilder::getLayer(), geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

124  {
125  return dynamic_cast<const CSCLayer*>(idToDetUnit(id));
126 }
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:93
const CSCGeometry::LayerContainer & CSCGeometry::layers ( ) const

Return a vector of all layers.

Definition at line 112 of file CSCGeometry.cc.

References theLayers.

113 {
114  return theLayers;
115 }
LayerContainer theLayers
Definition: CSCGeometry.h:167
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 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:175
#define LogTrace(id)
bool useCentreTIOffsets_
Definition: CSCGeometry.h:176
bool gangedstripsME1a_
Definition: CSCGeometry.h:173
bool onlywiresME1a_
Definition: CSCGeometry.h:174
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 124 of file CSCGeometry.h.

References realWireGeometry_.

Referenced by CSCLayerGeometry::CSCLayerGeometry().

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

Definition at line 105 of file CSCGeometry.h.

References debugV_.

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

Definition at line 101 of file CSCGeometry.h.

References gangedstripsME1a_.

101 { gangedstripsME1a_ = gs; }
bool gangedstripsME1a_
Definition: CSCGeometry.h:173
void CSCGeometry::setOnlyWiresInME1a ( bool  ow)
inline

Definition at line 102 of file CSCGeometry.h.

References onlywiresME1a_.

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

Definition at line 104 of file CSCGeometry.h.

References useCentreTIOffsets_.

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

Definition at line 103 of file CSCGeometry.h.

References realWireGeometry_.

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

Wires only in ME1a

Definition at line 115 of file CSCGeometry.h.

References onlywiresME1a_.

115 { return onlywiresME1a_; }
bool onlywiresME1a_
Definition: CSCGeometry.h:174

Friends And Related Function Documentation

friend class CSCGeometryBuilder
friend

Definition at line 34 of file CSCGeometry.h.

friend class GeometryAligner
friend

Definition at line 35 of file CSCGeometry.h.

Member Data Documentation

bool CSCGeometry::debugV_
private

Definition at line 171 of file CSCGeometry.h.

Referenced by CSCGeometry(), and setDebugV().

bool CSCGeometry::gangedstripsME1a_
private

Definition at line 173 of file CSCGeometry.h.

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

bool CSCGeometry::onlywiresME1a_
private

Definition at line 174 of file CSCGeometry.h.

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

bool CSCGeometry::realWireGeometry_
private

Definition at line 175 of file CSCGeometry.h.

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

CSCSpecsContainer CSCGeometry::specsContainer
private

Definition at line 179 of file CSCGeometry.h.

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

ChamberContainer CSCGeometry::theChambers
private

Definition at line 153 of file CSCGeometry.h.

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

DetIdContainer CSCGeometry::theDetIds
private

Definition at line 163 of file CSCGeometry.h.

Referenced by addDet(), and detIds().

DetContainer CSCGeometry::theDets
private

Definition at line 161 of file CSCGeometry.h.

Referenced by addDet(), and dets().

DetTypeContainer CSCGeometry::theDetTypes
private

Definition at line 160 of file CSCGeometry.h.

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

DetIdContainer CSCGeometry::theDetUnitIds
private

Definition at line 164 of file CSCGeometry.h.

Referenced by addLayer(), and detUnitIds().

DetUnitContainer CSCGeometry::theDetUnits
private

Definition at line 162 of file CSCGeometry.h.

Referenced by addLayer(), and detUnits().

LayerContainer CSCGeometry::theLayers
private

Definition at line 167 of file CSCGeometry.h.

Referenced by addLayer(), and layers().

CSCDetMap CSCGeometry::theMap
private

Definition at line 156 of file CSCGeometry.h.

Referenced by addDet(), and idToDet().

bool CSCGeometry::useCentreTIOffsets_
private

Definition at line 176 of file CSCGeometry.h.

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