#include <HcalHardcodeGeometryLoader.h>
Public Types | |
typedef CaloSubdetectorGeometry * | ReturnType |
Public Member Functions | |
HcalHardcodeGeometryLoader () | |
HcalHardcodeGeometryLoader (const HcalTopology &ht) | |
ReturnType | load (DetId::Detector det, int subdet) |
ReturnType | load () |
Load all of HCAL. | |
virtual | ~HcalHardcodeGeometryLoader () |
Private Member Functions | |
void | fill (HcalSubdetector subdet, int firstEtaRing, int lastEtaRing, ReturnType cg) |
void | init () |
CaloCellGeometry * | makeCell (const HcalDetId &detId, ReturnType geom) const |
Private Attributes | |
const HcalTopology * | extTopology |
double | theBarrelRadius |
double | theHB15aThickness |
double | theHB15bThickness |
double | theHB16aThickness |
double | theHB16bThickness |
double | theHBThickness |
double | theHEZPos [4] |
double | theHFThickness |
double | theHFZPos [2] |
double | theHOThickness |
double | theOuterRadius |
HcalTopology * | theTopology |
Definition at line 19 of file HcalHardcodeGeometryLoader.h.
Definition at line 23 of file HcalHardcodeGeometryLoader.h.
HcalHardcodeGeometryLoader::HcalHardcodeGeometryLoader | ( | ) |
Definition at line 10 of file HcalHardcodeGeometryLoader.cc.
References init().
: theTopology ( new HcalTopology ), extTopology ( theTopology ) { init(); }
HcalHardcodeGeometryLoader::HcalHardcodeGeometryLoader | ( | const HcalTopology & | ht | ) | [explicit] |
Definition at line 17 of file HcalHardcodeGeometryLoader.cc.
References init().
: theTopology ( 0 ) , extTopology ( &ht ) { init(); }
virtual HcalHardcodeGeometryLoader::~HcalHardcodeGeometryLoader | ( | ) | [inline, virtual] |
Definition at line 27 of file HcalHardcodeGeometryLoader.h.
References theTopology.
{ delete theTopology ; }
void HcalHardcodeGeometryLoader::fill | ( | HcalSubdetector | subdet, |
int | firstEtaRing, | ||
int | lastEtaRing, | ||
ReturnType | cg | ||
) | [private] |
helper functions to make all the ids and cells, and put them into the vectors and mpas passed in.
Definition at line 89 of file HcalHardcodeGeometryLoader.cc.
References CaloSubdetectorGeometry::addCell(), HcalTopology::depthBinInformation(), extTopology, ExpressReco_HICollisions_FallBack::id, makeCell(), max(), HcalTopology::nPhiBins(), and HcalTopology::valid().
Referenced by load().
{ // start by making the new HcalDetIds std::vector<HcalDetId> hcalIds; int nDepthSegments, startingDepthSegment; for(int etaRing = firstEtaRing; etaRing <= lastEtaRing; ++etaRing) { extTopology->depthBinInformation(subdet, etaRing, nDepthSegments, startingDepthSegment); unsigned int nPhiBins = extTopology->nPhiBins(etaRing); unsigned int phiInc=72/std::max(36u,nPhiBins); for(int idepth = 0; idepth < nDepthSegments; ++idepth) { int depthBin = startingDepthSegment + idepth; for(unsigned iphi = 1; iphi <= 72; iphi+=phiInc) { for(int zsign = -1; zsign <= 1; zsign += 2) { HcalDetId id( subdet, zsign * etaRing, iphi, depthBin); if (extTopology->valid(id)) hcalIds.push_back(id); } } } } edm::LogInfo("HcalHardcodeGeometry") << "Number of HCAL DetIds made: " << subdet << " " << hcalIds.size(); // for each new HcalDetId, make a CaloCellGeometry for(std::vector<HcalDetId>::const_iterator hcalIdItr = hcalIds.begin(); hcalIdItr != hcalIds.end(); ++hcalIdItr) { geom->addCell( *hcalIdItr, makeCell(*hcalIdItr,geom) ); } }
void HcalHardcodeGeometryLoader::init | ( | void | ) | [private] |
Definition at line 25 of file HcalHardcodeGeometryLoader.cc.
References theBarrelRadius, theHB15aThickness, theHB15bThickness, theHB16aThickness, theHB16bThickness, theHBThickness, theHEZPos, theHFThickness, theHFZPos, theHOThickness, and theOuterRadius.
Referenced by HcalHardcodeGeometryLoader().
{ theBarrelRadius = 190.; theHBThickness = 93.6; // just from drawings. All thicknesses needs to be done right theHB15aThickness = theHBThickness * 12.0/17.0; // relative weight from layer count! theHB15bThickness = theHBThickness * 4.0/17.0; // relative weight from layer count! theHB16aThickness = theHBThickness * 1.0/17.0; // relative weight from layer count! theHB16bThickness = theHBThickness * 7.0/17.0; // relative weight from layer count! theOuterRadius = 406; theHOThickness = 1.; theHEZPos[0] = 388.0; theHEZPos[1] = 397.0; theHEZPos[2] = 450.0; theHEZPos[3] = 568.0; theHFZPos[0] = 1100.0; theHFZPos[1] = 1120.0; theHFThickness = 165; }
HcalHardcodeGeometryLoader::ReturnType HcalHardcodeGeometryLoader::load | ( | ) |
Load all of HCAL.
Definition at line 74 of file HcalHardcodeGeometryLoader.cc.
References CaloSubdetectorGeometry::allocateCorners(), CaloSubdetectorGeometry::allocatePar(), CaloSubdetectorGeometry::cornersMgr(), extTopology, fill(), HcalTopology::firstHBRing(), HcalTopology::firstHERing(), HcalTopology::firstHFRing(), HcalTopology::firstHORing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalDetId::kSizeForDenseIndexing, HcalTopology::lastHBRing(), HcalTopology::lastHERing(), HcalTopology::lastHFRing(), HcalTopology::lastHORing(), and CaloSubdetectorGeometry::parMgr().
{ ReturnType hg( new HcalGeometry( extTopology ) ) ; if( hg->cornersMgr() == 0 ) hg->allocateCorners( HcalDetId::kSizeForDenseIndexing ) ; if( hg->parMgr() == 0 ) hg->allocatePar( 500, 5 ) ; fill(HcalBarrel, extTopology->firstHBRing(), extTopology->lastHBRing(), hg); fill(HcalEndcap, extTopology->firstHERing(), extTopology->lastHERing(), hg); fill(HcalForward, extTopology->firstHFRing(), extTopology->lastHFRing(), hg); fill(HcalOuter, extTopology->firstHORing(), extTopology->lastHORing(), hg); return hg; }
HcalHardcodeGeometryLoader::ReturnType HcalHardcodeGeometryLoader::load | ( | DetId::Detector | det, |
int | subdet | ||
) |
Definition at line 51 of file HcalHardcodeGeometryLoader.cc.
References CaloSubdetectorGeometry::allocateCorners(), CaloSubdetectorGeometry::allocatePar(), CaloSubdetectorGeometry::cornersMgr(), extTopology, fill(), HcalTopology::firstHBRing(), HcalTopology::firstHERing(), HcalTopology::firstHFRing(), HcalTopology::firstHORing(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalGeometry::k_NumberOfCellsForCorners, HcalGeometry::k_NumberOfParametersPerShape, HcalGeometry::k_NumberOfShapes, HcalTopology::lastHBRing(), HcalTopology::lastHERing(), HcalTopology::lastHFRing(), HcalTopology::lastHORing(), and CaloSubdetectorGeometry::parMgr().
{ HcalSubdetector hsub=static_cast<HcalSubdetector>( subdet ); ReturnType hg( new HcalGeometry( extTopology) ); if( hg->cornersMgr() == 0 ) hg->allocateCorners( HcalGeometry::k_NumberOfCellsForCorners ) ; if( hg->parMgr() == 0 ) hg->allocatePar( HcalGeometry::k_NumberOfParametersPerShape*HcalGeometry::k_NumberOfShapes, HcalGeometry::k_NumberOfParametersPerShape ) ; switch (hsub) { case (HcalBarrel) : fill(hsub, extTopology->firstHBRing(), extTopology->lastHBRing(), hg ); break; case (HcalEndcap) : fill(hsub, extTopology->firstHERing(), extTopology->lastHERing(), hg ); break; case (HcalForward) : fill(hsub, extTopology->firstHFRing(), extTopology->lastHFRing(), hg ); break; case (HcalOuter) : fill(hsub, extTopology->firstHORing(), extTopology->lastHORing(), hg ); break; default: break; } return hg; }
CaloCellGeometry * HcalHardcodeGeometryLoader::makeCell | ( | const HcalDetId & | detId, |
ReturnType | geom | ||
) | const [private] |
Definition at line 80 of file ZdcHardcodeGeometryLoader.cc.
References HcalZDCDetId::channel(), CaloSubdetectorGeometry::cornersMgr(), funct::cos(), HcalZDCDetId::EM, CaloCellGeometry::getParmPtr(), HcalZDCDetId::HAD, ZdcGeometry::k_NumberOfParametersPerShape, HcalZDCDetId::LUM, CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), HcalZDCDetId::section(), ExpressReco_HICollisions_FallBack::x, ExpressReco_HICollisions_FallBack::y, z, and HcalZDCDetId::zside().
Referenced by fill().
{ double zside ( detId.zside() ) ; const HcalZDCDetId::Section section ( detId.section() ) ; const int channel ( detId.channel() ) ; //********* Here are all the hardcoded numbers you need to know, in **cm** //********* Most are from the zdc.xml and zdclum.xml files ****** static const double x0 ( 0 ) ; // these 3 are for the "mother" volume static const double y0 ( 0 ) ; static const double z0 ( 14000 ) ; static const double angEM ( 0 ) ; // the angles of front face wrt vertical static const double angLUM ( 0 ) ; static const double angHAD ( atan( 1. ) ) ; // this is 45 deg // these dimensions are **half**-sizes static const double dxHAD ( 4.8 ) ; static const double dxEM ( dxHAD/5. ) ; static const double dxLUM ( 4.8 ) ; // to be updated when known static const double dhEM ( 6.25 ) ; static const double dhLUM ( 6.25 ) ; // to be updated when known static const double dhHAD ( 6.25 ) ; static const double dzEM ( 33.*0.15 ) ; static const double dzLUM ( 23.5 ) ; // to be updated when known static const double dzHAD ( 0.82*6./cos(angHAD) ) ; // these are not half-dimensions, they are offsets from nominal // for the center-of-front-face points static const double xOffEM ( -4.*dxEM ) ; static const double xOffLUM ( 0 ) ; static const double xOffHAD ( 0 ) ; static const double yOffEM ( 0 ) ; static const double yOffLUM ( 0 ) ; static const double yOffHAD ( 0 ) ; static const double zOffEM ( -49.85 - 0.15 ) ; static const double zOffLUM ( -39.555 ) ; static const double zOffHAD ( -29.00 ) ; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ double dx, dh, dz, x, y, z, an ; if( section==HcalZDCDetId::EM ) { dx = dxEM ; dh = dhEM ; dz = dzEM ; an = angEM ; x = zside*( x0 + xOffEM + ( channel - 1.0 )*dxEM*2. ) ; y = y0 + yOffEM ; z = zside*( z0 + zOffEM ) ; } else { if( section==HcalZDCDetId::LUM ) { dx = dxLUM ; dh = dhLUM ; dz = dzLUM ; an = angLUM ; x = zside*( x0 + xOffLUM ) ; y = y0 + yOffLUM ; z = zside*( z0 + zOffLUM + ( channel - 1.0 )*dzLUM*2. ) ; } else { assert( section==HcalZDCDetId::HAD ) ; dx = dxHAD ; dh = dhHAD ; dz = dzHAD ; an = angHAD ; x = zside*( x0 + xOffHAD ) ; y = y0 + yOffHAD ; z = zside*( z0 + zOffHAD + ( channel - 1.0 )*dzHAD*2. ) ; } } const GlobalPoint faceCenter ( x, y, z ); const double dy ( dh*cos( an ) ) ; std::vector<double> zz ; zz.reserve( ZdcGeometry::k_NumberOfParametersPerShape ) ; zz.push_back( an ) ; zz.push_back( dx ) ; zz.push_back( dy ) ; zz.push_back( dz ) ; return new calogeom::IdealZDCTrapezoid( faceCenter, geom->cornersMgr(), CaloCellGeometry::getParmPtr( zz, geom->parMgr(), geom->parVecVec() ) ); }
const HcalTopology* HcalHardcodeGeometryLoader::extTopology [private] |
Definition at line 47 of file HcalHardcodeGeometryLoader.h.
double HcalHardcodeGeometryLoader::theBarrelRadius [private] |
Definition at line 49 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHB15aThickness [private] |
Definition at line 55 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHB15bThickness [private] |
Definition at line 55 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHB16aThickness [private] |
Definition at line 56 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHB16bThickness [private] |
Definition at line 56 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHBThickness [private] |
Definition at line 54 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHEZPos[4] [private] |
Definition at line 51 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHFThickness [private] |
Definition at line 57 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHFZPos[2] [private] |
Definition at line 52 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theHOThickness [private] |
Definition at line 58 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
double HcalHardcodeGeometryLoader::theOuterRadius [private] |
Definition at line 50 of file HcalHardcodeGeometryLoader.h.
Referenced by init().
Definition at line 46 of file HcalHardcodeGeometryLoader.h.
Referenced by ~HcalHardcodeGeometryLoader().