#include <CSCGeometry.h>
Public Member Functions | |
const CSCChamberSpecs * | buildSpecs (int iChamberType, const std::vector< float > &fpar, const std::vector< float > &fupar, const CSCWireGroupPackage &wg) |
bool | centreTIOffsets () const |
const CSCChamber * | chamber (CSCDetId id) const |
Return the chamber corresponding to given DetId. | |
const ChamberContainer & | chambers () const |
Return a vector of all chambers. | |
CSCGeometry () | |
Default constructor. | |
virtual const DetIdContainer & | detIds () const |
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) | |
virtual const DetContainer & | dets () const |
Returm a vector of all GeomDet (including all GeomDetUnits) | |
virtual const DetTypeContainer & | detTypes () const |
Return a vector of all det types. | |
virtual const DetIdContainer & | detUnitIds () const |
Returm a vector of all GeomDetUnit DetIds. | |
virtual const DetUnitContainer & | detUnits () const |
Returm a vector of all GeomDetUnit. | |
const CSCChamberSpecs * | findSpecs (int iChamberType) |
bool | gangedStrips () const |
virtual const GeomDet * | idToDet (DetId) const |
virtual const GeomDetUnit * | idToDetUnit (DetId) const |
Return the pointer to the GeomDetUnit corresponding to a given DetId. | |
const CSCLayer * | layer (CSCDetId id) const |
Return the layer corresponding to given DetId. | |
const LayerContainer & | layers () 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 wg) |
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 |
CSCSpecsContainer | specsContainer |
ChamberContainer | theChambers |
DetIdContainer | theDetIds |
DetContainer | theDets |
DetTypeContainer | theDetTypes |
DetIdContainer | theDetUnitIds |
DetUnitContainer | theDetUnits |
LayerContainer | theLayers |
CSCDetMap | theMap |
bool | useCentreTIOffsets |
bool | useRealWireGeometry |
Friends | |
class | CSCGeometryBuilder |
class | GeometryAligner |
The model of the geometry of the endcap muon CSC detectors.
Definition at line 24 of file CSCGeometry.h.
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.
CSCGeometry::CSCGeometry | ( | ) |
Default constructor.
Definition at line 10 of file CSCGeometry.cc.
References debugV, and queryModelling().
: debugV(false), gangedstripsME1a(true), onlywiresME1a(false), useRealWireGeometry(true), useCentreTIOffsets(false) { if ( debugV ) queryModelling(); }
CSCGeometry::~CSCGeometry | ( | ) | [virtual] |
Destructor.
Definition at line 15 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. } }
void CSCGeometry::addChamber | ( | CSCChamber * | ch | ) | [private] |
Add a chamber with given DetId.
Definition at line 30 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 50 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::addDetType | ( | GeomDetType * | type | ) | [private] |
Add a DetType.
Definition at line 45 of file CSCGeometry.cc.
References theDetTypes.
{ theDetTypes.push_back(type); }
void CSCGeometry::addLayer | ( | CSCLayer * | l | ) | [private] |
Add a DetUnit.
Definition at line 36 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 173 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 127 of file CSCGeometry.h.
References useCentreTIOffsets.
{ return useCentreTIOffsets; }
const CSCChamber * CSCGeometry::chamber | ( | CSCDetId | id | ) | const |
Return the chamber corresponding to given DetId.
Definition at line 117 of file CSCGeometry.cc.
References Reference_intrackfit_cff::endcap, idToDet(), relativeConstraints::ring, and relativeConstraints::station.
Referenced by CSCSegmentBuilder::build(), CSCHaloAlgo::Calculate(), CSCTriggerGeomManager::chamber(), MuonMesh::isClusteredWith(), MuonSimHitProducer::produce(), and CSCTriggerGeomManager::sectorOfChambersInStation().
const CSCGeometry::ChamberContainer & CSCGeometry::chambers | ( | ) | const |
Return a vector of all chambers.
Definition at line 100 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 81 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 69 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 57 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 75 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 63 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 166 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 107 of file CSCGeometry.h.
References gangedstripsME1a.
Referenced by CSCLayerGeometry::CSCLayerGeometry().
{ return gangedstripsME1a; }
Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)
Implements TrackingGeometry.
Definition at line 93 of file CSCGeometry.cc.
Referenced by chamber(), idToDetUnit(), CSCPairResidualsConstraint::isFiducial(), CSCPairResidualsConstraint::radius(), and CSCPairResidualsConstraint::setZplane().
const GeomDetUnit * CSCGeometry::idToDetUnit | ( | DetId | ) | const [virtual] |
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Implements TrackingGeometry.
Definition at line 87 of file CSCGeometry.cc.
References idToDet().
Referenced by CSCHaloAlgo::Calculate(), GlobalHaloAlgo::Calculate(), MuonSimHitsValidAnalyzer::fillCSC(), GlobalRecHitsProducer::fillMuon(), GlobalHitsProdHist::fillMuon(), GlobalRecHitsAnalyzer::fillMuon(), GlobalHitsAnalyzer::fillMuon(), GlobalHitsProducer::fillMuon(), CSCBaseValidation::findLayer(), CSCDigitizer::findLayer(), layer(), and MuonSimHitProducer::produce().
{ return dynamic_cast<const GeomDetUnit*>(idToDet(id)); }
Return the layer corresponding to given DetId.
Definition at line 123 of file CSCGeometry.cc.
References idToDetUnit().
Referenced by MuonCSCChamberResidual::addResidual(), MuonTruth::analyze(), MuonTruth::associateCSCHitId(), MuonTruth::associateHitId(), CSCPairResidualsConstraint::calculatePhi(), and CSCRecHitDBuilder::getLayer().
{ return dynamic_cast<const CSCLayer*>(idToDetUnit(id)); }
const CSCGeometry::LayerContainer & CSCGeometry::layers | ( | ) | const |
Return a vector of all layers.
Definition at line 106 of file CSCGeometry.cc.
References theLayers.
{ // for( DetUnitContainer::const_iterator it = theDetUnits.begin(); // it != theDetUnits.end(); ++it ) { // CSCLayer* layer = dynamic_cast<CSCLayer*>( *it ); // if ( layer ) theLayers.push_back( layer ); // } return theLayers; }
void CSCGeometry::queryModelling | ( | ) | const |
Dump parameters for overall strip and wire modelling.
Definition at line 127 of file CSCGeometry.cc.
References gangedstripsME1a, LogTrace, onlywiresME1a, useCentreTIOffsets, and useRealWireGeometry.
Referenced by CSCGeometry().
{ // Dump user-selected overall modelling parameters. // Only requires calling once per job. LogTrace("CSCGeometry|CSC") << "CSCGeometry::queryModelling entered..."; 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 ( useRealWireGeometry ) 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 121 of file CSCGeometry.h.
References useRealWireGeometry.
Referenced by CSCLayerGeometry::CSCLayerGeometry().
{ return useRealWireGeometry; }
void CSCGeometry::setDebugV | ( | bool | dbgv | ) | [inline] |
void CSCGeometry::setGangedStripsInME1a | ( | bool | gs | ) | [inline] |
Definition at line 98 of file CSCGeometry.h.
References gangedstripsME1a.
{ gangedstripsME1a = gs; }
void CSCGeometry::setOnlyWiresInME1a | ( | bool | ow | ) | [inline] |
void CSCGeometry::setUseCentreTIOffsets | ( | bool | cti | ) | [inline] |
Definition at line 101 of file CSCGeometry.h.
References useCentreTIOffsets.
{ useCentreTIOffsets = cti; }
void CSCGeometry::setUseRealWireGeometry | ( | bool | wg | ) | [inline] |
Definition at line 100 of file CSCGeometry.h.
References useRealWireGeometry.
{ useRealWireGeometry = wg; }
bool CSCGeometry::wiresOnly | ( | ) | const [inline] |
Wires only in ME1a
Definition at line 112 of file CSCGeometry.h.
References onlywiresME1a.
{ return onlywiresME1a; }
friend class CSCGeometryBuilder [friend] |
Definition at line 34 of file CSCGeometry.h.
friend class GeometryAligner [friend] |
Definition at line 35 of file CSCGeometry.h.
bool CSCGeometry::debugV [private] |
Definition at line 168 of file CSCGeometry.h.
Referenced by CSCGeometry(), and setDebugV().
bool CSCGeometry::gangedstripsME1a [private] |
Definition at line 170 of file CSCGeometry.h.
Referenced by gangedStrips(), queryModelling(), and setGangedStripsInME1a().
bool CSCGeometry::onlywiresME1a [private] |
Definition at line 171 of file CSCGeometry.h.
Referenced by queryModelling(), setOnlyWiresInME1a(), and wiresOnly().
CSCSpecsContainer CSCGeometry::specsContainer [private] |
Definition at line 176 of file CSCGeometry.h.
Referenced by buildSpecs(), findSpecs(), and ~CSCGeometry().
ChamberContainer CSCGeometry::theChambers [private] |
Definition at line 150 of file CSCGeometry.h.
Referenced by addChamber(), chambers(), and ~CSCGeometry().
DetIdContainer CSCGeometry::theDetIds [private] |
Definition at line 160 of file CSCGeometry.h.
DetContainer CSCGeometry::theDets [private] |
Definition at line 158 of file CSCGeometry.h.
DetTypeContainer CSCGeometry::theDetTypes [private] |
Definition at line 157 of file CSCGeometry.h.
Referenced by addDetType(), addLayer(), and detTypes().
DetIdContainer CSCGeometry::theDetUnitIds [private] |
Definition at line 161 of file CSCGeometry.h.
Referenced by addLayer(), and detUnitIds().
DetUnitContainer CSCGeometry::theDetUnits [private] |
Definition at line 159 of file CSCGeometry.h.
Referenced by addLayer(), and detUnits().
LayerContainer CSCGeometry::theLayers [private] |
Definition at line 164 of file CSCGeometry.h.
Referenced by addLayer(), and layers().
CSCDetMap CSCGeometry::theMap [private] |
Definition at line 153 of file CSCGeometry.h.
bool CSCGeometry::useCentreTIOffsets [private] |
Definition at line 173 of file CSCGeometry.h.
Referenced by centreTIOffsets(), queryModelling(), and setUseCentreTIOffsets().
bool CSCGeometry::useRealWireGeometry [private] |
Definition at line 172 of file CSCGeometry.h.
Referenced by queryModelling(), realWireGeometry(), and setUseRealWireGeometry().