17 : hcalConstants(hcons) { }
43 fill (hsub, gDDD, geom );
77 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill gets "
78 << hcalCells.size() <<
" cells for subdetector "
83 double deg =
M_PI/180.;
84 std::vector<HcalDetId> hcalIds;
85 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
86 int etaRing = hcalCells[
i].etaBin();
87 int depthBin = hcalCells[
i].depthSegment();
88 int phiInc = 4/hcalCells[
i].nPhiModule();
89 unsigned int iphi = 1;
90 if (hcalCells[
i].unitPhi() == 4) iphi = 3;
91 double dphi = (hcalCells[
i].phiBinWidth())*deg;
92 double phi =-(hcalCells[
i].phiOffset())*deg + 0.5*dphi;
93 std::vector<int>missPlus = hcalCells[
i].missingPhiPlus();
94 std::vector<int>missMinus = hcalCells[
i].missingPhiMinus();
96 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader: Subdet " << subdet
97 <<
" eta " << etaRing <<
" depth " << depthBin
98 <<
" modules " << hcalCells[
i].nPhiModule() <<
" "
99 << phiInc <<
" phi " << phi/deg <<
" " << dphi/deg
100 <<
" Missing " << missPlus.size() <<
"/"
103 for (
int k = 0;
k < hcalCells[
i].nPhiBins();
k++) {
105 for (
unsigned int kk = 0;
kk < missPlus.size();
kk++)
106 if (iphi == (
unsigned int)(missPlus[
kk])) ok =
false;
109 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
110 <<
" eta " << etaRing <<
" phi " << iphi <<
"("
111 << phi/deg <<
", " << dphi/deg <<
") depth "
114 HcalDetId id(subdet, etaRing, iphi, depthBin);
115 hcalIds.push_back(
id);
116 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
118 if (hcalCells[
i].nHalves() > 1) {
120 for (
unsigned int kk = 0;
kk < missMinus.size();
kk++)
121 if (iphi == (
unsigned int)(missMinus[
kk])) ok =
false;
124 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
125 <<
" eta " << -etaRing <<
" phi " << iphi <<
" ("
126 << phi/deg <<
", " << dphi/deg <<
") depth "
129 HcalDetId id(subdet, -etaRing, iphi, depthBin);
130 hcalIds.push_back(
id);
131 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
139 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
140 <<
" is " << hcalIds.size();
151 double eta1 = hcalCell.
etaMin();
152 double eta2 = hcalCell.
etaMax();
154 double eta = 0.5*(eta1+eta2) * detId.
zside();
155 double deta = (eta2-eta1);
162 double z,
r, thickness;
170 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
178 thickness = 2. * hcalCell.
halfSize();
182 r1 = z/sinh(
std::abs(eta)+0.5*deta);
183 r2 = z/sinh(
std::abs(eta)-0.5*deta);
187 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
188 <<
" eta = " << eta <<
" theta = " << theta
189 <<
" r = " << r <<
" thickness = " << thickness
190 <<
" r0-r2 (" << r0 <<
":" << r1 <<
":" << r2 <<
")";
200 r1 = z/sinh(
std::abs(eta)+0.5*deta);
201 r2 = z/sinh(
std::abs(eta)-0.5*deta);
202 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
203 <<
" eta = " << eta <<
" theta = " << theta
204 <<
" z = " << z <<
" r = " << r <<
" thickness = "
205 << thickness <<
" r0-r2 (" << r0 <<
":" << r1 <<
":"
210 double x = r *
cos(phi);
211 double y = r *
sin(phi);
215 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell for " << detId
216 <<
" Point " << point <<
" deta = " << deta
217 <<
" dphi = " << dphi <<
" thickness = " << thickness
218 <<
" isBarrel = " << isBarrel <<
" " << rzType;
221 std::vector<CCGFloat>
hp ;
225 hp.push_back(deta/2.) ;
226 hp.push_back(dphi/2.) ;
227 hp.push_back(thickness/2.) ;
229 const double sign ( isBarrel ? 1 : -1 ) ;
230 hp.push_back(deta/2.) ;
231 hp.push_back(dphi/2.) ;
232 hp.push_back(sign*thickness/2.) ;
234 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
bool isBarrel(GeomDetEnumerators::SubDetector m)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
void allocatePar(ParVec::size_type n, unsigned int m)
void fill(HcalSubdetector, HcalDDDGeometry *, CaloSubdetectorGeometry *)
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)
CaloCellGeometry::CCGFloat CCGFloat
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
Geom::Phi< T > phi() const
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