CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ZdcHardcodeGeometryLoader Class Reference

#include <ZdcHardcodeGeometryLoader.h>

Public Types

typedef CaloSubdetectorGeometryReturnType
 

Public Member Functions

virtual ReturnType load (DetId::Detector det, int subdet)
 
ReturnType load ()
 
 ZdcHardcodeGeometryLoader ()
 
 ZdcHardcodeGeometryLoader (const ZdcTopology &ht)
 
virtual ~ZdcHardcodeGeometryLoader ()
 

Private Member Functions

void fill (HcalZDCDetId::Section section, CaloSubdetectorGeometry *cg)
 
void init ()
 
void makeCell (const HcalZDCDetId &detId, CaloSubdetectorGeometry *geom) const
 

Private Attributes

const ZdcTopologyextTopology
 
float theEMSectiondX
 
float theEMSectiondY
 
float theEMSectiondZ
 
float theHADSectiondX
 
float theHADSectiondY
 
float theHADSectiondZ
 
float theLUMSectiondX
 
float theLUMSectiondY
 
float theLUMSectiondZ
 
ZdcTopologytheTopology
 

Detailed Description

Author
E. Garcia - UIC

Definition at line 17 of file ZdcHardcodeGeometryLoader.h.

Member Typedef Documentation

Definition at line 20 of file ZdcHardcodeGeometryLoader.h.

Constructor & Destructor Documentation

ZdcHardcodeGeometryLoader::ZdcHardcodeGeometryLoader ( )

Definition at line 10 of file ZdcHardcodeGeometryLoader.cc.

References init().

ZdcHardcodeGeometryLoader::ZdcHardcodeGeometryLoader ( const ZdcTopology ht)
explicit

Definition at line 17 of file ZdcHardcodeGeometryLoader.cc.

References init().

17  :
18  theTopology( 0 ) ,
19  extTopology( &ht )
20 {
21  init();
22 }
virtual ZdcHardcodeGeometryLoader::~ZdcHardcodeGeometryLoader ( )
inlinevirtual

Definition at line 24 of file ZdcHardcodeGeometryLoader.h.

References theTopology.

24 { delete theTopology ; }

Member Function Documentation

void ZdcHardcodeGeometryLoader::fill ( HcalZDCDetId::Section  section,
CaloSubdetectorGeometry cg 
)
private

Definition at line 51 of file ZdcHardcodeGeometryLoader.cc.

References CaloSubdetectorGeometry::allocateCorners(), CaloSubdetectorGeometry::allocatePar(), CaloSubdetectorGeometry::cornersMgr(), extTopology, ZdcTopology::firstCell(), ZdcGeometry::k_NumberOfParametersPerShape, ZdcGeometry::k_NumberOfShapes, HcalZDCDetId::kSizeForDenseIndexing, ZdcTopology::lastCell(), makeCell(), CaloSubdetectorGeometry::parMgr(), and ZdcTopology::valid().

Referenced by load().

53 {
54  // start by making the new HcalDetIds
55  std::vector<HcalZDCDetId> zdcIds;
56  HcalZDCDetId id;
57  int firstCell = extTopology->firstCell(section);
58  int lastCell = extTopology->lastCell(section);
59  for(int ichannel = firstCell; ichannel <= lastCell; ++ichannel) {
60  id = HcalZDCDetId(section, true, ichannel);
61  if(extTopology->valid(id)) zdcIds.push_back(id);
62  id = HcalZDCDetId(section, false, ichannel);
63  if(extTopology->valid(id)) zdcIds.push_back(id);
64  }
65  if( geom->cornersMgr() == 0 ) geom->allocateCorners( HcalZDCDetId::kSizeForDenseIndexing ) ;
66  if( geom->parMgr() == 0 ) geom->allocatePar(
69 
70  edm::LogInfo("ZdcHardcodeGeometry") << "Number of ZDC DetIds made: " << section << " " << zdcIds.size();
71 
72  // for each new HcalZdcDetId, make a CaloCellGeometry
73 
74  for(std::vector<HcalZDCDetId>::const_iterator zdcIdItr = zdcIds.begin();
75  zdcIdItr != zdcIds.end(); ++zdcIdItr)
76  {
77  makeCell( *zdcIdItr, geom ) ;
78  }
79 }
void makeCell(const HcalZDCDetId &detId, CaloSubdetectorGeometry *geom) const
virtual bool valid(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:25
int lastCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:259
int firstCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:248
void ZdcHardcodeGeometryLoader::init ( void  )
private

Definition at line 24 of file ZdcHardcodeGeometryLoader.cc.

Referenced by ZdcHardcodeGeometryLoader().

25 {
26 }
ZdcHardcodeGeometryLoader::ReturnType ZdcHardcodeGeometryLoader::load ( DetId::Detector  det,
int  subdet 
)
virtual

Definition at line 29 of file ZdcHardcodeGeometryLoader.cc.

References HcalZDCDetId::EM, extTopology, fill(), HcalZDCDetId::HAD, HcalZDCDetId::LUM, and HcalZDCDetId::SubdetectorId.

Referenced by ZdcHardcodeGeometryEP::produce().

30 {
32  if(subdet == HcalZDCDetId::SubdetectorId)
33  {
34  fill(HcalZDCDetId::EM ,hg );
35  fill(HcalZDCDetId::LUM ,hg );
36  fill(HcalZDCDetId::HAD ,hg );
37  }
38  return hg;
39 }
void fill(HcalZDCDetId::Section section, CaloSubdetectorGeometry *cg)
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
CaloSubdetectorGeometry * ReturnType
ZdcHardcodeGeometryLoader::ReturnType ZdcHardcodeGeometryLoader::load ( )

Definition at line 42 of file ZdcHardcodeGeometryLoader.cc.

References HcalZDCDetId::EM, extTopology, fill(), HcalZDCDetId::HAD, and HcalZDCDetId::LUM.

43 {
45  fill(HcalZDCDetId::EM ,hg );
46  fill(HcalZDCDetId::LUM ,hg );
47  fill(HcalZDCDetId::HAD ,hg );
48  return hg;
49 }
void fill(HcalZDCDetId::Section section, CaloSubdetectorGeometry *cg)
CaloSubdetectorGeometry * ReturnType
void ZdcHardcodeGeometryLoader::makeCell ( const HcalZDCDetId detId,
CaloSubdetectorGeometry geom 
) const
private

Definition at line 82 of file ZdcHardcodeGeometryLoader.cc.

References HcalZDCDetId::channel(), funct::cos(), cuy::dh, HcalZDCDetId::EM, benchmark_cfg::fc, CaloCellGeometry::getParmPtr(), HcalZDCDetId::HAD, ZdcGeometry::k_NumberOfParametersPerShape, HcalZDCDetId::LUM, CaloSubdetectorGeometry::newCell(), CaloSubdetectorGeometry::parMgr(), CaloSubdetectorGeometry::parVecVec(), HcalZDCDetId::section(), x, detailsBasic3DVector::y, detailsBasic3DVector::z, and HcalZDCDetId::zside().

Referenced by fill().

84 {
85  double zside ( detId.zside() ) ;
86 
87  const HcalZDCDetId::Section section ( detId.section() ) ;
88 
89  const int channel ( detId.channel() ) ;
90 
91 //********* Here are all the hardcoded numbers you need to know, in **cm**
92 //********* Most are from the zdc.xml and zdclum.xml files ******
93 
94  static const double x0 ( 0 ) ; // these 3 are for the "mother" volume
95  static const double y0 ( 0 ) ;
96  static const double z0 ( 14000 ) ;
97 
98  static const double angEM ( 0 ) ; // the angles of front face wrt vertical
99  static const double angLUM ( 0 ) ;
100  static const double angHAD ( atan( 1. ) ) ; // this is 45 deg
101 
102  // these dimensions are **half**-sizes
103 
104  static const double dxHAD ( 4.8 ) ;
105  static const double dxEM ( dxHAD/5. ) ;
106  static const double dxLUM ( 4.8 ) ; // to be updated when known
107 
108  static const double dhEM ( 6.25 ) ;
109  static const double dhLUM ( 6.25 ) ; // to be updated when known
110  static const double dhHAD ( 6.25 ) ;
111 
112  static const double dzEM ( 33.*0.15 ) ;
113  static const double dzLUM ( 23.5 ) ; // to be updated when known
114  static const double dzHAD ( 0.82*6./cos(angHAD) ) ;
115 
116  // these are not half-dimensions, they are offsets from nominal
117  // for the center-of-front-face points
118 
119  static const double xOffEM ( -4.*dxEM ) ;
120  static const double xOffLUM ( 0 ) ;
121  static const double xOffHAD ( 0 ) ;
122 
123  static const double yOffEM ( 0 ) ;
124  static const double yOffLUM ( 0 ) ;
125  static const double yOffHAD ( 0 ) ;
126 
127  static const double zOffEM ( -49.85 - 0.15 ) ;
128  static const double zOffLUM ( -39.555 ) ;
129  static const double zOffHAD ( -29.00 ) ;
130 
131 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
132 
133  double dx, dh, dz, x, y, z, an ;
134 
135  if( section==HcalZDCDetId::EM )
136  {
137  dx = dxEM ;
138  dh = dhEM ;
139  dz = dzEM ;
140  an = angEM ;
141  x = zside*( x0 + xOffEM + ( channel - 1.0 )*dxEM*2. ) ;
142  y = y0 + yOffEM ;
143  z = zside*( z0 + zOffEM ) ;
144  }
145  else
146  {
147  if( section==HcalZDCDetId::LUM )
148  {
149  dx = dxLUM ;
150  dh = dhLUM ;
151  dz = dzLUM ;
152  an = angLUM ;
153  x = zside*( x0 + xOffLUM ) ;
154  y = y0 + yOffLUM ;
155  z = zside*( z0 + zOffLUM + ( channel - 1.0 )*dzLUM*2. ) ;
156  }
157  else
158  {
159  assert( section==HcalZDCDetId::HAD ) ;
160  dx = dxHAD ;
161  dh = dhHAD ;
162  dz = dzHAD ;
163  an = angHAD ;
164  x = zside*( x0 + xOffHAD ) ;
165  y = y0 + yOffHAD ;
166  z = zside*( z0 + zOffHAD + ( channel - 1.0 )*dzHAD*2. ) ;
167  }
168  }
169 
170  const GlobalPoint fc ( x, y, z );
171 
172  const double dy ( dh*cos( an ) ) ;
173 
174  std::vector<CCGFloat> zz ;
176  zz.push_back( an ) ;
177  zz.push_back( dx ) ;
178  zz.push_back( dy ) ;
179  zz.push_back( dz ) ;
180 
181  geom->newCell( fc, fc, fc,
183  geom->parMgr(),
184  geom->parVecVec() ),
185  detId ) ;
186 }
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:34
float float float z
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
Section section() const
get the section
Definition: HcalZDCDetId.h:36
int channel() const
get the channel
Definition: HcalZDCDetId.h:40
Definition: DDAxes.h:10
tuple dh
Definition: cuy.py:353

Member Data Documentation

const ZdcTopology* ZdcHardcodeGeometryLoader::extTopology
private

Definition at line 36 of file ZdcHardcodeGeometryLoader.h.

Referenced by fill(), and load().

float ZdcHardcodeGeometryLoader::theEMSectiondX
private

Definition at line 38 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theEMSectiondY
private

Definition at line 39 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theEMSectiondZ
private

Definition at line 40 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theHADSectiondX
private

Definition at line 44 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theHADSectiondY
private

Definition at line 45 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theHADSectiondZ
private

Definition at line 46 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theLUMSectiondX
private

Definition at line 41 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theLUMSectiondY
private

Definition at line 42 of file ZdcHardcodeGeometryLoader.h.

float ZdcHardcodeGeometryLoader::theLUMSectiondZ
private

Definition at line 43 of file ZdcHardcodeGeometryLoader.h.

ZdcTopology* ZdcHardcodeGeometryLoader::theTopology
private

Definition at line 35 of file ZdcHardcodeGeometryLoader.h.

Referenced by ~ZdcHardcodeGeometryLoader().