CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

CSCGeometry Class Reference

#include <CSCGeometry.h>

Inheritance diagram for CSCGeometry:
TrackingGeometry

List of all members.

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.
const ChamberContainerchambers () const
 Return a vector of all chambers.
 CSCGeometry ()
 Default constructor.
 CSCGeometry (bool debugV, bool gangedstripsME1a_, bool onlywiresME1a_, bool realWireGeometry_, bool useCentreTIOffsets_)
 Real constructor.
virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
virtual const DetContainerdets () const
 Returm a vector of all GeomDet (including all GeomDetUnits)
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types.
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds.
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit.
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.
const CSCLayerlayer (CSCDetId id) const
 Return the layer corresponding to given DetId.
const LayerContainerlayers () const
 Return a vector of all layers.
void queryModelling () const
 Dump parameters for overall strip and wire modelling.
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.

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.
void addDet (GeomDet *det)
 Add a GeomDet; not to be called by the builder.
void addDetId (DetId id)
 Add a DetId.
void addDetType (GeomDetType *type)
 Add a DetType.
void addLayer (CSCLayer *l)
 Add a DetUnit.

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

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().

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().

                                                                                                                               :  
   debugV_(dbgv), gangedstripsME1a_( gangedstripsME1a ), onlywiresME1a_( onlywiresME1a ), 
   realWireGeometry_( realWireGeometry ), useCentreTIOffsets_( useCentreTIOffsets ) {
   if ( debugV_ ) queryModelling();
}
CSCGeometry::~CSCGeometry ( ) [virtual]

Destructor.

Definition at line 21 of file CSCGeometry.cc.

References specsContainer, and theChambers.

                         {

  // delete all the chambers (which will delete the layers)
  for (ChamberContainer::const_iterator ich=theChambers.begin();
       ich!=theChambers.end(); ++ich) delete (*ich);

  // delete specs
  for ( CSCSpecsContainer::const_iterator it =
           specsContainer.begin(); it!=specsContainer.end(); ++it) {
    delete (*it).second; // they are never shared per chamber type so should be no possible double deletion.
  }

}  

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.

                                          {
  theChambers.push_back(ch);
  addDet(ch);
}
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().

                                    {
  theDets.push_back(det);  
  theDetIds.push_back(det->geographicalId());
  theMap.insert(CSCDetMap::value_type(det->geographicalId(),det));
}
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.

                                              {
  theDetTypes.push_back(type);
}
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().

                                      {
  theDetUnits.push_back(l);
  theLayers.push_back(l);
  theDetTypes.push_back(const_cast<GeomDetType*>(&(l->type()))); //@@ FIXME drop const_cast asap!
  theDetUnitIds.push_back(l->geographicalId());
  addDet(l);
}
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.

                                                                         {

  // Note arg list order is hbot, htop, apothem, hthickness
  TrapezoidalPlaneBounds bounds( fpar[0], fpar[1], fpar[3], fpar[2] );
  const CSCChamberSpecs* aSpecs = new CSCChamberSpecs( this, iChamberType, bounds, fupar, wg );
  specsContainer[ iChamberType ] = aSpecs;
  return aSpecs;
}
bool CSCGeometry::centreTIOffsets ( ) const [inline]

Use the backed-out offsets for theCentreToIntersection in CSCLayerGeometry

Definition at line 130 of file CSCGeometry.h.

References useCentreTIOffsets_.

{ return useCentreTIOffsets_; }
const CSCChamber * CSCGeometry::chamber ( CSCDetId  id) const
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().

{
  return theChambers;
}
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.

{
  return theDetIds;
}
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.

{
  return theDets;
}
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.

{
  return theDetTypes;
}
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.

{
  return theDetUnitIds;
}
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.

{
  return theDetUnits;
}
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.

                                                                {
  const CSCChamberSpecs* aSpecs = 0;
  CSCSpecsContainer::const_iterator it = specsContainer.find( iChamberType );
  if (  it != specsContainer.end() )  aSpecs = (*it).second;
  return aSpecs;
} 
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().

{ return gangedstripsME1a_; }
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 chamber(), idToDetUnit(), CSCPairResidualsConstraint::isFiducial(), CSCPairResidualsConstraint::radius(), and CSCPairResidualsConstraint::setZplane().

                                                 {
  CSCDetMap::const_iterator i = theMap.find(id);
  return (i != theMap.end()) ?
    i->second : 0 ;
}
const GeomDetUnit * CSCGeometry::idToDetUnit ( DetId  ) const [virtual]
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.

{
  return theLayers;
}
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().

                                       {
  // Dump user-selected overall modelling parameters.
  // Only requires calling once per job.

  LogTrace("CSCGeometry|CSC")  << "CSCGeometry::queryModelling entered...";

  edm::LogInfo("CSC") << "CSCGeometry version 18-Oct-2012 queryModelling...\n";

  std::string gs = " ";
  if ( gangedstripsME1a_ )
    gs = "GANGED";
  else
    gs = "UNGANGED";

  edm::LogInfo("CSC") << "CSCGeometry: in ME1a use " << gs << " strips" << "\n";

  std::string wo = " ";
  if ( onlywiresME1a_ )
    wo = "WIRES ONLY";
  else
    wo = "WIRES & STRIPS";

  edm::LogInfo("CSC") << "CSCGeometry: in ME1a use  " << wo << "\n";

  std::string wg = " ";
  if ( realWireGeometry_ )
    wg = "REAL";
  else
    wg = "PSEUDO";

  edm::LogInfo("CSC") << "CSCGeometry: wires are modelled using " << wg << " wire geometry " << "\n";

  std::string cti = " ";
  if ( useCentreTIOffsets_ )
    cti = "WITH";
  else
    cti = "WITHOUT";

  edm::LogInfo("CSC") << "CSCGeometry: strip plane centre-to-intersection ideal " << cti << " corrections " << "\n";
}
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().

{ return realWireGeometry_; }
void CSCGeometry::setDebugV ( bool  dbgv) [inline]

Definition at line 105 of file CSCGeometry.h.

References debugV_.

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

Definition at line 101 of file CSCGeometry.h.

References gangedstripsME1a_.

void CSCGeometry::setOnlyWiresInME1a ( bool  ow) [inline]

Definition at line 102 of file CSCGeometry.h.

References onlywiresME1a_.

{ onlywiresME1a_ = ow; }
void CSCGeometry::setUseCentreTIOffsets ( bool  cti) [inline]

Definition at line 104 of file CSCGeometry.h.

References useCentreTIOffsets_.

void CSCGeometry::setUseRealWireGeometry ( bool  rwg) [inline]

Definition at line 103 of file CSCGeometry.h.

References realWireGeometry_.

{ realWireGeometry_ = rwg; }
bool CSCGeometry::wiresOnly ( ) const [inline]

Wires only in ME1a

Definition at line 115 of file CSCGeometry.h.

References onlywiresME1a_.

{ return onlywiresME1a_; }

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().

Definition at line 173 of file CSCGeometry.h.

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

Definition at line 174 of file CSCGeometry.h.

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

Definition at line 175 of file CSCGeometry.h.

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

Definition at line 179 of file CSCGeometry.h.

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

Definition at line 153 of file CSCGeometry.h.

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

Definition at line 163 of file CSCGeometry.h.

Referenced by addDet(), and detIds().

Definition at line 161 of file CSCGeometry.h.

Referenced by addDet(), and dets().

Definition at line 160 of file CSCGeometry.h.

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

Definition at line 164 of file CSCGeometry.h.

Referenced by addLayer(), and detUnitIds().

Definition at line 162 of file CSCGeometry.h.

Referenced by addLayer(), and detUnits().

Definition at line 167 of file CSCGeometry.h.

Referenced by addLayer(), and layers().

Definition at line 156 of file CSCGeometry.h.

Referenced by addDet(), and idToDet().

Definition at line 176 of file CSCGeometry.h.

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