#include <Geometry/ForwardGeometry/interface/CastorHardcodeGeometryLoader.h>
Public Member Functions | |
CastorHardcodeGeometryLoader (const CastorTopology &ht) | |
CastorHardcodeGeometryLoader () | |
std::auto_ptr < CaloSubdetectorGeometry > | load () |
virtual std::auto_ptr < CaloSubdetectorGeometry > | load (DetId::Detector det, int subdet) |
virtual | ~CastorHardcodeGeometryLoader () |
Private Member Functions | |
void | fill (HcalCastorDetId::Section section, CaloSubdetectorGeometry *cg) |
void | init () |
const CaloCellGeometry * | makeCell (const HcalCastorDetId &detId, CaloSubdetectorGeometry *geom) const |
Private Attributes | |
float | theEMSectiondX |
float | theEMSectiondY |
float | theEMSectiondZ |
float | theHADSectiondX |
float | theHADSectiondY |
float | theHADSectiondZ |
CastorTopology | theTopology |
Definition at line 12 of file CastorHardcodeGeometryLoader.h.
CastorHardcodeGeometryLoader::CastorHardcodeGeometryLoader | ( | ) |
Definition at line 9 of file CastorHardcodeGeometryLoader.cc.
References init().
00009 { 00010 init(); 00011 }
CastorHardcodeGeometryLoader::CastorHardcodeGeometryLoader | ( | const CastorTopology & | ht | ) | [explicit] |
Definition at line 13 of file CastorHardcodeGeometryLoader.cc.
References init().
00013 : 00014 theTopology(ht) { 00015 init(); 00016 }
virtual CastorHardcodeGeometryLoader::~CastorHardcodeGeometryLoader | ( | ) | [inline, virtual] |
void CastorHardcodeGeometryLoader::fill | ( | HcalCastorDetId::Section | section, | |
CaloSubdetectorGeometry * | cg | |||
) | [private] |
Definition at line 43 of file CastorHardcodeGeometryLoader.cc.
References CaloSubdetectorGeometry::addCell(), CastorTopology::firstCell(), id, CastorTopology::lastCell(), makeCell(), theTopology, and CastorTopology::valid().
Referenced by load().
00044 { 00045 // start by making the new HcalDetIds 00046 std::vector<HcalCastorDetId> castorIds; 00047 HcalCastorDetId id; 00048 int firstCell = theTopology.firstCell(section); 00049 int lastCell = theTopology.lastCell(section); 00050 for(int imodule = firstCell; imodule <= lastCell; ++imodule) { 00051 for(int isector = 1; isector < 17; ++isector) { 00052 id = HcalCastorDetId(section, true, isector, imodule); 00053 if(theTopology.valid(id)) castorIds.push_back(id); 00054 id = HcalCastorDetId(section, false, isector, imodule); 00055 if(theTopology.valid(id)) castorIds.push_back(id); 00056 } 00057 } 00058 edm::LogInfo("CastorHardcodeGeometry") << "Number of Castor DetIds made: " << section << " " << castorIds.size(); 00059 00060 // for each new HcalCastorDetId, make a CaloCellGeometry 00061 00062 for(std::vector<HcalCastorDetId>::const_iterator castorIdItr = castorIds.begin(); 00063 castorIdItr != castorIds.end(); ++castorIdItr) 00064 { 00065 const CaloCellGeometry * geometry = makeCell(*castorIdItr, geom ); 00066 geom->addCell(*castorIdItr, geometry); 00067 } 00068 }
Definition at line 18 of file CastorHardcodeGeometryLoader.cc.
References dXEMPlate, dXHADPlate, dYEMPlate, dYHADPlate, theEMSectiondX, theEMSectiondY, theEMSectiondZ, theHADSectiondX, theHADSectiondY, and theHADSectiondZ.
Referenced by CastorHardcodeGeometryLoader().
00018 { 00019 theEMSectiondX = 2.*dXEMPlate; 00020 theEMSectiondY = 2.*dYEMPlate; 00021 theEMSectiondZ = 101.0; 00022 theHADSectiondX = 2.*dXHADPlate; 00023 theHADSectiondY = 2.*dYHADPlate; 00024 theHADSectiondZ = 1212.; 00025 }
std::auto_ptr< CaloSubdetectorGeometry > CastorHardcodeGeometryLoader::load | ( | ) |
Definition at line 36 of file CastorHardcodeGeometryLoader.cc.
References HcalCastorDetId::EM, fill(), HcalCastorDetId::HAD, and theTopology.
00036 { 00037 std::auto_ptr<CaloSubdetectorGeometry> hg(new CastorGeometry(&theTopology)); 00038 fill(HcalCastorDetId::EM,hg.get()); 00039 fill(HcalCastorDetId::HAD,hg.get()); 00040 return hg; 00041 }
std::auto_ptr< CaloSubdetectorGeometry > CastorHardcodeGeometryLoader::load | ( | DetId::Detector | det, | |
int | subdet | |||
) | [virtual] |
Definition at line 27 of file CastorHardcodeGeometryLoader.cc.
References HcalCastorDetId::EM, fill(), HcalCastorDetId::HAD, HcalCastorDetId::SubdetectorId, and theTopology.
Referenced by CastorHardcodeGeometryEP::produce().
00027 { 00028 std::auto_ptr<CaloSubdetectorGeometry> hg(new CastorGeometry(&theTopology)); 00029 if(subdet == HcalCastorDetId::SubdetectorId){ 00030 fill(HcalCastorDetId::EM,hg.get()); 00031 fill(HcalCastorDetId::HAD,hg.get()); 00032 } 00033 return hg; 00034 }
const CaloCellGeometry * CastorHardcodeGeometryLoader::makeCell | ( | const HcalCastorDetId & | detId, | |
CaloSubdetectorGeometry * | geom | |||
) | const [private] |
Definition at line 71 of file CastorHardcodeGeometryLoader.cc.
References CaloSubdetectorGeometry::cornersMgr(), HcalCastorDetId::EM, CaloCellGeometry::getParmPtr(), HcalCastorDetId::HAD, HcalCastorDetId::module(), CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), HcalCastorDetId::section(), theEMSectiondX, theEMSectiondY, theEMSectiondZ, theHadmodulesBoundaries, theHADSectiondX, theHADSectiondY, theHADSectiondZ, theXChannelBoundaries, theZSectionBoundaries, tiltangle, X0, Y0, Z0, and HcalCastorDetId::zside().
Referenced by fill().
00071 { 00072 00073 float zside = detId.zside(); 00074 HcalCastorDetId::Section section = detId.section(); 00075 int module = detId.module(); 00076 // int sector = detId.sector(); 00077 00078 float xMother = X0; 00079 float yMother = Y0; 00080 float zMother = Z0; 00081 float dx = 0; 00082 float dy = 0; 00083 float dz = 0; 00084 float theTiltAngle = 0.7854; 00085 float xfaceCenter = 0; 00086 float yfaceCenter = 0; 00087 float zfaceCenter = 0; 00088 00089 if(section==HcalCastorDetId::EM){ 00090 dx = theEMSectiondX; 00091 dy = theEMSectiondY; 00092 dz = theEMSectiondZ; 00093 // theTiltAngle = 0.0; 00094 xfaceCenter = xMother + (theXChannelBoundaries[module-1] + theEMSectiondX/2); 00095 yfaceCenter = yMother; 00096 zfaceCenter = (zMother + theZSectionBoundaries[0])*zside; 00097 } 00098 00099 if(section==HcalCastorDetId::HAD){ 00100 dx = theHADSectiondX; 00101 dy = theHADSectiondY; 00102 dz = theHADSectiondZ; 00103 theTiltAngle = tiltangle; 00104 xfaceCenter = xMother; 00105 yfaceCenter = yMother; 00106 zfaceCenter = (zMother + theHadmodulesBoundaries[module-1])*zside; 00107 } 00108 GlobalPoint faceCenter(xfaceCenter, yfaceCenter, zfaceCenter); 00109 00110 std::vector<float> zz ; 00111 zz.resize(3) ; 00112 zz.push_back( dx ) ; 00113 zz.push_back( dy ) ; 00114 zz.push_back( dz ) ; 00115 return new calogeom::IdealCastorTrapezoid( 00116 faceCenter, 00117 geom->cornersMgr(), 00118 CaloCellGeometry::getParmPtr( zz, 00119 geom->parMgr(), 00120 geom->parVecVec() ) ); 00121 // CaloCellGeometry::getParmPtr( zz, 3, geom->parVecVec() ) ); 00122 }
float CastorHardcodeGeometryLoader::theEMSectiondX [private] |
float CastorHardcodeGeometryLoader::theEMSectiondY [private] |
float CastorHardcodeGeometryLoader::theEMSectiondZ [private] |
float CastorHardcodeGeometryLoader::theHADSectiondX [private] |
float CastorHardcodeGeometryLoader::theHADSectiondY [private] |
float CastorHardcodeGeometryLoader::theHADSectiondZ [private] |