31 std::cout <<
"FlexiGeometryLoader initialize with ncells " 32 << fTopology.
ncells() <<
" and shapes " 35 <<
" with BH Flag " <<
isBH_ << std::endl;
54 std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters>
result;
55 std::vector<std::pair<double,double> > gconsHB = hcons.
getConstHBHE(0);
56 std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.
getEtaBins(0);
59 std::cout <<
"FlexiGeometryLoader called for " << etabins.size()
60 <<
" Eta Bins" << std::endl;
61 for (
unsigned int k=0;
k<gconsHB.size(); ++
k) {
62 std::cout <<
"gconsHB[" <<
k <<
"] = " << gconsHB[
k].first <<
" +- " 63 << gconsHB[
k].second << std::endl;
66 for (
unsigned int i=0;
i<etabins.size(); ++
i) {
67 int iring = (etabins[
i].zside >= 0) ? etabins[
i].ieta : -etabins[
i].ieta;
68 int depth = etabins[
i].depthStart;
69 double dphi = (etabins[
i].phis.size() > 1) ?
72 for (
unsigned int k=0;
k<etabins[
i].layer.size(); ++
k) {
73 int layf = etabins[
i].layer[
k].first-1;
74 int layl = etabins[
i].layer[
k].second-1;
75 double rmin = gconsHB[layf].first-gconsHB[layf].second;
76 double rmax = gconsHB[layl].first+gconsHB[layl].second;
77 for (
unsigned int j=0;
j<etabins[
i].phis.size(); ++
j) {
79 std::cout <<
"HBRing " << iring <<
" eta " << etabins[
i].etaMin <<
":" 80 << etabins[
i].etaMax <<
" depth " << depth <<
" R " << rmin
81 <<
":" << rmax <<
" Phi " << etabins[
i].phis[
j].first <<
":" 82 << etabins[
i].phis[
j].second <<
":" << dphi <<
" layer[" <<
k 83 <<
"]: " << etabins[
i].layer[
k].first-1 <<
":" 84 << etabins[
i].layer[
k].second << std::endl;
97 const double HORMIN0 = 390.0;
98 const double HORMIN1 = 412.6;
99 const double HORMAX = 413.6;
100 const int nCells = 15;
102 const double etamin[nCells] = {0.000,0.087,0.174, 0.261, 0.3395,0.435,0.522,
103 0.609,0.696,0.783, 0.873, 0.957, 1.044,1.131,
105 const double etamax[nCells] = {0.087,0.174,0.261, 0.3075,0.435, 0.522,0.609,
106 0.696,0.783,0.8494,0.957, 1.044, 1.131,1.218,
108 std::vector<HcalFlexiHardcodeGeometryLoader::HBHOCellParameters>
result;
109 result.reserve (nCells*nPhi);
110 double dphi = ((2.0*
M_PI)/nPhi);
111 for (
int i = 0;
i < nCells; ++
i) {
112 double rmin = ((
i < 4) ? HORMIN0 : HORMIN1);
113 for (
int iside = -1; iside <= 1; iside += 2) {
115 double phi = (
j+0.5)*dphi;
130 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
133 float phiCenter = param.
phi;
135 float x = param.
rMin*
cos (phiCenter);
136 float y = param.
rMin*
sin (phiCenter);
137 float z = (param.
ieta < 0) ? -(param.
rMin*sinh(etaCenter)) : (param.
rMin*sinh(etaCenter));
140 std::vector<CCGFloat> cellParams;
141 cellParams.reserve (5);
142 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
143 cellParams.push_back (0.5 * param.
dphi);
144 cellParams.push_back (0.5 * (param.
rMax - param.
rMin) * cosh (etaCenter));
145 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
146 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
148 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHBHO-> " << hid
149 <<
" " << hid.
rawId() <<
" " << std::hex << hid.
rawId()
150 <<
std::dec <<
" " << hid <<
" " << refPoint <<
'/' 151 << cellParams [0] <<
'/' << cellParams [1] <<
'/' 152 << cellParams [2] << std::endl;
154 fGeometry->
newCell(refPoint, refPoint, refPoint,
166 std::vector<HcalFlexiHardcodeGeometryLoader::HECellParameters>
result;
167 std::vector<std::pair<double,double> > gconsHE = hcons.
getConstHBHE(1);
169 std::cout <<
"HcalFlexiHardcodeGeometryLoader:HE with " << gconsHE.size()
170 <<
" cells" << std::endl;
172 if (gconsHE.size() > 0) {
173 std::vector<HcalDDDRecConstants::HcalEtaBin> etabins = hcons.
getEtaBins(1);
176 std::cout <<
"FlexiGeometryLoader called for HE with " << etabins.size()
177 <<
" Eta Bins and " << gconsHE.size() <<
" depths" 179 for (
unsigned int i=0;
i<gconsHE.size(); ++
i)
184 for (
unsigned int i=0;
i<etabins.size(); ++
i) {
185 int iring = (etabins[
i].zside >= 0) ? etabins[
i].ieta : -etabins[
i].ieta;
186 int depth = etabins[
i].depthStart;
187 double dphi = (etabins[
i].phis.size() > 1) ?
191 std::cout <<
"FlexiGeometryLoader::Ring " << iring <<
" nphi " << nphi
192 <<
" dstart " << depth <<
" dphi " << dphi <<
" units " 193 <<
units <<
" fioff " << fioff <<
" layers " 194 << etabins[
i].layer.size() << std::endl;
196 for (
unsigned int k=0;
k<etabins[
i].layer.size(); ++
k) {
197 int layf = etabins[
i].layer[
k].first-1;
198 int layl = etabins[
i].layer[
k].second-1;
199 double zmin = gconsHE[layf].first-gconsHE[layf].second;
200 double zmax = gconsHE[layl].first+gconsHE[layl].second;
202 for (
int k2=layf; k2<=layl; ++k2) {
203 if (gconsHE[k2].
first > 10) {
204 zmin = gconsHE[k2].first-gconsHE[k2].second;
209 if (zmin >= zmax) zmax = zmin+10.;
210 for (
unsigned int j=0;
j<etabins[
i].phis.size(); ++
j) {
212 std::cout <<
"HERing " << iring <<
" eta " << etabins[
i].etaMin <<
":" 213 << etabins[
i].etaMax <<
" depth " << depth <<
" Z " << zmin
214 <<
":" << zmax <<
" Phi :" << etabins[
i].phis[
j].first
215 <<
":" << etabins[
i].phis[
j].second <<
":" << dphi
216 <<
" layer[" <<
k <<
"]: " << etabins[
i].layer[
k].first-1
217 <<
":" << etabins[
i].layer[
k].second-1 << std::endl;
232 const double HEZMIN_H2 = 400.715;
233 const double HEZMID_H2 = 436.285;
234 const double HEZMAX_H2 = 541.885;
235 const int nEtas = 10;
236 const int nDepth[nEtas] = {1,2,2,2,2,2,2,2,3,3};
237 const int dStart[nEtas] = {3,1,1,1,1,1,1,1,1,1};
238 const int nPhis[nEtas] = {8,8,8,8,8,8,4,4,4,4};
239 const double etas[nEtas+1] = {1.305,1.373,1.444,1.521,1.603,1.693,1.790,
240 1.880,1.980,2.090,2.210};
241 const double zval[4*nEtas] = {409.885,462.685,0.,0.,
242 HEZMIN_H2,427.485,506.685,0.0,
243 HEZMIN_H2,HEZMID_H2,524.285,0.,
244 HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
245 HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
246 HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
247 HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
248 HEZMIN_H2,HEZMID_H2,HEZMAX_H2,0.,
249 HEZMIN_H2,418.685,HEZMID_H2,HEZMAX_H2,
250 HEZMIN_H2,418.685,HEZMID_H2,HEZMAX_H2};
251 std::vector<HcalFlexiHardcodeGeometryLoader::HECellParameters>
result;
253 for (
int i = 0;
i < nEtas; ++
i) {
255 for (
int k=0;
k<nDepth[
i]; ++
k) {
257 for (
int j=0;
j < nPhis[
i]; ++
j) {
258 int iphi = (nPhis[
i] == 8) ? (
j+1) : (2*
j+1);
260 double phi0 = (
j+0.5)*dphi;
272 const float HFZMIN1 = 1115.;
273 const float HFZMIN2 = 1137.;
274 const float HFZMAX = 1280.1;
276 unsigned int nCells = cells.size();
277 std::vector <HcalFlexiHardcodeGeometryLoader::HFCellParameters>
result;
278 result.reserve (nCells);
279 for (
unsigned int i = 0;
i < nCells; ++
i) {
281 result.push_back (cell1);
283 result.push_back (cell2);
290 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
293 float phiCenter = param.
phi;
295 int iside = (param.
ieta >= 0) ? 1 : -1;
296 float perp = param.
zMin / sinh (etaCenter);
297 float x = perp *
cos (phiCenter);
298 float y = perp *
sin (phiCenter);
302 std::vector<CCGFloat> cellParams;
303 cellParams.reserve (5);
304 cellParams.push_back (0.5 * (param.
etaMax - param.
etaMin));
305 cellParams.push_back (0.5 * param.
dphi);
306 cellParams.push_back (-0.5 * (param.
zMax - param.
zMin) / tanh (etaCenter));
307 cellParams.push_back ( fabs( refPoint.
eta() ) ) ;
308 cellParams.push_back ( fabs( refPoint.
z() ) ) ;
310 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHE-> " << hid <<
" " 312 <<
" " << hid << refPoint <<
'/' << cellParams [0] <<
'/' 313 << cellParams [1] <<
'/' << cellParams [2] << std::endl;
315 fGeometry->
newCell(refPoint, refPoint, refPoint,
325 for (
size_t iCell = 0; iCell < fCells.size(); ++iCell) {
334 float iEta = inner.
eta();
335 float oEta = outer.
eta();
336 float etaCenter = 0.5 * ( iEta + oEta );
338 float perp = param.
zMin / sinh (etaCenter);
339 float x = perp *
cos (phiCenter);
340 float y = perp *
sin (phiCenter);
344 std::vector<CCGFloat> cellParams;
345 cellParams.reserve (5);
346 cellParams.push_back (0.5 * ( iEta - oEta ));
348 cellParams.push_back (0.5 * (param.
zMax - param.
zMin));
349 cellParams.push_back ( fabs( refPoint.eta()));
350 cellParams.push_back ( fabs( refPoint.z() ) ) ;
352 std::cout <<
"HcalFlexiHardcodeGeometryLoader::fillHF-> " << hid <<
" " 354 <<
" " << hid <<
" " << refPoint <<
'/' << cellParams [0]
355 <<
'/' << cellParams [1] <<
'/' << cellParams [2] << std::endl;
357 fGeometry->
newCell(refPoint, refPoint, refPoint,
CaloCellGeometry::CCGFloat CCGFloat
unsigned int getHFSize() const
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
std::vector< HFCellParameters > makeHFCells(const HcalDDDRecConstants &hcons)
Sin< T >::type sin(const T &t)
void fillHBHO(CaloSubdetectorGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
std::vector< HECellParameters > makeHECells_H2()
HcalFlexiHardcodeGeometryLoader(const edm::ParameterSet &)
void allocatePar(ParVec::size_type n, unsigned int m)
std::vector< HBHOCellParameters > makeHBCells(const HcalDDDRecConstants &hcons)
HcalTopologyMode::Mode mode() const
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
std::vector< std::pair< double, double > > getConstHBHE(const int type) const
virtual unsigned int numberOfShapes() const
std::vector< HBHOCellParameters > makeHOCells()
Cos< T >::type cos(const T &t)
std::vector< HFCellParameters > getHFCellParameters() const
void fillHE(CaloSubdetectorGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
std::vector< HECellParameters > makeHECells(const HcalDDDRecConstants &hcons)
void fillHF(CaloSubdetectorGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
CaloCellGeometry::CornersMgr * cornersMgr()
TString units(TString variable, Char_t axis)
T perp() const
Magnitude of transverse component.
CaloSubdetectorGeometry * load(const HcalTopology &fTopology, const HcalDDDRecConstants &hcons)
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
std::vector< HcalEtaBin > getEtaBins(const int itype) const