14 std::string
name =
"HcalHits";
42 fill (hsub, gDDD, geom );
76 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill gets "
77 << hcalCells.size() <<
" cells for subdetector "
82 double deg =
M_PI/180.;
83 std::vector<HcalDetId> hcalIds;
84 for (
unsigned int i=0;
i<hcalCells.size();
i++) {
85 int etaRing = hcalCells[
i].etaBin();
86 int depthBin = hcalCells[
i].depthSegment();
87 int phiInc = 4/hcalCells[
i].nPhiModule();
88 unsigned int iphi = 1;
89 if (hcalCells[
i].unitPhi() == 4) iphi = 3;
90 double dphi = (hcalCells[
i].phiBinWidth())*deg;
91 double phi =-(hcalCells[
i].phiOffset())*deg + 0.5*dphi;
92 std::vector<int>missPlus = hcalCells[
i].missingPhiPlus();
93 std::vector<int>missMinus = hcalCells[
i].missingPhiMinus();
95 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader: Subdet " << subdet
96 <<
" eta " << etaRing <<
" depth " << depthBin
97 <<
" modules " << hcalCells[
i].nPhiModule() <<
" "
98 << phiInc <<
" phi " << phi/deg <<
" " << dphi/deg
99 <<
" Missing " << missPlus.size() <<
"/"
102 for (
int k = 0;
k < hcalCells[
i].nPhiBins();
k++) {
104 for (
unsigned int kk = 0; kk < missPlus.size(); kk++)
105 if (iphi == (
unsigned int)(missPlus[kk])) ok =
false;
108 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
109 <<
" eta " << etaRing <<
" phi " << iphi <<
"("
110 << phi/deg <<
", " << dphi/deg <<
") depth "
114 hcalIds.push_back(
id);
117 if (hcalCells[
i].nHalves() > 1) {
119 for (
unsigned int kk = 0; kk < missMinus.size(); kk++)
120 if (iphi == (
unsigned int)(missMinus[kk])) ok =
false;
123 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::fill Cell " <<
i
124 <<
" eta " << -etaRing <<
" phi " << iphi <<
" ("
125 << phi/deg <<
", " << dphi/deg <<
") depth "
129 hcalIds.push_back(
id);
138 edm::LogInfo(
"HCalGeom") <<
"Number of HCAL DetIds made for " << subdet
139 <<
" is " << hcalIds.size();
150 double eta1 = hcalCell.
etaMin();
151 double eta2 = hcalCell.
etaMax();
153 double eta = 0.5*(eta1+eta2) * detId.
zside();
154 double deta = (eta2-eta1);
161 double z,
r, thickness;
169 thickness = (hcalCell.
depthMax() -
r) * cosh(eta);
177 thickness = 2. * hcalCell.
halfSize();
181 r1 = z/sinh(
std::abs(eta)+0.5*deta);
182 r2 = z/sinh(
std::abs(eta)-0.5*deta);
186 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
187 <<
" eta = " << eta <<
" theta = " << theta
188 <<
" r = " << r <<
" thickness = " << thickness
189 <<
" r0-r2 (" << r0 <<
":" << r1 <<
":" << r2 <<
")";
199 r1 = z/sinh(
std::abs(eta)+0.5*deta);
200 r2 = z/sinh(
std::abs(eta)-0.5*deta);
201 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell SubDet " << subdet
202 <<
" eta = " << eta <<
" theta = " << theta
203 <<
" z = " << z <<
" r = " << r <<
" thickness = "
204 << thickness <<
" r0-r2 (" << r0 <<
":" << r1 <<
":"
209 double x = r *
cos(phi);
210 double y = r *
sin(phi);
214 LogDebug(
"HCalGeom") <<
"HcalDDDGeometryLoader::makeCell for " << detId
215 <<
" Point " << point <<
" deta = " << deta
216 <<
" dphi = " << dphi <<
" thickness = " << thickness
217 <<
" isBarrel = " << isBarrel <<
" " << rzType;
221 std::vector<double> hf ;
223 hf.push_back(deta/2.) ;
224 hf.push_back(dphi/2.) ;
225 hf.push_back(thickness/2.) ;
232 const double sign ( isBarrel ? 1 : -1 ) ;
233 std::vector<double> hh ;
235 hh.push_back(deta/2.) ;
236 hh.push_back(dphi/2.) ;
237 hh.push_back(sign*thickness/2.) ;
HcalSubdetector subdet() const
get the subdetector
CaloCellGeometry * makeCell(const HcalDetId &, HcalCellType, double, double, CaloSubdetectorGeometry *geom) const
int zside() const
get the z-side of the cell (1/-1)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
Exp< T >::type exp(const T &t)
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
void addCell(const DetId &id, CaloCellGeometry *ccg)
Add a cell to the geometry.
int insertCell(std::vector< HcalCellType > const &)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
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
static const double * getParmPtr(const std::vector< double > &vd, ParMgr *mgr, ParVecVec &pvv)
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