#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. | |
CSCGeometry (bool debugV, bool gangedstripsME1a_, bool onlywiresME1a_, bool realWireGeometry_, bool useCentreTIOffsets_) | |
Real 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 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 |
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), realWireGeometry_(true), useCentreTIOffsets_(false) { if ( debugV_ ) 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. } }
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::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 |
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(), MuonMesh::isClusteredWith(), MuonSimHitProducer::produce(), and CSCTriggerGeomManager::sectorOfChambersInStation().
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_; }
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.
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 93 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 124 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 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] |
void CSCGeometry::setGangedStripsInME1a | ( | bool | gs | ) | [inline] |
Definition at line 101 of file CSCGeometry.h.
References gangedstripsME1a_.
{ gangedstripsME1a_ = gs; }
void CSCGeometry::setOnlyWiresInME1a | ( | bool | ow | ) | [inline] |
void CSCGeometry::setUseCentreTIOffsets | ( | bool | cti | ) | [inline] |
Definition at line 104 of file CSCGeometry.h.
References useCentreTIOffsets_.
{ useCentreTIOffsets_ = cti; }
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_; }
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 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.
DetContainer CSCGeometry::theDets [private] |
Definition at line 161 of file CSCGeometry.h.
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.
bool CSCGeometry::useCentreTIOffsets_ [private] |
Definition at line 176 of file CSCGeometry.h.
Referenced by centreTIOffsets(), queryModelling(), and setUseCentreTIOffsets().