17 : hcalConstants(hcons) {
80 std::cout <<
"HcalDDDGeometryLoader::fill gets " << hcalCells.size()
81 <<
" cells for subdetector " << subdet << std::endl;
85 std::vector<HcalDetId> hcalIds;
86 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
87 int etaRing = hcalCells[
i].etaBin();
88 int iside = hcalCells[
i].zside();
89 int depthBin = hcalCells[
i].depthSegment();
90 double dphi = hcalCells[
i].phiBinWidth();
91 std::vector<std::pair<int,double> > phis = hcalCells[
i].phis();
93 std::cout <<
"HcalDDDGeometryLoader: Subdet " << subdet <<
" side " 94 << iside <<
" eta " << etaRing <<
" depth " << depthBin
95 <<
" with " << phis.size() <<
"modules:" << std::endl;
98 for (
unsigned int k = 0;
k < phis.size();
k++) {
100 std::cout <<
"HcalDDDGeometryLoader::fill Cell " <<
i <<
" eta " 101 << iside*etaRing <<
" phi " << phis[
k].first <<
"(" 102 << phis[
k].second/CLHEP::deg <<
", " << dphi/CLHEP::deg
103 <<
") depth " << depthBin << std::endl;
106 hcalIds.push_back(
id);
111 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
112 <<
" is " << hcalIds.size();
117 double phi,
double dphi,
121 double eta1 = hcalCell.
etaMin();
122 double eta2 = hcalCell.
etaMax();
124 double eta = 0.5*(eta1+eta2) * detId.
zside();
125 double deta = (eta2-eta1);
132 double z,
r, thickness;
140 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
148 thickness = 2. * hcalCell.
halfSize();
152 r1 = z/sinh(
std::abs(eta)+0.5*deta);
153 r2 = z/sinh(
std::abs(eta)-0.5*deta);
157 std::cout <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
158 <<
" eta = " << eta <<
" theta = " << theta <<
" r = " << r
159 <<
" thickness = " << thickness <<
" r0-r2 (" << r0 <<
":" 160 << r1 <<
":" << r2 <<
")" << std::endl;
165 if (
isBH_) z += (0.5*thickness);
171 r1 = z/sinh(
std::abs(eta)+0.5*deta);
172 r2 = z/sinh(
std::abs(eta)-0.5*deta);
173 std::cout <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
174 <<
" eta = " << eta <<
" theta = " << theta <<
" z = " << z
175 <<
" r = " << r <<
" thickness = " << thickness <<
" r0-r2 (" 176 << r0 <<
":" << r1 <<
":" << r2 <<
")" << std::endl;
180 double x = r *
cos(phi);
181 double y = r *
sin(phi);
185 std::cout <<
"HcalDDDGeometryLoader::makeCell for " << detId <<
" Point " 186 << point <<
" deta = " << deta <<
" dphi = " << dphi
187 <<
" thickness = " << thickness <<
" isBarrel = " << isBarrel
188 <<
" " << rzType << std::endl;
191 std::vector<CCGFloat>
hp ;
195 hp.push_back(deta/2.) ;
196 hp.push_back(dphi/2.) ;
197 hp.push_back(thickness/2.) ;
199 const double sign ( isBarrel ? 1 : -1 ) ;
200 hp.push_back(deta/2.) ;
201 hp.push_back(dphi/2.) ;
202 hp.push_back(sign*thickness/2.) ;
HcalSubdetector subdet() const
get the subdetector
int zside() const
get the z-side of the cell (1/-1)
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 *)
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
U second(std::pair< T, U > const &p)
unsigned int numberOfCells(HcalSubdetector) const
int insertCell(std::vector< HcalCellType > const &)
void increaseReserve(unsigned int extra)
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, HcalDDDGeometry *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