46 fill (hsub, gDDD, geom );
80 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill gets "
81 << hcalCells.size() <<
" cells for subdetector "
86 double deg =
M_PI/180.;
87 std::vector<HcalDetId> hcalIds;
88 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
89 int etaRing = hcalCells[
i].etaBin();
90 int depthBin = hcalCells[
i].depthSegment();
91 int phiInc = 4/hcalCells[
i].nPhiModule();
92 unsigned int iphi = 1;
93 if (hcalCells[
i].unitPhi() == 4) iphi = 3;
94 double dphi = (hcalCells[
i].phiBinWidth())*deg;
95 double phi =-(hcalCells[
i].phiOffset())*deg + 0.5*dphi;
96 std::vector<int>missPlus = hcalCells[
i].missingPhiPlus();
97 std::vector<int>missMinus = hcalCells[
i].missingPhiMinus();
99 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader: Subdet " << subdet
100 <<
" eta " << etaRing <<
" depth " << depthBin
101 <<
" modules " << hcalCells[
i].nPhiModule() <<
" "
102 << phiInc <<
" phi " << phi/deg <<
" " << dphi/deg
103 <<
" Missing " << missPlus.size() <<
"/"
106 for (
int k = 0;
k < hcalCells[
i].nPhiBins();
k++) {
108 for (
unsigned int kk = 0;
kk < missPlus.size();
kk++)
109 if (iphi == (
unsigned int)(missPlus[
kk])) ok =
false;
112 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
113 <<
" eta " << etaRing <<
" phi " << iphi <<
"("
114 << phi/deg <<
", " << dphi/deg <<
") depth "
117 HcalDetId id(subdet, etaRing, iphi, depthBin);
118 hcalIds.push_back(
id);
119 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
121 if (hcalCells[
i].nHalves() > 1) {
123 for (
unsigned int kk = 0;
kk < missMinus.size();
kk++)
124 if (iphi == (
unsigned int)(missMinus[
kk])) ok =
false;
127 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
128 <<
" eta " << -etaRing <<
" phi " << iphi <<
" ("
129 << phi/deg <<
", " << dphi/deg <<
") depth "
132 HcalDetId id(subdet, -etaRing, iphi, depthBin);
133 hcalIds.push_back(
id);
134 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
142 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
143 <<
" is " << hcalIds.size();
154 double eta1 = hcalCell.
etaMin();
155 double eta2 = hcalCell.
etaMax();
157 double eta = 0.5*(eta1+eta2) * detId.
zside();
158 double deta = (eta2-eta1);
165 double z,
r, thickness;
173 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
181 thickness = 2. * hcalCell.
halfSize();
185 r1 = z/sinh(
std::abs(eta)+0.5*deta);
186 r2 = z/sinh(
std::abs(eta)-0.5*deta);
190 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
191 <<
" eta = " << eta <<
" theta = " << theta
192 <<
" r = " << r <<
" thickness = " << thickness
193 <<
" r0-r2 (" << r0 <<
":" << r1 <<
":" << r2 <<
")";
203 r1 = z/sinh(
std::abs(eta)+0.5*deta);
204 r2 = z/sinh(
std::abs(eta)-0.5*deta);
205 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
206 <<
" eta = " << eta <<
" theta = " << theta
207 <<
" z = " << z <<
" r = " << r <<
" thickness = "
208 << thickness <<
" r0-r2 (" << r0 <<
":" << r1 <<
":"
213 double x = r *
cos(phi);
214 double y = r *
sin(phi);
218 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell for " << detId
219 <<
" Point " << point <<
" deta = " << deta
220 <<
" dphi = " << dphi <<
" thickness = " << thickness
221 <<
" isBarrel = " << isBarrel <<
" " << rzType;
224 std::vector<CCGFloat>
hp ;
229 hp.push_back(deta/2.) ;
230 hp.push_back(dphi/2.) ;
231 hp.push_back(thickness/2.) ;
235 const double sign ( isBarrel ? 1 : -1 ) ;
236 hp.push_back(deta/2.) ;
237 hp.push_back(dphi/2.) ;
238 hp.push_back(sign*thickness/2.) ;
240 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
std::vector< HcalCellType > HcalCellTypes() const
type of data representation of DDCompactView
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)
HcalNumberingFromDDD * numberingFromDDD
ReturnType load(const HcalTopology &topo, DetId::Detector, int)
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()
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