#include <CaloSubdetectorGeometry.h>
Public Types | |
typedef CaloCellGeometry::CCGFloat | CCGFloat |
typedef std::vector < CaloCellGeometry const * > | CellSet |
typedef std::set< DetId > | DetIdSet |
typedef std::vector< CCGFloat > | DimVec |
typedef std::vector< unsigned int > | IVec |
typedef CaloCellGeometry::ParMgr | ParMgr |
typedef CaloCellGeometry::ParVec | ParVec |
typedef CaloCellGeometry::ParVecVec | ParVecVec |
typedef std::vector< CCGFloat > | TrVec |
Public Member Functions | |
void | allocateCorners (CaloCellGeometry::CornersVec::size_type n) |
void | allocatePar (ParVec::size_type n, unsigned int m) |
CaloSubdetectorGeometry () | |
CaloCellGeometry::CornersMgr * | cornersMgr () |
CCGFloat | deltaEta (const DetId &detId) const |
CCGFloat | deltaPhi (const DetId &detId) const |
virtual void | fillDefaultNamedParameters () const |
virtual DetIdSet | getCells (const GlobalPoint &r, double dR) const |
Get a list of all cells within a dR of the given cell. | |
virtual CellSet | getCellSet (const GlobalPoint &r, double dR) const |
virtual DetId | getClosestCell (const GlobalPoint &r) const |
virtual const CaloCellGeometry * | getGeometry (const DetId &id) const |
Get the cell geometry of a given detector id. Should return false if not found. | |
virtual void | getSummary (TrVec &trVector, IVec &iVector, DimVec &dimVector, std::vector< uint32_t > &dins) const |
virtual const std::vector < DetId > & | getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const |
Get a list of valid detector ids (for the given subdetector) | |
virtual void | initializeParms () |
virtual void | newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0 |
virtual unsigned int | numberOfParametersPerShape () const |
virtual unsigned int | numberOfShapes () const |
virtual unsigned int | numberOfTransformParms () const |
ParMgr * | parMgr () |
const ParMgr * | parMgrConst () const |
ParVecVec & | parVecVec () |
const ParVecVec & | parVecVec () const |
virtual bool | present (const DetId &id) const |
is this detid present in the geometry? | |
virtual | ~CaloSubdetectorGeometry () |
The base class DOES assume that it owns the CaloCellGeometry objects. | |
Protected Member Functions | |
virtual const CaloCellGeometry * | cellGeomPtr (uint32_t index) const =0 |
virtual unsigned int | indexFor (const DetId &id) const |
virtual unsigned int | sizeForDenseIndex (const DetId &id) const |
Static Protected Member Functions | |
static CCGFloat | deltaR (const GlobalPoint &p1, const GlobalPoint &p2) |
Protected Attributes | |
ParVecVec | m_parVecVec |
std::vector< DetId > | m_validIds |
Private Member Functions | |
CaloSubdetectorGeometry (const CaloSubdetectorGeometry &) | |
avoid copies | |
CaloSubdetectorGeometry & | operator= (const CaloSubdetectorGeometry &) |
Private Attributes | |
CaloCellGeometry::CornersMgr * | m_cmgr |
std::vector< CCGFloat > * | m_deltaEta |
std::vector< CCGFloat > * | m_deltaPhi |
ParMgr * | m_parMgr |
bool | m_sortedIds |
Base class for a geometry container for a specific calorimetry subdetector.
Definition at line 24 of file CaloSubdetectorGeometry.h.
Reimplemented in GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, EcalPreshowerGeometry, EcalTBHodoscopeGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, and HcalGeometry.
Definition at line 28 of file CaloSubdetectorGeometry.h.
typedef std::vector<CaloCellGeometry const *> CaloSubdetectorGeometry::CellSet |
Definition at line 27 of file CaloSubdetectorGeometry.h.
typedef std::set<DetId> CaloSubdetectorGeometry::DetIdSet |
Definition at line 30 of file CaloSubdetectorGeometry.h.
typedef std::vector<CCGFloat> CaloSubdetectorGeometry::DimVec |
Definition at line 39 of file CaloSubdetectorGeometry.h.
typedef std::vector<unsigned int> CaloSubdetectorGeometry::IVec |
Definition at line 38 of file CaloSubdetectorGeometry.h.
Definition at line 33 of file CaloSubdetectorGeometry.h.
Reimplemented in EcalPreshowerGeometry.
Definition at line 34 of file CaloSubdetectorGeometry.h.
Reimplemented in EcalPreshowerGeometry.
Definition at line 35 of file CaloSubdetectorGeometry.h.
typedef std::vector<CCGFloat> CaloSubdetectorGeometry::TrVec |
Definition at line 37 of file CaloSubdetectorGeometry.h.
CaloSubdetectorGeometry::CaloSubdetectorGeometry | ( | ) |
Definition at line 13 of file CaloSubdetectorGeometry.cc.
: m_parMgr ( 0 ) , m_cmgr ( 0 ) , m_sortedIds (false) , m_deltaPhi ( 0 ) , m_deltaEta ( 0 ) {}
CaloSubdetectorGeometry::~CaloSubdetectorGeometry | ( | ) | [virtual] |
The base class DOES assume that it owns the CaloCellGeometry objects.
Definition at line 22 of file CaloSubdetectorGeometry.cc.
References m_cmgr, m_deltaEta, m_deltaPhi, and m_parMgr.
{ delete m_cmgr ; delete m_parMgr ; delete m_deltaPhi ; delete m_deltaEta ; }
CaloSubdetectorGeometry::CaloSubdetectorGeometry | ( | const CaloSubdetectorGeometry & | ) | [private] |
avoid copies
void CaloSubdetectorGeometry::allocateCorners | ( | CaloCellGeometry::CornersVec::size_type | n | ) |
Definition at line 129 of file CaloSubdetectorGeometry.cc.
References CaloCellGeometry::k_cornerSize, m_cmgr, and m_validIds.
Referenced by CastorHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ assert( 0 == m_cmgr ) ; m_cmgr = new CaloCellGeometry::CornersMgr( n*( CaloCellGeometry::k_cornerSize ), CaloCellGeometry::k_cornerSize ) ; m_validIds.reserve( n ) ; }
void CaloSubdetectorGeometry::allocatePar | ( | ParVec::size_type | n, |
unsigned int | m | ||
) |
Definition at line 139 of file CaloSubdetectorGeometry.cc.
References m_parMgr.
Referenced by CastorHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
virtual const CaloCellGeometry* CaloSubdetectorGeometry::cellGeomPtr | ( | uint32_t | index | ) | const [protected, pure virtual] |
Implemented in GCC11_FINAL< T >, GCC11_FINAL< T >, EcalPreshowerGeometry, EcalTBHodoscopeGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, HcalDDDGeometry, and HcalGeometry.
Referenced by deltaEta(), deltaPhi(), getGeometry(), and getSummary().
CaloCellGeometry::CornersMgr* CaloSubdetectorGeometry::cornersMgr | ( | ) | [inline] |
Definition at line 83 of file CaloSubdetectorGeometry.h.
References m_cmgr.
Referenced by CastorHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry(), ZdcGeometry::newCell(), CaloTowerGeometry::newCell(), HcalDDDGeometry::newCell(), HcalGeometry::newCell(), EcalTBHodoscopeGeometry::newCell(), CastorGeometry::newCell(), and EcalPreshowerGeometry::newCell().
{ return m_cmgr ; }
Definition at line 270 of file CaloSubdetectorGeometry.cc.
References cellGeomPtr(), PV3DBase< T, PVType, FrameType >::eta(), CaloCellGeometry::getCorners(), i, indexFor(), m_deltaEta, and sizeForDenseIndex().
{ if( 0 == m_deltaEta ) { const uint32_t kSize ( sizeForDenseIndex(detId)); m_deltaEta = new std::vector<CCGFloat> ( kSize ) ; for( uint32_t i ( 0 ) ; i != kSize ; ++i ) { const CaloCellGeometry* cellPtr ( cellGeomPtr( i ) ) ; if( 0 != cellPtr ) { const CaloCellGeometry& cell ( *cellPtr ) ; const CCGFloat dEta1 ( fabs( GlobalPoint( ( cell.getCorners()[0].x() + cell.getCorners()[1].x() )/2. , ( cell.getCorners()[0].y() + cell.getCorners()[1].y() )/2. , ( cell.getCorners()[0].z() + cell.getCorners()[1].z() )/2. ).eta() - GlobalPoint( ( cell.getCorners()[2].x() + cell.getCorners()[3].x() )/2. , ( cell.getCorners()[2].y() + cell.getCorners()[3].y() )/2. , ( cell.getCorners()[2].z() + cell.getCorners()[3].z() )/2. ).eta() ) ) ; const CCGFloat dEta2 ( fabs( GlobalPoint( ( cell.getCorners()[0].x() + cell.getCorners()[3].x() )/2. , ( cell.getCorners()[0].y() + cell.getCorners()[3].y() )/2. , ( cell.getCorners()[0].z() + cell.getCorners()[3].z() )/2. ).eta() - GlobalPoint( ( cell.getCorners()[2].x() + cell.getCorners()[1].x() )/2. , ( cell.getCorners()[2].y() + cell.getCorners()[1].y() )/2. , ( cell.getCorners()[2].z() + cell.getCorners()[1].z() )/2. ).eta() ) ) ; (*m_deltaEta)[i] = dEta1>dEta2 ? dEta1 : dEta2 ; } } } return (*m_deltaEta)[ indexFor(detId)]; }
Definition at line 220 of file CaloSubdetectorGeometry.cc.
References cellGeomPtr(), CaloCellGeometry::getCorners(), i, indexFor(), m_deltaPhi, M_PI, PV3DBase< T, PVType, FrameType >::phi(), and sizeForDenseIndex().
{ const CaloGenericDetId cgId ( detId ) ; if( 0 == m_deltaPhi ) { const uint32_t kSize ( sizeForDenseIndex(detId)); m_deltaPhi = new std::vector<CCGFloat> ( kSize ) ; for( uint32_t i ( 0 ) ; i != kSize ; ++i ) { const CaloCellGeometry* cellPtr ( cellGeomPtr( i ) ) ; if( 0 != cellPtr ) { const CaloCellGeometry& cell ( *cellPtr ) ; CCGFloat dPhi1 ( fabs( GlobalPoint( ( cell.getCorners()[0].x() + cell.getCorners()[1].x() )/2. , ( cell.getCorners()[0].y() + cell.getCorners()[1].y() )/2. , ( cell.getCorners()[0].z() + cell.getCorners()[1].z() )/2. ).phi() - GlobalPoint( ( cell.getCorners()[2].x() + cell.getCorners()[3].x() )/2. , ( cell.getCorners()[2].y() + cell.getCorners()[3].y() )/2. , ( cell.getCorners()[2].z() + cell.getCorners()[3].z() )/2. ).phi() ) ) ; CCGFloat dPhi2 ( fabs( GlobalPoint( ( cell.getCorners()[0].x() + cell.getCorners()[3].x() )/2. , ( cell.getCorners()[0].y() + cell.getCorners()[3].y() )/2. , ( cell.getCorners()[0].z() + cell.getCorners()[3].z() )/2. ).phi() - GlobalPoint( ( cell.getCorners()[2].x() + cell.getCorners()[1].x() )/2. , ( cell.getCorners()[2].y() + cell.getCorners()[1].y() )/2. , ( cell.getCorners()[2].z() + cell.getCorners()[1].z() )/2. ).phi() ) ) ; if( M_PI < dPhi1 ) dPhi1 = fabs( dPhi1 - 2.*M_PI ) ; if( M_PI < dPhi2 ) dPhi2 = fabs( dPhi2 - 2.*M_PI ) ; (*m_deltaPhi)[i] = dPhi1>dPhi2 ? dPhi1 : dPhi2 ; } } } return (*m_deltaPhi)[ indexFor(detId) ] ; }
static CCGFloat CaloSubdetectorGeometry::deltaR | ( | const GlobalPoint & | p1, |
const GlobalPoint & | p2 | ||
) | [inline, static, protected] |
Definition at line 115 of file CaloSubdetectorGeometry.h.
{ return reco::deltaR( p1, p2 ) ; }
virtual void CaloSubdetectorGeometry::fillDefaultNamedParameters | ( | ) | const [inline, virtual] |
Definition at line 97 of file CaloSubdetectorGeometry.h.
{ return ; }
CaloSubdetectorGeometry::DetIdSet CaloSubdetectorGeometry::getCells | ( | const GlobalPoint & | r, |
double | dR | ||
) | const [virtual] |
Get a list of all cells within a dR of the given cell.
The default implementation makes a loop over all cell geometries. Cleverer implementations are suggested to use rough conversions between eta/phi and ieta/iphi and test on the boundaries.
Reimplemented in HcalGeometry.
Definition at line 84 of file CaloSubdetectorGeometry.cc.
References reco::deltaR2(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta, PV3DBase< T, PVType, FrameType >::eta(), createXMLFile::eta0, getGeometry(), CaloCellGeometry::getPosition(), i, M_PI, m_validIds, AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::phi(), phi, and createXMLFile::phi0.
Referenced by egammaisolation::EgammaRecHitExtractor::collect(), getCellSet(), EgammaRecHitIsolation::getSum_(), CaloConeSelector::select(), and CaloDualConeSelector::select().
{ const double dR2 ( dR*dR ) ; const double eta ( r.eta() ) ; const double phi ( r.phi() ) ; DetIdSet dss; if( 0.000001 < dR ) { for( uint32_t i ( 0 ); i != m_validIds.size() ; ++i ) { const CaloCellGeometry* cell ( getGeometry( m_validIds[i] ) ) ; if( 0 != cell ) { const GlobalPoint& p ( cell->getPosition() ) ; const CCGFloat eta0 ( p.eta() ) ; if( fabs( eta - eta0 ) < dR ) { const CCGFloat phi0 ( p.phi() ) ; CCGFloat delp ( fabs( phi - phi0 ) ) ; if( delp > M_PI ) delp = 2*M_PI - delp ; if( delp < dR ) { const CCGFloat dist2 ( reco::deltaR2( eta0, phi0, eta, phi ) ) ; if( dist2 < dR2 ) dss.insert( m_validIds[i] ) ; } } } } } return dss; }
CaloSubdetectorGeometry::CellSet CaloSubdetectorGeometry::getCellSet | ( | const GlobalPoint & | r, |
double | dR | ||
) | const [virtual] |
Definition at line 120 of file CaloSubdetectorGeometry.cc.
References getCells(), and getGeometry().
{ // stupid implementation not to be really used... DetIdSet ids = getCells(r, dR); CellSet cells; cells.reserve(ids.size()); for ( auto id : ids) cells.push_back(getGeometry(id)); return cells; }
DetId CaloSubdetectorGeometry::getClosestCell | ( | const GlobalPoint & | r | ) | const [virtual] |
Reimplemented in EcalPreshowerGeometry, CastorGeometry, HcalDDDGeometry, and HcalGeometry.
Definition at line 55 of file CaloSubdetectorGeometry.cc.
References reco::deltaR2(), eta, PV3DBase< T, PVType, FrameType >::eta(), createXMLFile::eta0, getGeometry(), CaloCellGeometry::getPosition(), i, getHLTprescales::index, m_validIds, AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::phi(), phi, and createXMLFile::phi0.
Referenced by HcalCorrPFCalculation::analyze(), IsolatedTracksCone::analyze(), spr::chargeIsolation(), spr::chargeIsolationHcal(), spr::findDetIdCalo(), CaloGeometryHelper::getClosestCell(), EcalShowerProperties::getEndpoints(), HoECalculator::getHoE(), PhysicsTowerOrganizer::PhysicsTowerOrganizer(), EcalShowerProperties::processEcalRecHits(), and spr::propagateCALO().
{ const CCGFloat eta ( r.eta() ) ; const CCGFloat phi ( r.phi() ) ; uint32_t index ( ~0 ) ; CCGFloat closest ( 1e9 ) ; for( uint32_t i ( 0 ); i != m_validIds.size() ; ++i ) { const CaloCellGeometry* cell ( getGeometry( m_validIds[ i ] ) ) ; if( 0 != cell ) { const GlobalPoint& p ( cell->getPosition() ) ; const CCGFloat eta0 ( p.eta() ) ; const CCGFloat phi0 ( p.phi() ) ; const CCGFloat dR2 ( reco::deltaR2( eta0, phi0, eta, phi ) ) ; if( dR2 < closest ) { closest = dR2 ; index = i ; } } } return ( closest > 0.9e9 || (uint32_t)(~0) == index ? DetId(0) : m_validIds[index] ) ; }
const CaloCellGeometry * CaloSubdetectorGeometry::getGeometry | ( | const DetId & | id | ) | const [virtual] |
Get the cell geometry of a given detector id. Should return false if not found.
Reimplemented in HcalGeometry.
Definition at line 43 of file CaloSubdetectorGeometry.cc.
References cellGeomPtr().
Referenced by BetaCalculatorECAL::addStepToXtal(), EcalTPGParamBuilder::analyze(), EcalSelectiveReadoutValidation::analyzeEB(), EcalSelectiveReadoutValidation::analyzeEE(), EcalBoundaryInfoCalculator< EcalDetId >::boundaryRecHits(), CaloRecoTauAlgorithm::buildCaloTau(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_EnergyDepTopology(), PositionCalc::Calculate_Location(), CaloCellCrossing::CaloCellCrossing(), compEcalEnergySum(), compHcalEnergySum(), CaloTowersCreationAlgo::convert(), EcalClusterTools::covariances(), PFRecHitProducerECAL::createEcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), PFRecHitProducerHO::createHORecHit(), DistanceToCell::DistanceToCell(), InvRingCalib::EERingDef(), HCALRecHitAnalyzer::FillGeometry(), EcalDeadCellBoundaryEnergyFilter::filter(), PFRecHitProducerECAL::findEcalRecHitGeometry(), PFRecHitProducerHO::findHORecHitGeometry(), EcalBoundaryInfoCalculator< EcalDetId >::gapRecHits(), getCells(), getCellSet(), EcalDeadCellTriggerPrimitiveFilter::getChannelStatusMaps(), EcalDeadCellDeltaRFilter::getChannelStatusMaps(), getClosestCell(), CaloGeometryHelper::getClosestCell(), CastorGeometry::getClosestCell(), EcalPreshowerGeometry::getClosestCellInPlane(), HCaloDetIdAssociator::getDetIdPoints(), CaloDetIdAssociator::getDetIdPoints(), L2TauModularIsolationProducer::getECALHits(), L2TauNarrowConeIsolationProducer::getECALHits(), L2TauIsolationProducer::getECALHits(), EcalShowerProperties::getEndpoints(), EcalClusterTools::getEnergyDepTopology(), CaloGeometry::getGeometry(), CaloGeometry::getPosition(), CaloDetIdAssociator::getPosition(), HCaloDetIdAssociator::getPosition(), EcalClusterCrackCorrection::getValue(), EcalClusterLocalContCorrection::getValue(), EcalBasicClusterLocalContCorrection::getValue(), PhotonFixCMS::initialise(), CaloGeometryHelper::initialize(), EcalRingCalibrationTools::initializeFromGeometry(), EcalPreshowerGeometry::initializeParms(), CaloDetIdAssociator::insideElement(), HCaloDetIdAssociator::insideElement(), CalorimetryManager::loadFromEcalBarrel(), CalorimetryManager::loadFromEcalEndcap(), CalorimetryManager::loadFromHcal(), EcalClusterLocal::localCoordsEB(), EcalClusterLocal::localCoordsEE(), CosmicClusterAlgo::makeClusters(), Multi5x5ClusterAlgo::makeClusters(), IslandClusterAlgo::makeClusters(), PreshowerClusterAlgo::makeOneCluster(), PreshowerPhiClusterAlgo::makeOneCluster(), JetMaker::makeSpecific(), EcalClusterTools::meanClusterPosition(), DistanceToCell::operator()(), present(), PlotEcalRecHits::printEcalRecHits(), PlotSimTracks::printSimTracks(), HcalHitRelabeller::process(), EcalShowerProperties::processEcalRecHits(), CastorEventDisplay::processEvent(), EcalRecHitWorkerRecover::run(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), EcalGeomPhiSymHelper::setup(), CaloHitResponse::timeOfFlight(), and ValidateGeometry::validateCaloGeometry().
{ return cellGeomPtr( CaloGenericDetId( id ).denseIndex() ) ; }
void CaloSubdetectorGeometry::getSummary | ( | CaloSubdetectorGeometry::TrVec & | tVec, |
CaloSubdetectorGeometry::IVec & | iVec, | ||
CaloSubdetectorGeometry::DimVec & | dVec, | ||
std::vector< uint32_t > & | dins | ||
) | const [virtual] |
Reimplemented in HcalGeometry.
Definition at line 147 of file CaloSubdetectorGeometry.cc.
References begin, EZArrayFL< T >::begin(), cellGeomPtr(), EZArrayFL< T >::end(), CaloCellGeometry::getPosition(), CaloCellGeometry::getTransform(), i, gen::k, m_validIds, numberOfParametersPerShape(), numberOfShapes(), numberOfTransformParms(), convertSQLiteXML::ok, CaloCellGeometry::param(), parVecVec(), findQualityFiles::rr, and groupFilesInBlocks::tt.
Referenced by CaloGeometryDBEP< T, U >::produceAligned().
{ tVec.reserve( m_validIds.size()*numberOfTransformParms() ) ; iVec.reserve( numberOfShapes()==1 ? 1 : m_validIds.size() ) ; dVec.reserve( numberOfShapes()*numberOfParametersPerShape() ) ; for( ParVecVec::const_iterator ivv ( parVecVec().begin() ) ; ivv != parVecVec().end() ; ++ivv ) { const ParVec& pv ( *ivv ) ; for( ParVec::const_iterator iv ( pv.begin() ) ; iv != pv.end() ; ++iv ) { dVec.push_back( *iv ) ; } } for( uint32_t i ( 0 ) ; i != m_validIds.size() ; ++i ) { Tr3D tr ; const CaloCellGeometry* ptr ( cellGeomPtr( i ) ) ; assert( 0 != ptr ) ; ptr->getTransform( tr, ( Pt3DVec* ) 0 ) ; if( Tr3D() == tr ) // for preshower there is no rotation { const GlobalPoint& gp ( ptr->getPosition() ) ; tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z() ) ; } const CLHEP::Hep3Vector tt ( tr.getTranslation() ) ; tVec.push_back( tt.x() ) ; tVec.push_back( tt.y() ) ; tVec.push_back( tt.z() ) ; if( 6 == numberOfTransformParms() ) { const CLHEP::HepRotation rr ( tr.getRotation() ) ; const ROOT::Math::Transform3D rtr ( rr.xx(), rr.xy(), rr.xz(), tt.x(), rr.yx(), rr.yy(), rr.yz(), tt.y(), rr.zx(), rr.zy(), rr.zz(), tt.z() ) ; ROOT::Math::EulerAngles ea ; rtr.GetRotation( ea ) ; tVec.push_back( ea.Phi() ) ; tVec.push_back( ea.Theta() ) ; tVec.push_back( ea.Psi() ) ; } const CCGFloat* par ( ptr->param() ) ; unsigned int ishape ( 9999 ) ; for( unsigned int ivv ( 0 ) ; ivv != parVecVec().size() ; ++ivv ) { bool ok ( true ) ; const CCGFloat* pv ( &(*parVecVec()[ivv].begin() ) ) ; for( unsigned int k ( 0 ) ; k != numberOfParametersPerShape() ; ++k ) { ok = ok && ( fabs( par[k] - pv[k] ) < 1.e-6 ) ; } if( ok ) { ishape = ivv ; break ; } } assert( 9999 != ishape ) ; const unsigned int nn (( numberOfShapes()==1) ? (unsigned int)1 : m_validIds.size() ) ; if( iVec.size() < nn ) iVec.push_back( ishape ) ; } }
const std::vector< DetId > & CaloSubdetectorGeometry::getValidDetIds | ( | DetId::Detector | det = DetId::Detector(0) , |
int | subdet = 0 |
||
) | const [virtual] |
Get a list of valid detector ids (for the given subdetector)
Reimplemented in HcalDDDGeometry, and HcalGeometry.
Definition at line 31 of file CaloSubdetectorGeometry.cc.
References m_sortedIds, m_validIds, python::multivaluedict::sort(), and funct::true.
Referenced by testEcalTPGScale::analyze(), EcalTPGParamBuilder::analyze(), PositionCalc::Calculate_Location(), CaloCellCrossing::CaloCellCrossing(), HcalRecHitsMaker::createVectorOfSubdetectorCells(), EcalPreshowerRecHitsMaker::createVectorsOfCells(), HcalGeometry::fillDetIds(), HCALRecHitAnalyzer::FillGeometry(), CastorGeometry::getClosestCell(), HcalDDDGeometry::getValidDetIds(), HcalGeometry::getValidDetIds(), PFRecHitProducerHO::hoNeighbArray(), EcalPreshowerGeometry::initializeParms(), EcalTPCondAnalyzer::printCRYSTAL(), EcalDigiProducer::updateGeometry(), and ValidateGeometry::validateCaloGeometry().
{ if( !m_sortedIds ) { m_sortedIds = true ; std::sort( m_validIds.begin(), m_validIds.end() ) ; } return m_validIds ; }
unsigned int CaloSubdetectorGeometry::indexFor | ( | const DetId & | id | ) | const [protected, virtual] |
Reimplemented in HcalGeometry.
Definition at line 317 of file CaloSubdetectorGeometry.cc.
References CaloGenericDetId::denseIndex().
Referenced by deltaEta(), and deltaPhi().
{ return CaloGenericDetId(id).denseIndex(); }
virtual void CaloSubdetectorGeometry::initializeParms | ( | ) | [inline, virtual] |
Reimplemented in GCC11_FINAL< T >, and EcalPreshowerGeometry.
Definition at line 104 of file CaloSubdetectorGeometry.h.
{ return ; }
virtual void CaloSubdetectorGeometry::newCell | ( | const GlobalPoint & | f1, |
const GlobalPoint & | f2, | ||
const GlobalPoint & | f3, | ||
const CCGFloat * | parm, | ||
const DetId & | detId | ||
) | [pure virtual] |
Implemented in EcalPreshowerGeometry, EcalTBHodoscopeGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, HcalDDDGeometry, and HcalGeometry.
Referenced by HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalFlexiHardcodeGeometryLoader::fillHE(), PHcalValidInfoLayer::fillHF(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalHardcodeGeometryLoader::makeCell(), CastorHardcodeGeometryLoader::makeCell(), HcalDDDGeometryLoader::makeCell(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
virtual unsigned int CaloSubdetectorGeometry::numberOfParametersPerShape | ( | ) | const [inline, virtual] |
Reimplemented in GCC11_FINAL< T >, GCC11_FINAL< T >, EcalPreshowerGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, and HcalGeometry.
Definition at line 94 of file CaloSubdetectorGeometry.h.
Referenced by getSummary().
{ return 1 ; }
virtual unsigned int CaloSubdetectorGeometry::numberOfShapes | ( | ) | const [inline, virtual] |
Reimplemented in GCC11_FINAL< T >, GCC11_FINAL< T >, EcalPreshowerGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, and HcalGeometry.
Definition at line 93 of file CaloSubdetectorGeometry.h.
Referenced by getSummary(), HcalHardcodeGeometryLoader::load(), and HcalFlexiHardcodeGeometryLoader::load().
{ return 1 ; }
virtual unsigned int CaloSubdetectorGeometry::numberOfTransformParms | ( | ) | const [inline, virtual] |
Reimplemented in EcalPreshowerGeometry, and CastorGeometry.
Definition at line 95 of file CaloSubdetectorGeometry.h.
Referenced by HcalGeometry::getSummary(), and getSummary().
{ return 6 ; }
CaloSubdetectorGeometry& CaloSubdetectorGeometry::operator= | ( | const CaloSubdetectorGeometry & | ) | [private] |
ParMgr* CaloSubdetectorGeometry::parMgr | ( | ) | [inline] |
Definition at line 87 of file CaloSubdetectorGeometry.h.
References m_parMgr.
Referenced by CastorHardcodeGeometryLoader::fill(), HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalFlexiHardcodeGeometryLoader::fillHE(), PHcalValidInfoLayer::fillHF(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), HcalHardcodeGeometryLoader::makeCell(), CaloTowerHardcodeGeometryLoader::makeCell(), CastorHardcodeGeometryLoader::makeCell(), HcalDDDGeometryLoader::makeCell(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ return m_parMgr ; }
const ParMgr* CaloSubdetectorGeometry::parMgrConst | ( | ) | const [inline] |
ParVecVec& CaloSubdetectorGeometry::parVecVec | ( | ) | [inline] |
Definition at line 90 of file CaloSubdetectorGeometry.h.
References m_parVecVec.
Referenced by HcalFlexiHardcodeGeometryLoader::fillHBHO(), HcalFlexiHardcodeGeometryLoader::fillHE(), PHcalValidInfoLayer::fillHF(), HcalGeometry::getSummary(), getSummary(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalHardcodeGeometryLoader::makeCell(), CastorHardcodeGeometryLoader::makeCell(), HcalDDDGeometryLoader::makeCell(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ return m_parVecVec ; }
const ParVecVec& CaloSubdetectorGeometry::parVecVec | ( | ) | const [inline] |
Definition at line 91 of file CaloSubdetectorGeometry.h.
References m_parVecVec.
{ return m_parVecVec ; }
bool CaloSubdetectorGeometry::present | ( | const DetId & | id | ) | const [virtual] |
is this detid present in the geometry?
Definition at line 49 of file CaloSubdetectorGeometry.cc.
References getGeometry().
Referenced by EcalPreshowerGeometry::getClosestCellInPlane(), EcalShowerProperties::getEndpoints(), and CaloGeometry::present().
{ return ( 0 != getGeometry( id ) ) ; }
unsigned int CaloSubdetectorGeometry::sizeForDenseIndex | ( | const DetId & | id | ) | const [protected, virtual] |
Reimplemented in HcalGeometry.
Definition at line 319 of file CaloSubdetectorGeometry.cc.
References CaloGenericDetId::sizeForDenseIndexing().
Referenced by deltaEta(), and deltaPhi().
{ return CaloGenericDetId(id).sizeForDenseIndexing(); }
Definition at line 125 of file CaloSubdetectorGeometry.h.
Referenced by allocateCorners(), cornersMgr(), and ~CaloSubdetectorGeometry().
std::vector<CCGFloat>* CaloSubdetectorGeometry::m_deltaEta [mutable, private] |
Definition at line 134 of file CaloSubdetectorGeometry.h.
Referenced by deltaEta(), and ~CaloSubdetectorGeometry().
std::vector<CCGFloat>* CaloSubdetectorGeometry::m_deltaPhi [mutable, private] |
Definition at line 133 of file CaloSubdetectorGeometry.h.
Referenced by deltaPhi(), and ~CaloSubdetectorGeometry().
ParMgr* CaloSubdetectorGeometry::m_parMgr [private] |
Definition at line 123 of file CaloSubdetectorGeometry.h.
Referenced by allocatePar(), parMgr(), parMgrConst(), and ~CaloSubdetectorGeometry().
ParVecVec CaloSubdetectorGeometry::m_parVecVec [protected] |
Definition at line 113 of file CaloSubdetectorGeometry.h.
Referenced by parVecVec().
bool CaloSubdetectorGeometry::m_sortedIds [mutable, private] |
Definition at line 131 of file CaloSubdetectorGeometry.h.
Referenced by getValidDetIds().
std::vector<DetId> CaloSubdetectorGeometry::m_validIds [mutable, protected] |
Reimplemented in HcalDDDGeometry.
Definition at line 119 of file CaloSubdetectorGeometry.h.
Referenced by allocateCorners(), getCells(), getClosestCell(), HcalGeometry::getSummary(), getSummary(), getValidDetIds(), ZdcGeometry::newCell(), CaloTowerGeometry::newCell(), HcalGeometry::newCell(), EcalTBHodoscopeGeometry::newCell(), CastorGeometry::newCell(), and EcalPreshowerGeometry::newCell().