CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

HcalHardcodeGeometryLoader Class Reference

#include <HcalHardcodeGeometryLoader.h>

List of all members.

Public Types

typedef CaloSubdetectorGeometryReturnType

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 ()
CaloCellGeometrymakeCell (const HcalDetId &detId, ReturnType geom) const

Private Attributes

const HcalTopologyextTopology
double theBarrelRadius
double theHB15aThickness
double theHB15bThickness
double theHB16aThickness
double theHB16bThickness
double theHBThickness
double theHEZPos [4]
double theHFThickness
double theHFZPos [2]
double theHOThickness
double theOuterRadius
HcalTopologytheTopology

Detailed Description

Note:
The HE geometry is not currently correct. The z positions must be corrected.
Date:
2008/08/27 15:57:15
Revision:
1.7
Author:
R. Wilkinson - Caltech

Definition at line 19 of file HcalHardcodeGeometryLoader.h.


Member Typedef Documentation

Definition at line 23 of file HcalHardcodeGeometryLoader.h.


Constructor & Destructor Documentation

HcalHardcodeGeometryLoader::HcalHardcodeGeometryLoader ( )

Definition at line 10 of file HcalHardcodeGeometryLoader.cc.

References 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 ; }

Member Function Documentation

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, 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 ( )
HcalHardcodeGeometryLoader::ReturnType HcalHardcodeGeometryLoader::load ( DetId::Detector  det,
int  subdet 
)
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(), x, detailsBasic3DVector::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() ) );
}

Member Data Documentation

Definition at line 47 of file HcalHardcodeGeometryLoader.h.

Referenced by fill(), and load().

Definition at line 49 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 55 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 55 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 56 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 56 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 54 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 51 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 57 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 52 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 58 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 50 of file HcalHardcodeGeometryLoader.h.

Referenced by init().

Definition at line 46 of file HcalHardcodeGeometryLoader.h.

Referenced by ~HcalHardcodeGeometryLoader().