16 std::string
name =
"HcalHits";
44 fill (hsub, gDDD, geom );
78 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill gets "
79 << hcalCells.size() <<
" cells for subdetector "
84 double deg =
M_PI/180.;
85 std::vector<HcalDetId> hcalIds;
86 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
87 int etaRing = hcalCells[
i].etaBin();
88 int depthBin = hcalCells[
i].depthSegment();
89 int phiInc = 4/hcalCells[
i].nPhiModule();
90 unsigned int iphi = 1;
91 if (hcalCells[
i].unitPhi() == 4) iphi = 3;
92 double dphi = (hcalCells[
i].phiBinWidth())*deg;
93 double phi =-(hcalCells[
i].phiOffset())*deg + 0.5*dphi;
94 std::vector<int>missPlus = hcalCells[
i].missingPhiPlus();
95 std::vector<int>missMinus = hcalCells[
i].missingPhiMinus();
97 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader: Subdet " << subdet
98 <<
" eta " << etaRing <<
" depth " << depthBin
99 <<
" modules " << hcalCells[
i].nPhiModule() <<
" "
100 << phiInc <<
" phi " << phi/deg <<
" " << dphi/deg
101 <<
" Missing " << missPlus.size() <<
"/"
104 for (
int k = 0;
k < hcalCells[
i].nPhiBins();
k++) {
106 for (
unsigned int kk = 0;
kk < missPlus.size();
kk++)
107 if (iphi == (
unsigned int)(missPlus[
kk])) ok =
false;
110 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
111 <<
" eta " << etaRing <<
" phi " << iphi <<
"("
112 << phi/deg <<
", " << dphi/deg <<
") depth "
116 hcalIds.push_back(
id);
117 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
119 if (hcalCells[
i].nHalves() > 1) {
121 for (
unsigned int kk = 0;
kk < missMinus.size();
kk++)
122 if (iphi == (
unsigned int)(missMinus[
kk])) ok =
false;
125 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
126 <<
" eta " << -etaRing <<
" phi " << iphi <<
" ("
127 << phi/deg <<
", " << dphi/deg <<
") depth "
131 hcalIds.push_back(
id);
132 makeCell(
id,hcalCells[
i],phi,dphi,geom) ;
140 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
141 <<
" is " << hcalIds.size();
152 double eta1 = hcalCell.
etaMin();
153 double eta2 = hcalCell.
etaMax();
155 double eta = 0.5*(eta1+eta2) * detId.
zside();
156 double deta = (eta2-eta1);
163 double z,
r, thickness;
171 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
179 thickness = 2. * hcalCell.
halfSize();
183 r1 = z/sinh(
std::abs(eta)+0.5*deta);
184 r2 = z/sinh(
std::abs(eta)-0.5*deta);
188 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
189 <<
" eta = " << eta <<
" theta = " << theta
190 <<
" r = " << r <<
" thickness = " << thickness
191 <<
" r0-r2 (" << r0 <<
":" << r1 <<
":" << r2 <<
")";
201 r1 = z/sinh(
std::abs(eta)+0.5*deta);
202 r2 = z/sinh(
std::abs(eta)-0.5*deta);
203 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
204 <<
" eta = " << eta <<
" theta = " << theta
205 <<
" z = " << z <<
" r = " << r <<
" thickness = "
206 << thickness <<
" r0-r2 (" << r0 <<
":" << r1 <<
":"
211 double x = r *
cos(phi);
212 double y = r *
sin(phi);
216 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell for " << detId
217 <<
" Point " << point <<
" deta = " << deta
218 <<
" dphi = " << dphi <<
" thickness = " << thickness
219 <<
" isBarrel = " << isBarrel <<
" " << rzType;
222 std::vector<CCGFloat> hp ;
227 hp.push_back(deta/2.) ;
228 hp.push_back(dphi/2.) ;
229 hp.push_back(thickness/2.) ;
233 const double sign ( isBarrel ? 1 : -1 ) ;
234 hp.push_back(deta/2.) ;
235 hp.push_back(dphi/2.) ;
236 hp.push_back(sign*thickness/2.) ;
238 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)
void makeCell(const HcalDetId &, HcalCellType, double, double, CaloSubdetectorGeometry *geom) const
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)
CaloCellGeometry::CCGFloat CCGFloat
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
HcalNumberingFromDDD * numberingFromDDD
double etaMax() const
cell edge, always positive & greater than etaMin
CaloCellGeometry::CornersMgr * cornersMgr()
ReturnType load()
Load all of HCAL.
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