17 : hcalConstants(hcons) {
45 fill (hsub, gDDD, geom );
79 std::cout <<
"HcalDDDGeometryLoader::fill gets " << hcalCells.size()
80 <<
" cells for subdetector " << subdet << std::endl;
84 std::vector<HcalDetId> hcalIds;
85 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
86 int etaRing = hcalCells[
i].etaBin();
87 int iside = hcalCells[
i].zside();
88 int depthBin = hcalCells[
i].depthSegment();
89 double dphi = hcalCells[
i].phiBinWidth();
90 std::vector<std::pair<int,double> > phis = hcalCells[
i].phis();
92 std::cout <<
"HcalDDDGeometryLoader: Subdet " << subdet <<
" side " 93 << iside <<
" eta " << etaRing <<
" depth " << depthBin
94 <<
" with " << phis.size() <<
"modules:" << std::endl;
96 for (
unsigned int k = 0;
k < phis.size();
k++) {
98 std::cout <<
"HcalDDDGeometryLoader::fill Cell " <<
i <<
" eta " 99 << iside*etaRing <<
" phi " << phis[
k].first <<
"(" 100 << phis[
k].second/CLHEP::deg <<
", " << dphi/CLHEP::deg
101 <<
") depth " << depthBin << std::endl;
104 hcalIds.push_back(
id);
109 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
110 <<
" is " << hcalIds.size();
115 double phi,
double dphi,
119 double eta1 = hcalCell.
etaMin();
120 double eta2 = hcalCell.
etaMax();
122 double eta = 0.5*(eta1+eta2) * detId.
zside();
123 double deta = (eta2-eta1);
130 double z,
r, thickness;
138 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
146 thickness = 2. * hcalCell.
halfSize();
150 r1 = z/sinh(
std::abs(eta)+0.5*deta);
151 r2 = z/sinh(
std::abs(eta)-0.5*deta);
155 std::cout <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
156 <<
" eta = " << eta <<
" theta = " << theta <<
" r = " << r
157 <<
" thickness = " << thickness <<
" r0-r2 (" << r0 <<
":" 158 << r1 <<
":" << r2 <<
")" << std::endl;
163 if (
isBH_) z += (0.5*thickness);
169 r1 = z/sinh(
std::abs(eta)+0.5*deta);
170 r2 = z/sinh(
std::abs(eta)-0.5*deta);
171 std::cout <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
172 <<
" eta = " << eta <<
" theta = " << theta <<
" z = " << z
173 <<
" r = " << r <<
" thickness = " << thickness <<
" r0-r2 (" 174 << r0 <<
":" << r1 <<
":" << r2 <<
")" << std::endl;
178 double x = r *
cos(phi);
179 double y = r *
sin(phi);
183 std::cout <<
"HcalDDDGeometryLoader::makeCell for " << detId <<
" Point " 184 << point <<
" deta = " << deta <<
" dphi = " << dphi
185 <<
" thickness = " << thickness <<
" isBarrel = " << isBarrel
186 <<
" " << rzType << std::endl;
189 std::vector<CCGFloat>
hp ;
193 hp.push_back(deta/2.) ;
194 hp.push_back(dphi/2.) ;
195 hp.push_back(thickness/2.) ;
197 const double sign ( isBarrel ? 1 : -1 ) ;
198 hp.push_back(deta/2.) ;
199 hp.push_back(dphi/2.) ;
200 hp.push_back(sign*thickness/2.) ;
202 geom->
newCell( point, point, point,
HcalSubdetector subdet() const
get the subdetector
int zside() const
get the z-side of the cell (1/-1)
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
CaloCellGeometry::CCGFloat CCGFloat
void allocatePar(ParVec::size_type n, unsigned int m)
void fill(HcalSubdetector, HcalDDDGeometry *, CaloSubdetectorGeometry *)
U second(std::pair< T, U > const &p)
unsigned int numberOfCells(HcalSubdetector) const
int insertCell(std::vector< HcalCellType > const &)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
ReturnType load(const HcalTopology &topo, DetId::Detector, int)
std::vector< HcalCellType > HcalCellTypes(HcalSubdetector) const
void makeCell(const HcalDetId &, const HcalCellType &, double, double, CaloSubdetectorGeometry *geom) const
double etaMax() const
cell edge, always positive & greater than etaMin
CaloCellGeometry::CornersMgr * cornersMgr()
double etaMin() const
lower cell edge. Always positive
virtual ~HcalDDDGeometryLoader()
const HcalDDDRecConstants * hcalConstants
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point