#include <CaloSubdetectorGeometry.h>
Public Types | |
typedef std::vector< const CaloCellGeometry * > | CellCont |
typedef std::set< DetId > | DetIdSet |
typedef std::vector< double > | DimVec |
typedef std::vector< unsigned int > | IVec |
typedef CaloCellGeometry::ParMgr | ParMgr |
typedef CaloCellGeometry::ParVec | ParVec |
typedef CaloCellGeometry::ParVecVec | ParVecVec |
typedef std::vector< double > | TrVec |
Public Member Functions | |
void | addCell (const DetId &id, CaloCellGeometry *ccg) |
Add a cell to the geometry. | |
void | allocateCorners (CaloCellGeometry::CornersVec::size_type n) |
void | allocatePar (ParVec::size_type n, unsigned int m) |
CaloSubdetectorGeometry () | |
const CellCont & | cellGeometries () const |
the cells | |
CaloCellGeometry::CornersMgr * | cornersMgr () |
double | deltaEta (const DetId &detId) const |
double | 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 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. | |
void | getSummary (TrVec &trVector, IVec &iVector, DimVec &dimVector) 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 unsigned int | numberOfParametersPerShape () const |
virtual unsigned int | numberOfShapes () const |
virtual unsigned int | numberOfTransformParms () const |
ParMgr * | parMgr () |
const ParMgr * | parMgrConst () const |
const ParVecVec & | parVecVec () const |
ParVecVec & | parVecVec () |
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. | |
Static Protected Member Functions | |
static double | deltaR (const GlobalPoint &p1, const GlobalPoint &p2) |
Protected Attributes | |
ParVecVec | m_parVecVec |
Private Member Functions | |
CaloSubdetectorGeometry (const CaloSubdetectorGeometry &) | |
avoid copies | |
CaloSubdetectorGeometry & | operator= (const CaloSubdetectorGeometry &) |
Private Attributes | |
CellCont | m_cellG |
CaloCellGeometry::CornersMgr * | m_cmgr |
std::vector< double > * | m_deltaEta |
std::vector< double > * | m_deltaPhi |
ParMgr * | m_parMgr |
bool | m_sortedIds |
std::vector< DetId > | m_validIds |
Base class for a geometry container for a specific calorimetry subdetector.
Definition at line 21 of file CaloSubdetectorGeometry.h.
typedef std::vector< const CaloCellGeometry * > CaloSubdetectorGeometry::CellCont |
Definition at line 25 of file CaloSubdetectorGeometry.h.
typedef std::set<DetId> CaloSubdetectorGeometry::DetIdSet |
Definition at line 27 of file CaloSubdetectorGeometry.h.
typedef std::vector<double> CaloSubdetectorGeometry::DimVec |
Definition at line 35 of file CaloSubdetectorGeometry.h.
typedef std::vector<unsigned int> CaloSubdetectorGeometry::IVec |
Definition at line 34 of file CaloSubdetectorGeometry.h.
Definition at line 29 of file CaloSubdetectorGeometry.h.
Reimplemented in EcalPreshowerGeometry.
Definition at line 30 of file CaloSubdetectorGeometry.h.
Reimplemented in EcalPreshowerGeometry.
Definition at line 31 of file CaloSubdetectorGeometry.h.
typedef std::vector<double> CaloSubdetectorGeometry::TrVec |
Definition at line 33 of file CaloSubdetectorGeometry.h.
CaloSubdetectorGeometry::CaloSubdetectorGeometry | ( | ) |
Definition at line 7 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 17 of file CaloSubdetectorGeometry.cc.
References i, m_cellG, m_cmgr, m_deltaEta, m_deltaPhi, and m_parMgr.
{ for( CellCont::iterator i ( m_cellG.begin() ); i!=m_cellG.end(); ++i ) { delete *i ; } delete m_cmgr ; // must delete *after* geometries! delete m_parMgr ; delete m_deltaPhi ; delete m_deltaEta ; }
CaloSubdetectorGeometry::CaloSubdetectorGeometry | ( | const CaloSubdetectorGeometry & | ) | [private] |
avoid copies
void CaloSubdetectorGeometry::addCell | ( | const DetId & | id, |
CaloCellGeometry * | ccg | ||
) |
Add a cell to the geometry.
Definition at line 32 of file CaloSubdetectorGeometry.cc.
References CaloGenericDetId::denseIndex(), getHLTprescales::index, m_cellG, and m_validIds.
Referenced by HcalDDDGeometryLoader::fill(), CastorHardcodeGeometryLoader::fill(), HcalHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ const CaloGenericDetId cdid ( id ) ; /* if( cdid.validDetId() ) { */ const uint32_t index ( cdid.denseIndex() ) ; /* if( cdid.rawId() == CaloGenericDetId( cdid.det(), cdid.subdetId(), index ) ) // double check all is ok { if( index >= m_cellG.size() ) std::cout<<" Index ="<< index<< ", but len = "<<m_cellG.size() <<std::endl ; */ m_cellG[ index ] = ccg ; m_validIds.push_back( id ) ; /* } else { std::cout<<"Bad index in CaloSubdetectorGeometry.cc: "<< index <<", id="<<cdid<< std::endl ; } } else { std::cout<<"Bad id in CaloSubdetectorGeometry.cc: "<<cdid<<std::endl ; }*/ }
void CaloSubdetectorGeometry::allocateCorners | ( | CaloCellGeometry::CornersVec::size_type | n | ) |
Definition at line 162 of file CaloSubdetectorGeometry.cc.
References CaloCellGeometry::k_cornerSize, m_cellG, 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 ) ; m_cellG.reserve( n ) ; m_cellG.assign( n, CellCont::value_type ( 0 ) ) ; }
void CaloSubdetectorGeometry::allocatePar | ( | ParVec::size_type | n, |
unsigned int | m | ||
) |
Definition at line 175 of file CaloSubdetectorGeometry.cc.
References m_parMgr.
Referenced by CastorHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
const CellCont& CaloSubdetectorGeometry::cellGeometries | ( | ) | const [inline] |
the cells
Definition at line 43 of file CaloSubdetectorGeometry.h.
References m_cellG.
Referenced by EcalEndcapGeometry::avgAbsZFrontFaceCenter(), EcalBarrelGeometry::avgRadiusXYFrontFaceCenter(), PositionCalc::Calculate_Location(), deltaEta(), deltaPhi(), getCells(), getClosestCell(), EcalPreshowerGeometry::getClosestCellInPlane(), getSummary(), EcalEndcapGeometry::initializeParms(), and EcalPreshowerGeometry::initializeParms().
{ return m_cellG ; }
CaloCellGeometry::CornersMgr* CaloSubdetectorGeometry::cornersMgr | ( | ) | [inline] |
Definition at line 82 of file CaloSubdetectorGeometry.h.
References m_cmgr.
Referenced by CastorHardcodeGeometryLoader::fill(), CaloTowerHardcodeGeometryLoader::load(), HcalDDDGeometryLoader::load(), HcalHardcodeGeometryLoader::load(), HcalFlexiHardcodeGeometryLoader::load(), HcalHardcodeGeometryLoader::makeCell(), CaloTowerHardcodeGeometryLoader::makeCell(), CastorHardcodeGeometryLoader::makeCell(), HcalDDDGeometryLoader::makeCell(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ return m_cmgr ; }
double CaloSubdetectorGeometry::deltaEta | ( | const DetId & | detId | ) | const |
Definition at line 299 of file CaloSubdetectorGeometry.cc.
References cellGeometries(), CaloGenericDetId::denseIndex(), PV3DBase< T, PVType, FrameType >::eta(), CaloCellGeometry::getCorners(), i, m_deltaEta, and CaloGenericDetId::sizeForDenseIndexing().
{ const CaloGenericDetId cgId ( detId ) ; if( 0 == m_deltaEta ) { const uint32_t kSize ( cgId.sizeForDenseIndexing() ) ; m_deltaEta = new std::vector<double> ( kSize ) ; for( uint32_t i ( 0 ) ; i != kSize ; ++i ) { const CaloCellGeometry& cell ( *cellGeometries()[ i ] ) ; const double 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 double 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)[ cgId.denseIndex() ] ; }
double CaloSubdetectorGeometry::deltaPhi | ( | const DetId & | detId | ) | const |
Definition at line 253 of file CaloSubdetectorGeometry.cc.
References cellGeometries(), CaloGenericDetId::denseIndex(), CaloCellGeometry::getCorners(), i, m_deltaPhi, M_PI, PV3DBase< T, PVType, FrameType >::phi(), and CaloGenericDetId::sizeForDenseIndexing().
{ const CaloGenericDetId cgId ( detId ) ; if( 0 == m_deltaPhi ) { const uint32_t kSize ( cgId.sizeForDenseIndexing() ) ; m_deltaPhi = new std::vector<double> ( kSize ) ; for( uint32_t i ( 0 ) ; i != kSize ; ++i ) { const CaloCellGeometry& cell ( *cellGeometries()[ i ] ) ; double 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() ) ) ; double 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)[ cgId.denseIndex() ] ; }
static double CaloSubdetectorGeometry::deltaR | ( | const GlobalPoint & | p1, |
const GlobalPoint & | p2 | ||
) | [inline, static, protected] |
Definition at line 108 of file CaloSubdetectorGeometry.h.
{ return reco::deltaR( p1, p2 ) ; }
virtual void CaloSubdetectorGeometry::fillDefaultNamedParameters | ( | ) | const [inline, virtual] |
Definition at line 96 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 EcalBarrelGeometry, EcalEndcapGeometry, and HcalGeometry.
Definition at line 122 of file CaloSubdetectorGeometry.cc.
References begin, cellGeometries(), reco::deltaR2(), eta(), PV3DBase< T, PVType, FrameType >::eta(), i, m_cellG, M_PI, m_validIds, L1TEmulatorMonitor_cff::p, PV3DBase< T, PVType, FrameType >::phi(), and phi.
Referenced by egammaisolation::EgammaRecHitExtractor::collect(), EgammaRecHitIsolation::getSum_(), CaloConeSelector::select(), and CaloDualConeSelector::select().
{ const double dR2 ( dR*dR ) ; const double eta ( r.eta() ) ; const double phi ( r.phi() ) ; DetIdSet dss; CellCont::const_iterator cBeg ( cellGeometries().begin() ) ; if( 0.000001 < dR ) { for( CellCont::const_iterator i ( m_cellG.begin() ); i != m_cellG.end() ; ++i ) { if( 0 != *i ) { const GlobalPoint& p ( (*i)->getPosition() ) ; const double eta0 ( p.eta() ) ; if( fabs( eta - eta0 ) < dR ) { const double phi0 ( p.phi() ) ; double delp ( fabs( phi - phi0 ) ) ; if( delp > M_PI ) delp = 2*M_PI - delp ; if( delp < dR ) { const double dist2 ( reco::deltaR2( eta0, phi0, eta, phi ) ) ; const DetId tid ( m_validIds.front() ) ; if( dist2 < dR2 ) dss.insert( CaloGenericDetId( tid.det(), tid.subdetId(), i - cBeg ) ) ; } } } } } return dss; }
DetId CaloSubdetectorGeometry::getClosestCell | ( | const GlobalPoint & | r | ) | const [virtual] |
Reimplemented in EcalBarrelGeometry, EcalEndcapGeometry, EcalPreshowerGeometry, CastorGeometry, ZdcGeometry, HcalDDDGeometry, and HcalGeometry.
Definition at line 89 of file CaloSubdetectorGeometry.cc.
References begin, cellGeometries(), reco::deltaR2(), eta(), PV3DBase< T, PVType, FrameType >::eta(), i, getHLTprescales::index, m_cellG, m_validIds, L1TEmulatorMonitor_cff::p, PV3DBase< T, PVType, FrameType >::phi(), and phi.
Referenced by HcalIsoTrkAnalyzer::analyze(), HcalCorrPFCalculation::analyze(), IsolatedTracksCone::analyze(), ValidIsoTrkCalib::analyze(), spr::chargeIsolation(), spr::chargeIsolationHcal(), spr::findDetIdCalo(), CaloGeometryHelper::getClosestCell(), EcalShowerProperties::getEndpoints(), HoECalculator::getHoE(), PhysicsTowerOrganizer::PhysicsTowerOrganizer(), EcalShowerProperties::processEcalRecHits(), and spr::propagateCALO().
{ const double eta ( r.eta() ) ; const double phi ( r.phi() ) ; uint32_t index ( ~0 ) ; double closest ( 1e9 ) ; CellCont::const_iterator cBeg ( cellGeometries().begin() ) ; for( CellCont::const_iterator i ( cBeg ); i != m_cellG.end() ; ++i ) { if( 0 != *i ) { const GlobalPoint& p ( (*i)->getPosition() ) ; const double eta0 ( p.eta() ) ; const double phi0 ( p.phi() ) ; const double dR2 ( reco::deltaR2( eta0, phi0, eta, phi ) ) ; if( dR2 < closest ) { closest = dR2 ; index = i - cBeg ; } } } const DetId tid ( m_validIds.front() ) ; return ( closest > 0.9e9 || (uint32_t)(~0) == index ? DetId(0) : CaloGenericDetId( tid.det(), tid.subdetId(), 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.
Definition at line 76 of file CaloSubdetectorGeometry.cc.
References CaloGenericDetId::denseIndex(), and m_cellG.
Referenced by BetaCalculatorECAL::addStepToXtal(), EcalTPGParamBuilder::analyze(), EcalSelectiveReadoutValidation::analyzeEB(), EcalSelectiveReadoutValidation::analyzeEE(), CaloRecoTauAlgorithm::buildCaloTau(), CaloGeometryHelper::buildCrystalArray(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_EnergyDepTopology(), PositionCalc::Calculate_Location(), CaloCellCrossing::CaloCellCrossing(), compEcalEnergySum(), compHcalEnergySum(), CaloTowersCreationAlgo::convert(), EcalClusterTools::covariances(), PFRecHitProducerECAL::createEcalRecHit(), PFRecHitProducerHCAL::createHcalRecHit(), DistanceToCell::DistanceToCell(), EcalHitMaker::EcalHitMaker(), InvRingCalib::EERingDef(), HCALRecHitAnalyzer::FillGeometry(), PFRecHitProducerECAL::findEcalRecHitGeometry(), EcalEndcapGeometry::getCells(), HcalGeometry::getCells(), EcalBarrelGeometry::getCells(), EcalEndcapGeometry::getClosestBarrelCells(), HcalGeometry::getClosestCell(), CaloGeometryHelper::getClosestCell(), CastorGeometry::getClosestCell(), EcalBarrelGeometry::getClosestCell(), EcalEndcapGeometry::getClosestCell(), ZdcGeometry::getClosestCell(), 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(), EcalEndcapRecHitsMaker::init(), EcalBarrelRecHitsMaker::init(), CaloGeometryHelper::initialize(), EcalRingCalibrationTools::initializeFromGeometry(), CaloDetIdAssociator::insideElement(), HCaloDetIdAssociator::insideElement(), CosmicClusterAlgo::makeClusters(), Multi5x5ClusterAlgo::makeClusters(), IslandClusterAlgo::makeClusters(), PreshowerClusterAlgo::makeOneCluster(), JetMaker::makeSpecific(), EcalClusterTools::meanClusterPosition(), DistanceToCell::operator()(), PlotEcalRecHits::printEcalRecHits(), PlotSimTracks::printSimTracks(), EcalShowerProperties::processEcalRecHits(), CastorEventDisplay::processEvent(), EcalRecHitWorkerRecover::run(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), EcalGeomPhiSymHelper::setup(), CaloHitResponse::timeOfFlight(), and ValidateGeometry::validateCaloGeometry().
{ return m_cellG[ CaloGenericDetId( id ).denseIndex() ] ; }
void CaloSubdetectorGeometry::getSummary | ( | CaloSubdetectorGeometry::TrVec & | tVec, |
CaloSubdetectorGeometry::IVec & | iVec, | ||
CaloSubdetectorGeometry::DimVec & | dVec | ||
) | const |
Definition at line 183 of file CaloSubdetectorGeometry.cc.
References begin, EZArrayFL< T >::begin(), cellGeometries(), EZArrayFL< T >::end(), i, gen::k, numberOfParametersPerShape(), numberOfShapes(), numberOfTransformParms(), convertSQLiteXML::ok, Gflash::par, parVecVec(), and findQualityFiles::size.
Referenced by CaloGeometryDBEP< T, U >::produceAligned().
{ tVec.reserve( cellGeometries().size()*numberOfTransformParms() ) ; iVec.reserve( numberOfShapes()==1 ? 1 : cellGeometries().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( CellCont::const_iterator i ( cellGeometries().begin() ) ; i != cellGeometries().end() ; ++i ) { HepGeom::Transform3D tr ( (*i)->getTransform( ( std::vector<HepGeom::Point3D<double> >* ) 0 ) ) ; if( HepGeom::Transform3D() == tr ) // for preshower there is no rotation { const GlobalPoint& gp ( (*i)->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 double* par ( (*i)->param() ) ; unsigned int ishape ( 9999 ) ; for( unsigned int ivv ( 0 ) ; ivv != parVecVec().size() ; ++ivv ) { bool ok ( true ) ; const double* 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 : cellGeometries().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 CastorGeometry, ZdcGeometry, HcalDDDGeometry, and HcalGeometry.
Definition at line 64 of file CaloSubdetectorGeometry.cc.
References m_sortedIds, m_validIds, python::multivaluedict::sort(), and funct::true.
Referenced by testEcalTPGScale::analyze(), EcalTPGParamBuilder::analyze(), CaloGeometryHelper::buildCrystalArray(), CaloGeometryHelper::buildNeighbourArray(), CaloCellCrossing::CaloCellCrossing(), HcalRecHitsMaker::createVectorOfSubdetectorCells(), EcalPreshowerRecHitsMaker::createVectorsOfCells(), PFRecHitProducerECAL::ecalNeighbArray(), HcalGeometry::fillDetIds(), HCALRecHitAnalyzer::FillGeometry(), HcalDDDGeometry::getValidDetIds(), ZdcGeometry::getValidDetIds(), CastorGeometry::getValidDetIds(), HcalGeometry::getValidDetIds(), EcalEndcapRecHitsMaker::init(), EcalBarrelRecHitsMaker::init(), EcalPreshowerGeometry::initializeParms(), EcalTPCondAnalyzer::printCRYSTAL(), CalorimetryManager::reconstruct(), EcalDigiProducer::updateGeometry(), and ValidateGeometry::validateCaloGeometry().
{ if( !m_sortedIds ) { m_sortedIds = true ; std::sort( m_validIds.begin(), m_validIds.end() ) ; } return m_validIds ; }
virtual void CaloSubdetectorGeometry::initializeParms | ( | ) | [inline, virtual] |
Reimplemented in EcalEndcapGeometry, and EcalPreshowerGeometry.
Definition at line 102 of file CaloSubdetectorGeometry.h.
{ return ; }
virtual unsigned int CaloSubdetectorGeometry::numberOfParametersPerShape | ( | ) | const [inline, virtual] |
Reimplemented in EcalBarrelGeometry, EcalEndcapGeometry, EcalPreshowerGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, and HcalGeometry.
Definition at line 93 of file CaloSubdetectorGeometry.h.
Referenced by getSummary().
{ return 1 ; }
virtual unsigned int CaloSubdetectorGeometry::numberOfShapes | ( | ) | const [inline, virtual] |
Reimplemented in EcalBarrelGeometry, EcalEndcapGeometry, EcalPreshowerGeometry, CastorGeometry, ZdcGeometry, CaloTowerGeometry, and HcalGeometry.
Definition at line 92 of file CaloSubdetectorGeometry.h.
Referenced by getSummary().
{ return 1 ; }
virtual unsigned int CaloSubdetectorGeometry::numberOfTransformParms | ( | ) | const [inline, virtual] |
Reimplemented in EcalPreshowerGeometry, and CastorGeometry.
Definition at line 94 of file CaloSubdetectorGeometry.h.
Referenced by getSummary().
{ return 6 ; }
CaloSubdetectorGeometry& CaloSubdetectorGeometry::operator= | ( | const CaloSubdetectorGeometry & | ) | [private] |
ParMgr* CaloSubdetectorGeometry::parMgr | ( | ) | [inline] |
Definition at line 86 of file CaloSubdetectorGeometry.h.
References m_parMgr.
Referenced by CastorHardcodeGeometryLoader::fill(), 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] |
const ParVecVec& CaloSubdetectorGeometry::parVecVec | ( | ) | const [inline] |
Definition at line 90 of file CaloSubdetectorGeometry.h.
References m_parVecVec.
{ return m_parVecVec ; }
ParVecVec& CaloSubdetectorGeometry::parVecVec | ( | ) | [inline] |
Definition at line 89 of file CaloSubdetectorGeometry.h.
References m_parVecVec.
Referenced by getSummary(), CaloTowerHardcodeGeometryLoader::makeCell(), HcalHardcodeGeometryLoader::makeCell(), CastorHardcodeGeometryLoader::makeCell(), HcalDDDGeometryLoader::makeCell(), and EcalTBHodoscopeGeometryLoaderFromDDD::makeGeometry().
{ return m_parVecVec ; }
bool CaloSubdetectorGeometry::present | ( | const DetId & | id | ) | const [virtual] |
is this detid present in the geometry?
Definition at line 82 of file CaloSubdetectorGeometry.cc.
References CaloGenericDetId::denseIndex(), and m_cellG.
Referenced by spr::extraIds(), EcalBarrelGeometry::getClosestCell(), EcalPreshowerGeometry::getClosestCellInPlane(), EcalShowerProperties::getEndpoints(), and CaloGeometry::present().
{ // return m_cellG.find( id ) != m_cellG.end() ; return 0 != m_cellG[ CaloGenericDetId( id ).denseIndex() ] ; }
CellCont CaloSubdetectorGeometry::m_cellG [private] |
Definition at line 122 of file CaloSubdetectorGeometry.h.
Referenced by addCell(), allocateCorners(), cellGeometries(), getCells(), getClosestCell(), getGeometry(), present(), and ~CaloSubdetectorGeometry().
Definition at line 116 of file CaloSubdetectorGeometry.h.
Referenced by allocateCorners(), cornersMgr(), and ~CaloSubdetectorGeometry().
std::vector<double>* CaloSubdetectorGeometry::m_deltaEta [mutable, private] |
Definition at line 129 of file CaloSubdetectorGeometry.h.
Referenced by deltaEta(), and ~CaloSubdetectorGeometry().
std::vector<double>* CaloSubdetectorGeometry::m_deltaPhi [mutable, private] |
Definition at line 128 of file CaloSubdetectorGeometry.h.
Referenced by deltaPhi(), and ~CaloSubdetectorGeometry().
ParMgr* CaloSubdetectorGeometry::m_parMgr [private] |
Definition at line 114 of file CaloSubdetectorGeometry.h.
Referenced by allocatePar(), parMgr(), parMgrConst(), and ~CaloSubdetectorGeometry().
ParVecVec CaloSubdetectorGeometry::m_parVecVec [protected] |
Definition at line 106 of file CaloSubdetectorGeometry.h.
Referenced by parVecVec().
bool CaloSubdetectorGeometry::m_sortedIds [mutable, private] |
Definition at line 124 of file CaloSubdetectorGeometry.h.
Referenced by getValidDetIds().
std::vector<DetId> CaloSubdetectorGeometry::m_validIds [mutable, private] |
Reimplemented in CastorGeometry, ZdcGeometry, and HcalDDDGeometry.
Definition at line 126 of file CaloSubdetectorGeometry.h.
Referenced by addCell(), allocateCorners(), getCells(), getClosestCell(), and getValidDetIds().