CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DDHCalBarrelAlgo Class Reference

#include <DDHCalBarrelAlgo.h>

Inheritance diagram for DDHCalBarrelAlgo:

Public Member Functions

 DDHCalBarrelAlgo ()
 
void execute (DDCompactView &cpv) override
 
double getAbsorbD (unsigned int i) const
 
int getAbsorberN () const
 
std::string getAbsorbMat (unsigned int i) const
 
std::string getAbsorbName (unsigned int i) const
 
double getAbsorbT (unsigned int i) const
 
double getDetdP1 (unsigned int i) const
 
double getDetdP2 (unsigned int i) const
 
std::string getDetMat () const
 
std::string getDetMatPl () const
 
std::string getDetMatSc () const
 
int getDetPosY (unsigned int i) const
 
double getDetT11 (unsigned int i) const
 
double getDetT12 (unsigned int i) const
 
double getDetT21 (unsigned int i) const
 
double getDetT22 (unsigned int i) const
 
double getDetTsc (unsigned int i) const
 
int getDetType (unsigned int i) const
 
double getDetWidth1 (unsigned int i) const
 
double getDetWidth2 (unsigned int i) const
 
std::string getGenMaterial () const
 
int getLayerAbsorb (unsigned int i) const
 
double getLayerAlpha (unsigned i) const
 
double getLayerD1 (unsigned i) const
 
double getLayerD2 (unsigned i) const
 
double getLayerGap (unsigned int i) const
 
int getLayerId (unsigned i) const
 
std::string getLayerLabel (unsigned i) const
 
std::string getLayerMaterial (unsigned i) const
 
double getLayerT1 (unsigned i) const
 
double getLayerT2 (unsigned i) const
 
double getLayerWidth (unsigned i) const
 
std::string getMidAbsMat (unsigned int i) const
 
std::string getMidAbsName (unsigned int i) const
 
int getMidAbsorber () const
 
double getMidAbsT (unsigned int i) const
 
double getMidAbsW (unsigned int i) const
 
double getMiddleD () const
 
std::string getMiddleMat () const
 
double getMiddleW () const
 
int getNhalf () const
 
int getNLayers () const
 
int getNsectors () const
 
int getNsectortot () const
 
double getRin () const
 
double getRmax (unsigned int i) const
 
double getRout () const
 
int getRzones () const
 
std::string getSideAbsMat (unsigned int i) const
 
std::string getSideAbsName (unsigned int i) const
 
int getSideAbsorber () const
 
double getSideAbsW (unsigned int i) const
 
double getSideD (unsigned int i) const
 
std::string getSideMat (unsigned int i) const
 
double getSideT (unsigned int i) const
 
double getTanTheta (unsigned int i) const
 
double getTheta (unsigned int i) const
 
double getZoff (unsigned int i) const
 
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
 
 ~DDHCalBarrelAlgo () override
 

Protected Member Functions

void constructGeneralVolume (DDCompactView &cpv)
 
void constructInsideDetectors (const DDLogicalPart &detector, const std::string &name, int id, double dx, double dy, double dz, int type, DDCompactView &cpv)
 
void constructInsideLayers (const DDLogicalPart &laylog, const std::string &name, int id, int nAbs, double rin, double d1, double alpha1, double d2, double alpha2, double t1, double t2, DDCompactView &cpv)
 
void constructInsideSector (const DDLogicalPart &sector, DDCompactView &cpv)
 
DDLogicalPart constructMidLayer (const DDLogicalPart &laylog, const std::string &nm, double rin, double alpha, DDCompactView &cpv)
 
DDLogicalPart constructSideLayer (const DDLogicalPart &laylog, const std::string &nm, int nAbs, double rin, double alpha, DDCompactView &cpv)
 

Private Attributes

std::vector< double > absorbD
 
std::vector< std::string > absorbMat
 
std::vector< std::string > absorbName
 
std::vector< double > absorbT
 
std::vector< double > detdP1
 
std::vector< double > detdP2
 
std::string detMat
 
std::string detMatPl
 
std::string detMatSc
 
std::vector< int > detPosY
 
std::string detRot
 
std::vector< double > detT11
 
std::vector< double > detT12
 
std::vector< double > detT21
 
std::vector< double > detT22
 
std::vector< double > detTsc
 
std::vector< int > detType
 
std::vector< double > detWidth1
 
std::vector< double > detWidth2
 
std::string genMaterial
 
std::string idName
 
std::string idNameSpace
 
int idOffset
 
std::vector< int > layerAbsorb
 
std::vector< double > layerAlpha
 
std::vector< double > layerD1
 
std::vector< double > layerD2
 
std::vector< double > layerGap
 
std::vector< int > layerId
 
std::vector< std::string > layerLabel
 
std::vector< std::string > layerMat
 
std::vector< double > layerT1
 
std::vector< double > layerT2
 
std::vector< double > layerWidth
 
double middleD
 
std::string middleMat
 
double middleW
 
std::vector< std::string > midMat
 
std::vector< std::string > midName
 
std::vector< double > midT
 
std::vector< double > midW
 
int nAbsorber
 
int nhalf
 
int nLayers
 
int nMidAbs
 
int nsectors
 
int nsectortot
 
int nSideAbs
 
double rin
 
std::vector< double > rmax
 
std::string rotHalf
 
std::string rotns
 
double rout
 
int rzones
 
std::vector< std::string > sideAbsMat
 
std::vector< std::string > sideAbsName
 
std::vector< double > sideAbsW
 
std::vector< double > sideD
 
std::vector< std::string > sideMat
 
std::vector< double > sideT
 
std::vector< double > theta
 
std::vector< double > ttheta
 
std::vector< double > zoff
 

Detailed Description

Definition at line 10 of file DDHCalBarrelAlgo.h.

Constructor & Destructor Documentation

DDHCalBarrelAlgo::DDHCalBarrelAlgo ( )

Definition at line 23 of file DDHCalBarrelAlgo.cc.

23  :
24  theta(0),rmax(0),zoff(0),ttheta(0),layerId(0),layerLabel(0),layerMat(0),
27  midName(0),midMat(0),midW(0),midT(0),sideMat(0),sideD(0),sideT(0),
29  detT11(0),detT12(0),detTsc(0),detT21(0),detT22(0),detWidth1(0),detWidth2(0),
30  detPosY(0) {
31 #ifdef EDM_ML_DEBUG
32  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Creating an instance";
33 #endif
34 }
std::vector< std::string > absorbMat
std::vector< std::string > midMat
std::vector< double > sideAbsW
std::vector< std::string > layerLabel
std::vector< double > layerD2
std::vector< std::string > layerMat
std::vector< int > layerId
std::vector< double > rmax
std::vector< double > layerT1
std::vector< double > detdP2
std::vector< double > detWidth2
std::vector< std::string > sideAbsName
std::vector< double > detdP1
std::vector< double > absorbT
std::vector< double > detWidth1
std::vector< double > layerGap
std::vector< double > layerAlpha
std::vector< double > detT22
std::vector< int > layerAbsorb
std::vector< std::string > sideAbsMat
std::vector< double > sideT
std::vector< double > detTsc
std::vector< std::string > midName
std::vector< std::string > sideMat
std::vector< double > detT21
std::vector< int > detPosY
std::vector< int > detType
std::vector< double > zoff
std::vector< double > sideD
std::vector< double > detT11
std::vector< double > absorbD
std::vector< double > ttheta
std::vector< double > theta
std::vector< double > layerWidth
std::vector< std::string > absorbName
std::vector< double > midW
std::vector< double > layerD1
std::vector< double > detT12
std::vector< double > midT
std::vector< double > layerT2
DDHCalBarrelAlgo::~DDHCalBarrelAlgo ( )
override

Definition at line 36 of file DDHCalBarrelAlgo.cc.

36 {}

Member Function Documentation

void DDHCalBarrelAlgo::constructGeneralVolume ( DDCompactView cpv)
protected

Definition at line 218 of file DDHCalBarrelAlgo.cc.

References alpha, constructInsideSector(), geant_units::operators::convertRadToDeg(), DDrot(), DDSplit(), plotBeamSpotDB::first, formatAsDegreesInInteger(), getGenMaterial(), getNhalf(), getNsectors(), getNsectortot(), getRin(), getRmax(), getRout(), getTanTheta(), getZoff(), mps_fire::i, idName, idNameSpace, cuy::ii, dataset::name, DDBase< N, C >::name(), class-composition::parent, phi, DDSolidFactory::polyhedra(), DDCompactView::position(), rin, makeMuonMisalignmentScenario::rot, idealTransformation::rotation, rotHalf, rotns, rout, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, and theta.

Referenced by execute(), and getDetPosY().

218  {
219 
220 #ifdef EDM_ML_DEBUG
221  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: General volume...";
222 #endif
223 
225 
226  double alpha = (1._pi)/getNsectors();
227  double dphi = getNsectortot()*(2._pi)/getNsectors();
228  int nsec, ntot=15;
229  if (getNhalf() == 1)
230  nsec = 8;
231  else
232  nsec = 15;
233  int nf = ntot - nsec;
234 
235  //Calculate zmin... see HCalBarrel.hh picture. For polyhedra
236  //Rmin and Rmax are distances to vertex
237  double zmax = getZoff(3);
238  double zstep5 = getZoff(4);
239  double zstep4 =(getZoff(1) + getRmax(1)*getTanTheta(1));
240  if ((getZoff(2)+getRmax(1)*getTanTheta(2)) > zstep4)
241  zstep4 = (getZoff(2)+getRmax(1)*getTanTheta(2));
242  double zstep3 =(getZoff(1) + getRmax(0)*getTanTheta(1));
243  double zstep2 =(getZoff(0) + getRmax(0)*getTanTheta(0));
244  double zstep1 =(getZoff(0) + getRin() *getTanTheta(0));
245  double rout = getRout();
246  double rout1 = getRmax(3);
247  double rin = getRin();
248  double rmid1 = getRmax(0);
249  double rmid2 = getRmax(1);
250  double rmid3 =(getZoff(4) - getZoff(2))/getTanTheta(2);
251  double rmid4 = getRmax(2);
252 
253  std::vector<double> pgonZ = {-zmax, -zstep5,-zstep5,-zstep4,-zstep3,
254  -zstep2,-zstep1, 0, zstep1, zstep2,
255  zstep3, zstep4, zstep5, zstep5, zmax};
256 
257  std::vector<double> pgonRmin = {rmid4,rmid3,rmid3,rmid2,rmid1,
258  rmid1, rin, rin, rin,rmid1,
259  rmid1,rmid2,rmid3,rmid3,rmid4};
260 
261  std::vector<double> pgonRmax = {rout1,rout1,rout, rout, rout, rout,
262  rout, rout, rout, rout, rout, rout,
263  rout, rout1,rout1};
264 
265  std::vector<double> pgonZHalf = {0, zstep1,zstep2,zstep3,zstep4,zstep5,
266  zstep5,zmax};
267 
268  std::vector<double> pgonRminHalf = {rin, rin,rmid1,rmid1,rmid2,rmid3,
269  rmid3,rmid4};
270 
271  std::vector<double> pgonRmaxHalf = {rout, rout, rout, rout, rout, rout,
272  rout1,rout1};
273 
274  std::string name("Null");
275  DDSolid solid;
276  if (nf == 0) {
278  getNsectortot(), -alpha, dphi, pgonZ,
279  pgonRmin, pgonRmax);
280 #ifdef EDM_ML_DEBUG
281  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
283  << " Polyhedra made of " << getGenMaterial()
284  << " with " << getNsectortot()
285  << " sectors from " << convertRadToDeg(-alpha)
286  << " to " << convertRadToDeg(-alpha+dphi)
287  << " and with " << nsec << " sections ";
288  for (unsigned int i = 0; i <pgonZ.size(); i++)
289  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZ[i]
290  << "\tRmin = " << pgonRmin[i] << "\tRmax = "
291  << pgonRmax[i];
292 #endif
293  } else {
295  getNsectortot(), -alpha, dphi, pgonZHalf,
296  pgonRminHalf, pgonRmaxHalf);
297 #ifdef EDM_ML_DEBUG
298  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
300  << " Polyhedra made of " << getGenMaterial()
301  << " with " << getNsectortot()
302  << " sectors from " << convertRadToDeg(-alpha)
303  << " to " << convertRadToDeg(-alpha+dphi)
304  << " and with " << nsec << " sections ";
305  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
306  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
307  << "\tRmin = " << pgonRminHalf[i]
308  << "\tRmax = " << pgonRmaxHalf[i];
309 #endif
310  }
311 
312 
314  DDMaterial matter(matname);
315  DDLogicalPart genlogic(DDName(idName, idNameSpace), matter, solid);
316 
317  DDName parentName = parent().name();
318  DDTranslation r0(0,0,0);
319  cpv.position(DDName(idName, idNameSpace), parentName, 1, r0, rot);
320 #ifdef EDM_ML_DEBUG
321  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
323  << " number 1 positioned in " << parentName
324  << " at " << r0 << " with " << rot;
325 #endif
326  //Forward and backwards halfs
327  name = idName + "Half";
328  nf = (ntot+1)/2;
329 #ifdef EDM_ML_DEBUG
330  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
332  << " Polyhedra made of " << getGenMaterial()
333  << " with " << getNsectortot()
334  << " sectors from " << convertRadToDeg(-alpha)
335  << " to " << convertRadToDeg(-alpha+dphi)
336  << " and with " << nf << " sections ";
337  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
338  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
339  << "\tRmin = " << pgonRminHalf[i]
340  << "\tRmax = " << pgonRmaxHalf[i];
341 #endif
342 
344  getNsectortot(), -alpha, dphi, pgonZHalf,
345  pgonRminHalf, pgonRmaxHalf);
346  DDLogicalPart genlogich(DDName(name, idNameSpace), matter, solid);
347 
348  cpv.position(genlogich, genlogic, 1, r0, rot);
349 #ifdef EDM_ML_DEBUG
350  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << genlogich.name()
351  << " number 1 positioned in " << genlogic.name()
352  << " at " << r0 << " with " << rot;
353 #endif
354  if (getNhalf() != 1) {
355  rot = DDRotation(DDName(rotHalf, rotns));
356  cpv.position(genlogich, genlogic, 2, r0, rot);
357 #ifdef EDM_ML_DEBUG
358  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << genlogich.name()
359  << " number 2 positioned in "
360  << genlogic.name() << " at " << r0
361  << " with " << rot;
362 #endif
363  } //end if (getNhalf...
364 
365  //Construct sector (from -alpha to +alpha)
366  name = idName + "Module";
367 #ifdef EDM_ML_DEBUG
368  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
370  << " Polyhedra made of " << getGenMaterial()
371  << " with 1 sector from "
372  << convertRadToDeg(-alpha) << " to "
373  << convertRadToDeg(alpha) << " and with "
374  << nf <<" sections";
375  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
376  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
377  << "\tRmin = " << pgonRminHalf[i]
378  << "\tRmax = " << pgonRmaxHalf[i];
379 #endif
380 
382  1, -alpha, 2*alpha, pgonZHalf,
383  pgonRminHalf, pgonRmaxHalf);
384  DDLogicalPart seclogic(DDName(name, idNameSpace), matter, solid);
385 
386  double theta = 90._deg;
387  for (int ii=0; ii<getNsectortot(); ii++) {
388  double phi = ii*2*alpha;
389  double phiy = phi + 90._deg;
390 
392  std::string rotstr("NULL");
393  if (phi != 0) {
394  rotstr = "R" + formatAsDegreesInInteger(phi);
395  rotation = DDRotation(DDName(rotstr, rotns));
396  if (!rotation) {
397 #ifdef EDM_ML_DEBUG
398  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Creating a new "
399  << "rotation " << rotstr << "\t 90,"
400  << convertRadToDeg(phi) << ",90,"
401  << (90+convertRadToDeg(phi)) << ", 0, 0";
402 #endif
403  rotation = DDrot(DDName(rotstr, rotns), theta, phi, theta, phiy, 0, 0);
404  } //if !rotation
405  } //if phideg!=0
406 
407  cpv.position(seclogic, genlogich, ii+1, r0, rotation);
408 #ifdef EDM_ML_DEBUG
409  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << seclogic.name()
410  << " number " << ii+1 << " positioned in "
411  << genlogich.name() << " at " << r0
412  << " with " << rotation;
413 #endif
414  }
415 
416  //Construct the things inside the sector
417  constructInsideSector(seclogic, cpv);
418 }
int getNsectortot() const
float alpha
Definition: AMPTWrapper.h:95
double getRin() const
std::string getGenMaterial() const
int getNhalf() const
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
std::string formatAsDegreesInInteger(double radianVal)
Definition: DDTypes.cc:86
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
void constructInsideSector(const DDLogicalPart &sector, DDCompactView &cpv)
double getRout() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
U second(std::pair< T, U > const &p)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:80
int getNsectors() const
ii
Definition: cuy.py:590
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
std::vector< double > theta
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:730
void DDHCalBarrelAlgo::constructInsideDetectors ( const DDLogicalPart detector,
const std::string &  name,
int  id,
double  dx,
double  dy,
double  dz,
int  type,
DDCompactView cpv 
)
protected

Definition at line 922 of file DDHCalBarrelAlgo.cc.

References DDSolidFactory::box(), DDBase< N, C >::ddname(), DDSplit(), PVValHelper::dx, PVValHelper::dz, plotBeamSpotDB::first, getDetdP1(), getDetdP2(), getDetMatPl(), getDetMatSc(), getDetPosY(), getDetT11(), getDetT12(), getDetT21(), getDetT22(), getDetTsc(), getDetType(), getDetWidth1(), getDetWidth2(), idName, idNameSpace, DDName::name(), dataset::name, DDBase< N, C >::name(), DDCompactView::position(), edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, x, and y.

Referenced by constructInsideLayers(), and getDetPosY().

926  {
927 
928 #ifdef EDM_ML_DEBUG
929  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: \t\tInside detector "
930  << id << "...";
931 #endif
932 
934  DDMaterial plmatter(plmatname);
936  DDMaterial scmatter(scmatname);
937 
938  std::string plname = detector.name().name()+"Plastic_";
939  std::string scname = idName+"Scintillator"+name;
940 
941  id--;
942  DDSolid solid;
943  DDLogicalPart glog;
944  double wid, y=0;
945  double dx1, dx2, shiftX;
946 
947  if (type == 1) {
948  wid = 0.5*getDetWidth1(id);
949  if (getDetPosY(id)>0) y =-dy+wid;
950  dx1 = 0.5*getDetT11(id);
951  dx2 = 0.5*getDetT21(id);
952  shiftX = getDetdP1(id);
953  } else {
954  wid = 0.5*getDetWidth2(id);
955  dx1 = 0.5*getDetT12(id);
956  dx2 = 0.5*getDetT22(id);
957  shiftX = getDetdP2(id);
958  }
959 
960  solid = DDSolidFactory::box(DDName(plname+"1", idNameSpace), dx1, wid, dz);
961 #ifdef EDM_ML_DEBUG
962  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
963  << " Box made of " << getDetMatPl()
964  << " of dimensions " << dx1 <<", " << wid
965  << ", " << dz;
966 #endif
967  glog = DDLogicalPart(solid.ddname(), plmatter, solid);
968 
969  double x = shiftX + dx1 - dx;
970  cpv.position(glog, detector, 1, DDTranslation(x,y,0), DDRotation());
971 #ifdef EDM_ML_DEBUG
972  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
973  << " Number 1 positioned in " << detector.name()
974  << " at (" << x << "," << y
975  << ",0) with no rotation";
976 #endif
977  solid = DDSolidFactory::box(DDName(scname, idNameSpace),
978  0.5*getDetTsc(id), wid, dz);
979 #ifdef EDM_ML_DEBUG
980  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
981  << " Box made of " << getDetMatSc()
982  << " of dimensions " << 0.5*getDetTsc(id)
983  << ", " << wid << ", " << dz;
984 #endif
985  glog = DDLogicalPart(solid.ddname(), scmatter, solid);
986 
987  x += dx1 + 0.5*getDetTsc(id);
988  int copyNo = id*10 + getDetType(id);
989  cpv.position(glog, detector, copyNo, DDTranslation(x, y, 0), DDRotation());
990 #ifdef EDM_ML_DEBUG
991  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
992  << " Number " << copyNo << " positioned in "
993  << detector.name() << " at (" << x << "," << y
994  << ",0) with no rotation";
995 #endif
996  solid = DDSolidFactory::box(DDName(plname+"2", idNameSpace), dx2, wid, dz);
997 #ifdef EDM_ML_DEBUG
998  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
999  << " Box made of " << getDetMatPl()
1000  << " of dimensions " << dx2 <<", " << wid
1001  << ", " << dz;
1002 #endif
1003  glog = DDLogicalPart(solid.ddname(), plmatter, solid);
1004 
1005  x+=0.5*getDetTsc(id) + dx2;
1006  cpv.position(glog, detector, 1, DDTranslation(x, y, 0), DDRotation());
1007 #ifdef EDM_ML_DEBUG
1008  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
1009  << " Number 1 positioned in " << detector.name()
1010  << " at (" << x << "," << y
1011  << ",0) with no rotation";
1012 #endif
1013 }
type
Definition: HCALResponse.h:21
const N & name() const
Definition: DDBase.h:74
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
int getDetPosY(unsigned int i) const
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
std::string getDetMatPl() const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
std::string getDetMatSc() const
U second(std::pair< T, U > const &p)
double getDetT22(unsigned int i) const
double getDetT11(unsigned int i) const
int getDetType(unsigned int i) const
double getDetdP1(unsigned int i) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getDetTsc(unsigned int i) const
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:704
double getDetdP2(unsigned int i) const
double getDetT21(unsigned int i) const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
double getDetWidth2(unsigned int i) const
double getDetT12(unsigned int i) const
double getDetWidth1(unsigned int i) const
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
const N & ddname() const
Definition: DDBase.h:76
void DDHCalBarrelAlgo::constructInsideLayers ( const DDLogicalPart laylog,
const std::string &  name,
int  id,
int  nAbs,
double  rin,
double  d1,
double  alpha1,
double  d2,
double  alpha2,
double  t1,
double  t2,
DDCompactView cpv 
)
protected

Definition at line 547 of file DDHCalBarrelAlgo.cc.

References DDSolidFactory::box(), constructInsideDetectors(), constructMidLayer(), constructSideLayer(), DDBase< N, C >::ddname(), DDSplit(), detRot, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, plotBeamSpotDB::first, getDetMat(), getRmax(), getRzones(), getTanTheta(), getZoff(), mps_fire::i, idName, idNameSpace, idOffset, recoMuon::in, dataset::name, DDBase< N, C >::name(), DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotns, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), x, and y.

Referenced by constructInsideSector(), and getDetPosY().

552  {
553 
554 #ifdef EDM_ML_DEBUG
555  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: \t\tInside layer " << id
556  << "...";
557 #endif
558  //Pointers to the Rotation Matrices and to the Materials
561 
562  std::string nam0 = nm + "In";
563  std::string name = idName + nam0;
565  DDMaterial matter (matName);
566 
567  DDSolid solid;
568  DDLogicalPart glog, mother;
569  double rsi, dx, dy, dz, x, y;
570  int i, in;
571  //Two lower volumes
572  if (alpha1 > 0) {
573  rsi = rin + d1;
574  in = 0;
575  for (i = 0; i < getRzones()-1; i++) {
576  if (rsi >= getRmax(i)) in = i+1;
577  }
578  dx = 0.5*t1;
579  dy = 0.5*rsi*(tan(alpha1)-tan(alpha2));
580  dz = 0.5*(getZoff(in) + rsi*getTanTheta(in));
581  x = rsi + dx;
582  y = 0.5*rsi*(tan(alpha1)+tan(alpha2));
583  DDTranslation r11(x, y, dz);
584  DDTranslation r12(x, -y, dz);
585 
586  solid = DDSolidFactory::box(DDName(name+"1", idNameSpace), dx, dy, dz);
587 #ifdef EDM_ML_DEBUG
588  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
589  <<" Box made of " << getDetMat()
590  << " of dimensions " << dx << ", " << dy
591  << ", " << dz;
592 #endif
593  glog = DDLogicalPart(solid.ddname(), matter, solid);
594 
595  if (nAbs != 0) {
596  mother = constructSideLayer(laylog, name, nAbs, rin, alpha1, cpv);
597  } else {
598  mother = laylog;
599  }
600  cpv.position(glog, mother, idOffset+1, r11, DDRotation());
601  cpv.position(glog, mother, idOffset+2, r12, rot);
602 #ifdef EDM_ML_DEBUG
603  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
604  << " Number " << idOffset+1
605  << " positioned in " << mother.name()
606  << " at " << r11 << " with no rotation\n"
607  << "DDHCalBarrelAlgo: " << glog.name()
608  << " Number " << idOffset+2
609  << " positioned in " << mother.name()
610  << " at " << r12 << " with " << rot;
611 #endif
612  //Constructin the plastics and scintillators inside
613  constructInsideDetectors(glog, nam0+"1", id, dx, dy, dz, 1, cpv);
614  }
615 
616  //Upper volume
617  rsi = rin + d2;
618  in = 0;
619  for (i = 0; i < getRzones()-1; i++) {
620  if (rsi >= getRmax(i)) in = i+1;
621  }
622  dx = 0.5*t2;
623  dy = 0.5*rsi*tan(alpha2);
624  dz = 0.5*(getZoff(in) + rsi*getTanTheta(in));
625  x = rsi + dx;
626  DDTranslation r21(x, dy, dz);
627  DDTranslation r22(x, -dy, dz);
628 
629  solid = DDSolidFactory::box(DDName(name+"2", idNameSpace), dx, dy, dz);
630 #ifdef EDM_ML_DEBUG
631  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
632  << " Box made of " << getDetMat()
633  << " of dimensions " << dx << ", " << dy
634  << ", " << dz;
635 #endif
636  glog = DDLogicalPart(solid.ddname(), matter, solid);
637 
638  if (nAbs < 0) {
639  mother = constructMidLayer(laylog, name, rin, alpha1, cpv);
640  } else {
641  mother = laylog;
642  }
643  cpv.position(glog, mother, idOffset+3, r21, DDRotation());
644  cpv.position(glog, mother, idOffset+4, r22, rot);
645 #ifdef EDM_ML_DEBUG
646  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
647  << " Number " << idOffset+3 << " positioned in "
648  << mother.name() << " at " << r21
649  << " with no rotation\nDDHCalBarrelAlgo: "
650  << glog.name() << " Number " << idOffset+4
651  << " positioned in " << mother.name() << " at "
652  << r22 << " with " << rot;
653 #endif
654  //Constructin the plastics and scintillators inside
655  constructInsideDetectors(glog, nam0+"2", id, dx, dy, dz, 2, cpv);
656 }
const N & name() const
Definition: DDBase.h:74
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
int getRzones() const
void constructInsideDetectors(const DDLogicalPart &detector, const std::string &name, int id, double dx, double dy, double dz, int type, DDCompactView &cpv)
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
std::string getDetMat() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
U second(std::pair< T, U > const &p)
DDLogicalPart constructSideLayer(const DDLogicalPart &laylog, const std::string &nm, int nAbs, double rin, double alpha, DDCompactView &cpv)
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:704
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
DDLogicalPart constructMidLayer(const DDLogicalPart &laylog, const std::string &nm, double rin, double alpha, DDCompactView &cpv)
const N & ddname() const
Definition: DDBase.h:76
void DDHCalBarrelAlgo::constructInsideSector ( const DDLogicalPart sector,
DDCompactView cpv 
)
protected

!!!!!!!!!!!!!!!!Should be zero. And removed as soon as

Definition at line 421 of file DDHCalBarrelAlgo.cc.

References alpha, constructInsideLayers(), geant_units::operators::convertRadToDeg(), DDSplit(), MillePedeFileConverter_cfg::e, plotBeamSpotDB::first, getLayerAbsorb(), getLayerAlpha(), getLayerD1(), getLayerD2(), getLayerGap(), getLayerId(), getLayerLabel(), getLayerMaterial(), getLayerT1(), getLayerT2(), getLayerWidth(), getNLayers(), getNsectors(), getRin(), getRmax(), getRzones(), getTanTheta(), getZoff(), mps_fire::i, idName, idNameSpace, recoMuon::in, gen::k, dataset::name, DDBase< N, C >::name(), MillePedeFileConverter_cfg::out, DDSolidFactory::polyhedra(), DDCompactView::position(), rin, rout, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, funct::tan(), and ApeEstimator_cff::width.

Referenced by constructGeneralVolume(), and getDetPosY().

421  {
422 
423 #ifdef EDM_ML_DEBUG
424  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Layers (" << getNLayers()
425  << ") ...";
426 #endif
427  double alpha = (1._pi)/getNsectors();
428  double rin = getRin();
429  for (int i = 0; i < getNLayers(); i++) {
432  DDSplit(getLayerMaterial(i)).second); //idNameSpace);
433  DDMaterial matter(matname);
434 
435  double width = getLayerWidth(i);
436  double rout = rin + width;
437 
438  int in = 0, out = 0;
439  for (int j = 0; j < getRzones()-1; j++) {
440  if (rin >= getRmax(j)) in = j+1;
441  if (rout> getRmax(j)) out= j+1;
442  }
443  double zout = getZoff(in) + rin*getTanTheta(in);
444 
446  //vertical walls are allowed in SolidPolyhedra
447  double deltaz = 0;
448  int nsec=2;
449  std::vector<double> pgonZ, pgonRmin, pgonRmax;
450  // index 0
451  pgonZ.emplace_back(0);
452  pgonRmin.emplace_back(rin);
453  pgonRmax.emplace_back(rout);
454  // index 1
455  pgonZ.emplace_back(zout);
456  pgonRmin.emplace_back(rin);
457  pgonRmax.emplace_back(rout);
458  if (in == out) {
459  if (in <= 3) {
460  //index 2
461  pgonZ.emplace_back(getZoff(in) + rout*getTanTheta(in));
462  pgonRmin.emplace_back(pgonRmax[1]);
463  pgonRmax.emplace_back(pgonRmax[1]);
464  nsec++;
465  }
466  } else {
467  if (in == 3) {
468  //redo index 1, add index 2
469  pgonZ[1] =(getZoff(out) + getRmax(out)*getTanTheta(out));
470  pgonZ.emplace_back(pgonZ[1] + deltaz);
471  pgonRmin.emplace_back(pgonRmin[1]);
472  pgonRmax.emplace_back(getRmax(in));
473  //index 3
474  pgonZ.emplace_back(getZoff(in) + getRmax(in)*getTanTheta(in));
475  pgonRmin.emplace_back(pgonRmin[2]);
476  pgonRmax.emplace_back(pgonRmax[2]);
477  nsec += 2;
478  } else {
479  //index 2
480  pgonZ.emplace_back(getZoff(in) + getRmax(in)*getTanTheta(in));
481  pgonRmin.emplace_back(getRmax(in));
482  pgonRmax.emplace_back(pgonRmax[1]);
483  nsec++;
484  if (in == 0) {
485  pgonZ.emplace_back(getZoff(out) + getRmax(in)*getTanTheta(out));
486  pgonRmin.emplace_back(pgonRmin[2]);
487  pgonRmax.emplace_back(pgonRmax[2]);
488  nsec++;
489  }
490  if (in <= 1) {
491  pgonZ.emplace_back(getZoff(out) + rout*getTanTheta(out));
492  pgonRmin.emplace_back(rout);
493  pgonRmax.emplace_back(rout);
494  nsec++;
495  }
496  }
497  }
498  //Solid & volume
499  DDSolid solid;
500  double alpha1 = alpha;
501  if (getLayerGap(i)>1.e-6) {
502  double rmid = 0.5*(rin+rout);
503  double width = rmid*tan(alpha) - getLayerGap(i);
504  alpha1 = atan(width/rmid);
505 #ifdef EDM_ML_DEBUG
506  edm::LogVerbatim("HCalGeom") << "\t" << "Alpha_1 modified from "
507  << convertRadToDeg(alpha) << " to "
508  << convertRadToDeg(alpha1)
509  << " Rmid " << rmid << " Reduced width "
510  << width;
511 #endif
512  }
513 #ifdef EDM_ML_DEBUG
514  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << name << " (Layer "
515  << i << ") Polyhedra made of "
516  << getLayerMaterial(i)
517  << " with 1 sector from "
518  << convertRadToDeg(-alpha1) << " to "
519  << convertRadToDeg(alpha1) << " and with "
520  << nsec << " sections";
521  for (unsigned int k=0; k<pgonZ.size(); k++)
522  edm::LogVerbatim("HCalGeom") << "\t" << "\t" << pgonZ[k] << "\t"
523  << pgonRmin[k] << "\t" << pgonRmax[k];
524 #endif
526  1, -alpha1, 2*alpha1,
527  pgonZ, pgonRmin, pgonRmax);
528  DDLogicalPart glog(DDName(name, idNameSpace), matter, solid);
529 
530  cpv.position(glog, sector, getLayerId(i), DDTranslation(0.0, 0.0, 0.0),
531  DDRotation());
532 #ifdef EDM_ML_DEBUG
533  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
534  << " number " << getLayerId(i)
535  << " positioned in " << sector.name()
536  << " at (0,0,0) with no rotation";
537 #endif
539  getLayerAbsorb(i), rin, getLayerD1(i), alpha1,
541  getLayerT2(i), cpv);
542  rin = rout;
543  }
544 
545 }
float alpha
Definition: AMPTWrapper.h:95
std::string getLayerLabel(unsigned i) const
double getRin() const
const N & name() const
Definition: DDBase.h:74
double getLayerD1(unsigned i) const
std::string getLayerMaterial(unsigned i) const
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
double getLayerD2(unsigned i) const
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
double getLayerAlpha(unsigned i) const
int getRzones() const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
U second(std::pair< T, U > const &p)
double getLayerGap(unsigned int i) const
int getNLayers() const
int getLayerAbsorb(unsigned int i) const
double getLayerT2(unsigned i) const
double getLayerT1(unsigned i) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void constructInsideLayers(const DDLogicalPart &laylog, const std::string &name, int id, int nAbs, double rin, double d1, double alpha1, double d2, double alpha2, double t1, double t2, DDCompactView &cpv)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
int getNsectors() const
int getLayerId(unsigned i) const
int k[5][pyjets_maxn]
double getLayerWidth(unsigned i) const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:730
DDLogicalPart DDHCalBarrelAlgo::constructMidLayer ( const DDLogicalPart laylog,
const std::string &  nm,
double  rin,
double  alpha,
DDCompactView cpv 
)
protected

Definition at line 753 of file DDHCalBarrelAlgo.cc.

References geant_units::operators::convertRadToDeg(), DDBase< N, C >::ddname(), DDSplit(), plotBeamSpotDB::first, getAbsorbD(), getAbsorberN(), getAbsorbMat(), getAbsorbName(), getAbsorbT(), getMidAbsMat(), getMidAbsName(), getMidAbsorber(), getMidAbsT(), getMidAbsW(), getMiddleD(), getMiddleMat(), getMiddleW(), getRmax(), getRzones(), getTanTheta(), getZoff(), mps_fire::i, idNameSpace, cuy::ii, recoMuon::in, gen::k, cmsBatch::log, dataset::name, DDBase< N, C >::name(), DDSolidFactory::polyhedra(), DDCompactView::position(), rmax, edm::second(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by constructInsideLayers(), and getDetPosY().

756  {
757 
758  DDSolid solid;
759  DDLogicalPart log, glog;
760  std::string name = nm + "Mid";
761  for (int k=0; k < getAbsorberN(); k++) {
762  std::string namek = name + getAbsorbName(k);
763  double rsi = rin + getAbsorbD(k);
764  int in = 0;
765  for (int i = 0; i < getRzones()-1; i++) {
766  if (rsi >= getRmax(i)) in = i+1;
767  }
768  std::vector<double> pgonZ, pgonRmin, pgonRmax;
769  // index 0
770  pgonZ.emplace_back(0.0);
771  pgonRmin.emplace_back(rsi);
772  pgonRmax.emplace_back(rsi+getAbsorbT(k));
773  // index 1
774  pgonZ.emplace_back(getZoff(in) + rsi*getTanTheta(in));
775  pgonRmin.emplace_back(rsi);
776  pgonRmax.emplace_back(pgonRmax[0]);
777  // index 2
778  pgonZ.emplace_back(getZoff(in) + pgonRmax[0]*getTanTheta(in));
779  pgonRmin.emplace_back(pgonRmax[1]);
780  pgonRmax.emplace_back(pgonRmax[1]);
781  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1, -alpha,
782  2*alpha, pgonZ, pgonRmin, pgonRmax);
783 #ifdef EDM_ML_DEBUG
784  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
785  << " Polyhedra made of " << getAbsorbMat(k)
786  << " with 1 sector from "
787  << convertRadToDeg(-alpha) << " to "
788  << convertRadToDeg(alpha) << " and with "
789  << pgonZ.size() << " sections";
790  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
791  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
792  << pgonRmin[ii] << "\tRmax = "
793  << pgonRmax[ii];
794 #endif
795 
797  DDMaterial matter(matName);
798  log = DDLogicalPart(solid.ddname(), matter, solid);
799 
800  cpv.position(log, laylog, 1, DDTranslation(), DDRotation());
801 #ifdef EDM_ML_DEBUG
802  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
803  << " Number 1 positioned in " << laylog.name()
804  << " at (0,0,0) with no rotation";
805 #endif
806  if (k==0) {
807  double rmin = pgonRmin[0];
808  double rmax = pgonRmax[0];
809  DDLogicalPart mother = log;
810  for (int i=0; i<1; i++) {
811  double alpha1 = atan(getMidAbsW(i)/rmin);
812  std::string namek = name + getMidAbsName(i);
813  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1,
814  -alpha1, 2*alpha1, pgonZ, pgonRmin,
815  pgonRmax);
816 #ifdef EDM_ML_DEBUG
817  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
818  << " Polyhedra made of " <<getMidAbsMat(i)
819  << " with 1 sector from "
820  << convertRadToDeg(-alpha1) << " to "
821  << convertRadToDeg(alpha1) << " and with "
822  << pgonZ.size() << " sections";
823  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
824  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
825  << "\tRmin = " << pgonRmin[ii]
826  << "\tRmax = " << pgonRmax[ii];
827 #endif
828 
829  DDName matNam1(DDSplit(getMidAbsMat(i)).first,
831  DDMaterial matter1(matNam1);
832  log = DDLogicalPart(solid.ddname(), matter1, solid);
833 
834  cpv.position(log, mother, 1, DDTranslation(), DDRotation());
835 #ifdef EDM_ML_DEBUG
836  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
837  << " Number 1 positioned in "
838  << mother.name()
839  << " at (0,0,0) with no rotation";
840 #endif
841  mother = log;
842  }
843 
844  // Now the layer with detectors
845  double rmid = rmin + getMiddleD();
846  pgonRmin[0] = rmid; pgonRmax[0] = rmax;
847  pgonRmin[1] = rmid; pgonRmax[1] = rmax; pgonZ[1] = getZoff(in) + rmid*getTanTheta(in);
848  pgonRmin[2] = rmax; pgonRmax[2] = rmax; pgonZ[2] = getZoff(in) + rmax*getTanTheta(in);
849  double alpha1 = atan(getMiddleW()/rmin);
850  solid = DDSolidFactory::polyhedra(DDName(name, idNameSpace), 1,
851  -alpha1, 2*alpha1, pgonZ, pgonRmin,
852  pgonRmax);
853 #ifdef EDM_ML_DEBUG
854  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
855  << " Polyhedra made of " << getMiddleMat()
856  << " with 1 sector from "
857  << convertRadToDeg(-alpha1) << " to "
858  << convertRadToDeg(alpha1) << " and with "
859  << pgonZ.size() << " sections";
860  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
861  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
862  << pgonRmin[ii] << "\tRmax = "
863  << pgonRmax[ii];
864 #endif
865 
866  DDName matNam1(DDSplit(getMiddleMat()).first,
868  DDMaterial matter1(matNam1);
869  glog = DDLogicalPart(solid.ddname(), matter1, solid);
870 
871  cpv.position(glog, mother, 1, DDTranslation(), DDRotation());
872 #ifdef EDM_ML_DEBUG
873  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
874  << " Number 1 positioned in "
875  << mother.name()
876  << " at (0,0,0) with no rotation";
877 #endif
878  // Now the remaining absorber layers
879  for (int i = 1; i < getMidAbsorber(); i++) {
880  namek = name + getMidAbsName(i);
881  rmid = rmin + getMidAbsT(i);
882  pgonRmin[0] = rmin; pgonRmax[0] = rmid;
883  pgonRmin[1] = rmin; pgonRmax[1] = rmid; pgonZ[1] = getZoff(in) + rmin*getTanTheta(in);
884  pgonRmin[2] = rmid; pgonRmax[2] = rmid; pgonZ[2] = getZoff(in) + rmid*getTanTheta(in);
885  alpha1 = atan(getMidAbsW(i)/rmin);
886  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1,
887  -alpha1, 2*alpha1, pgonZ, pgonRmin,
888  pgonRmax);
889 #ifdef EDM_ML_DEBUG
890  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
891  << " Polyhedra made of "
892  << getMidAbsMat(i)
893  << " with 1 sector from "
894  << convertRadToDeg(-alpha1) << " to "
895  << convertRadToDeg(alpha1) << " and with "
896  << pgonZ.size() << " sections";
897  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
898  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
899  << "\tRmin = " << pgonRmin[ii]
900  << "\tRmax = " << pgonRmax[ii];
901 #endif
902 
903  DDName matName2(DDSplit(getMidAbsMat(i)).first,
905  DDMaterial matter2(matName2);
906  log = DDLogicalPart(solid.ddname(), matter2, solid);
907 
908  cpv.position(log, mother, i, DDTranslation(), DDRotation());
909 #ifdef EDM_ML_DEBUG
910  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
911  << " Number " << i << " positioned in "
912  << mother.name() << " at (0,0,0) with no "
913  << "rotation";
914 #endif
915  mother = log;
916  }
917  }
918  }
919  return glog;
920 }
float alpha
Definition: AMPTWrapper.h:95
const N & name() const
Definition: DDBase.h:74
double getAbsorbT(unsigned int i) const
std::string getMidAbsName(unsigned int i) const
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
std::string getAbsorbMat(unsigned int i) const
std::vector< double > rmax
int getRzones() const
double getMidAbsT(unsigned int i) const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
U second(std::pair< T, U > const &p)
int getAbsorberN() const
double getMidAbsW(unsigned int i) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
std::string getAbsorbName(unsigned int i) const
double getMiddleW() const
ii
Definition: cuy.py:590
int k[5][pyjets_maxn]
double getAbsorbD(unsigned int i) const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
double getMiddleD() const
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
int getMidAbsorber() const
std::string getMiddleMat() const
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:730
std::string getMidAbsMat(unsigned int i) const
const N & ddname() const
Definition: DDBase.h:76
DDLogicalPart DDHCalBarrelAlgo::constructSideLayer ( const DDLogicalPart laylog,
const std::string &  nm,
int  nAbs,
double  rin,
double  alpha,
DDCompactView cpv 
)
protected

Definition at line 658 of file DDHCalBarrelAlgo.cc.

References funct::abs(), geant_units::operators::convertRadToDeg(), DDBase< N, C >::ddname(), DDSplit(), plotBeamSpotDB::first, getRmax(), getRzones(), getSideAbsMat(), getSideAbsName(), getSideAbsorber(), getSideAbsW(), getSideD(), getSideMat(), getSideT(), getTanTheta(), getZoff(), mps_fire::i, idNameSpace, cuy::ii, recoMuon::in, gen::k, cmsBatch::log, dataset::name, DDBase< N, C >::name(), DDSolidFactory::polyhedra(), DDCompactView::position(), edm::second(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by constructInsideLayers(), and getDetPosY().

662  {
663 
664  //Extra absorber layer
665  int k = abs(nAbs) - 1;
666  std::string namek = nm + "Side";
667  double rsi = rin + getSideD(k);
668  int in = 0;
669  for (int i = 0; i < getRzones()-1; i++) {
670  if (rsi >= getRmax(i)) in = i+1;
671  }
672  std::vector<double> pgonZ, pgonRmin, pgonRmax;
673  // index 0
674  pgonZ.emplace_back(0.0);
675  pgonRmin.emplace_back(rsi);
676  pgonRmax.emplace_back(rsi+getSideT(k));
677  // index 1
678  pgonZ.emplace_back(getZoff(in) + rsi*getTanTheta(in));
679  pgonRmin.emplace_back(rsi);
680  pgonRmax.emplace_back(pgonRmax[0]);
681  // index 2
682  pgonZ.emplace_back(getZoff(in) + pgonRmax[0]*getTanTheta(in));
683  pgonRmin.emplace_back(pgonRmax[1]);
684  pgonRmax.emplace_back(pgonRmax[1]);
686  -alpha, 2*alpha, pgonZ, pgonRmin,
687  pgonRmax);
688 #ifdef EDM_ML_DEBUG
689  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
690  << " Polyhedra made of " << getSideMat(k)
691  << " with 1 sector from "
692  << convertRadToDeg(-alpha) << " to "
693  << convertRadToDeg(alpha) << " and with "
694  << pgonZ.size() << " sections";
695  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
696  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
697  << pgonRmin[ii] << "\tRmax = " <<pgonRmax[ii];
698 #endif
699 
701  DDMaterial matter(matName);
702  DDLogicalPart glog = DDLogicalPart(solid.ddname(), matter, solid);
703 
704  cpv.position(glog, laylog, 1, DDTranslation(), DDRotation());
705 #ifdef EDM_ML_DEBUG
706  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
707  << " Number 1 positioned in " << laylog.name()
708  << " at (0,0,0) with no rotation";
709 #endif
710  if (nAbs < 0) {
711  DDLogicalPart mother = glog;
712  double rmid = pgonRmax[0];
713  for (int i = 0; i < getSideAbsorber(); i++) {
714  double alpha1 = atan(getSideAbsW(i)/rmid);
715  if (alpha1 > 0) {
716  std::string name = namek + getSideAbsName(i);
717  solid = DDSolidFactory::polyhedra(DDName(name, idNameSpace), 1,
718  -alpha1, 2*alpha1, pgonZ, pgonRmin,
719  pgonRmax);
720 #ifdef EDM_ML_DEBUG
721  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
722  << " Polyhedra made of "
723  << getSideAbsMat(i)
724  << " with 1 sector from "
725  << convertRadToDeg(-alpha1) << " to "
726  << convertRadToDeg(alpha1) << " and with "
727  << pgonZ.size() << " sections";
728  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
729  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
730  << "\tRmin = " << pgonRmin[ii]
731  << "\tRmax = " << pgonRmax[ii];
732 #endif
733 
734  DDName matName(DDSplit(getSideAbsMat(i)).first,
736  DDMaterial matter(matName);
737  DDLogicalPart log = DDLogicalPart(solid.ddname(), matter, solid);
738 
739  cpv.position(log, mother, 1, DDTranslation(), DDRotation());
740 #ifdef EDM_ML_DEBUG
741  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
742  << " Number 1 positioned in "
743  << mother.name()
744  << " at (0,0,0) with no rotation";
745 #endif
746  mother = log;
747  }
748  }
749  }
750  return glog;
751 }
std::string getSideAbsName(unsigned int i) const
float alpha
Definition: AMPTWrapper.h:95
const N & name() const
Definition: DDBase.h:74
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
double getSideAbsW(unsigned int i) const
std::string idNameSpace
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
int getRzones() const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
U second(std::pair< T, U > const &p)
int getSideAbsorber() const
double getSideD(unsigned int i) const
std::string getSideAbsMat(unsigned int i) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::string getSideMat(unsigned int i) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
ii
Definition: cuy.py:590
int k[5][pyjets_maxn]
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
double getSideT(unsigned int i) const
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:730
const N & ddname() const
Definition: DDBase.h:76
void DDHCalBarrelAlgo::execute ( DDCompactView cpv)
override

Definition at line 205 of file DDHCalBarrelAlgo.cc.

References constructGeneralVolume().

Referenced by getDetPosY().

205  {
206 
207 #ifdef EDM_ML_DEBUG
208  edm::LogVerbatim("HCalGeom") << "==>> Constructing DDHCalBarrelAlgo...";
209 #endif
211 #ifdef EDM_ML_DEBUG
212  edm::LogVerbatim("HCalGeom") << "<<== End of DDHCalBarrelAlgo construction";
213 #endif
214 }
void constructGeneralVolume(DDCompactView &cpv)
double DDHCalBarrelAlgo::getAbsorbD ( unsigned int  i) const
inline

Definition at line 53 of file DDHCalBarrelAlgo.h.

References absorbD, and mps_fire::i.

Referenced by constructMidLayer().

53 {return absorbD[i];}
std::vector< double > absorbD
int DDHCalBarrelAlgo::getAbsorberN ( ) const
inline

Definition at line 50 of file DDHCalBarrelAlgo.h.

References nAbsorber.

Referenced by constructMidLayer().

50 {return nAbsorber;}
std::string DDHCalBarrelAlgo::getAbsorbMat ( unsigned int  i) const
inline

Definition at line 52 of file DDHCalBarrelAlgo.h.

References absorbMat, and mps_fire::i.

Referenced by constructMidLayer().

52 {return absorbMat[i];}
std::vector< std::string > absorbMat
std::string DDHCalBarrelAlgo::getAbsorbName ( unsigned int  i) const
inline

Definition at line 51 of file DDHCalBarrelAlgo.h.

References absorbName, and mps_fire::i.

Referenced by constructMidLayer().

51 {return absorbName[i];}
std::vector< std::string > absorbName
double DDHCalBarrelAlgo::getAbsorbT ( unsigned int  i) const
inline

Definition at line 54 of file DDHCalBarrelAlgo.h.

References absorbT, and mps_fire::i.

Referenced by constructMidLayer().

54 {return absorbT[i];}
std::vector< double > absorbT
double DDHCalBarrelAlgo::getDetdP1 ( unsigned int  i) const
inline

Definition at line 68 of file DDHCalBarrelAlgo.h.

References detdP1, and mps_fire::i.

Referenced by constructInsideDetectors().

68 {return detdP1[i];}
std::vector< double > detdP1
double DDHCalBarrelAlgo::getDetdP2 ( unsigned int  i) const
inline

Definition at line 69 of file DDHCalBarrelAlgo.h.

References detdP2, and mps_fire::i.

Referenced by constructInsideDetectors().

69 {return detdP2[i];}
std::vector< double > detdP2
std::string DDHCalBarrelAlgo::getDetMat ( ) const
inline

Definition at line 64 of file DDHCalBarrelAlgo.h.

References detMat.

Referenced by constructInsideLayers().

64 {return detMat;}
std::string DDHCalBarrelAlgo::getDetMatPl ( ) const
inline

Definition at line 65 of file DDHCalBarrelAlgo.h.

References detMatPl.

Referenced by constructInsideDetectors().

65 {return detMatPl;}
std::string detMatPl
std::string DDHCalBarrelAlgo::getDetMatSc ( ) const
inline

Definition at line 66 of file DDHCalBarrelAlgo.h.

References detMatSc.

Referenced by constructInsideDetectors().

66 {return detMatSc;}
std::string detMatSc
int DDHCalBarrelAlgo::getDetPosY ( unsigned int  i) const
inline
double DDHCalBarrelAlgo::getDetT11 ( unsigned int  i) const
inline

Definition at line 70 of file DDHCalBarrelAlgo.h.

References detT11, and mps_fire::i.

Referenced by constructInsideDetectors().

70 {return detT11[i];}
std::vector< double > detT11
double DDHCalBarrelAlgo::getDetT12 ( unsigned int  i) const
inline

Definition at line 71 of file DDHCalBarrelAlgo.h.

References detT12, and mps_fire::i.

Referenced by constructInsideDetectors().

71 {return detT12[i];}
std::vector< double > detT12
double DDHCalBarrelAlgo::getDetT21 ( unsigned int  i) const
inline

Definition at line 73 of file DDHCalBarrelAlgo.h.

References detT21, and mps_fire::i.

Referenced by constructInsideDetectors().

73 {return detT21[i];}
std::vector< double > detT21
double DDHCalBarrelAlgo::getDetT22 ( unsigned int  i) const
inline

Definition at line 74 of file DDHCalBarrelAlgo.h.

References detT22, and mps_fire::i.

Referenced by constructInsideDetectors().

74 {return detT22[i];}
std::vector< double > detT22
double DDHCalBarrelAlgo::getDetTsc ( unsigned int  i) const
inline

Definition at line 72 of file DDHCalBarrelAlgo.h.

References detTsc, and mps_fire::i.

Referenced by constructInsideDetectors().

72 {return detTsc[i];}
std::vector< double > detTsc
int DDHCalBarrelAlgo::getDetType ( unsigned int  i) const
inline

Definition at line 67 of file DDHCalBarrelAlgo.h.

References detType, and mps_fire::i.

Referenced by constructInsideDetectors().

67 {return detType[i];}
std::vector< int > detType
double DDHCalBarrelAlgo::getDetWidth1 ( unsigned int  i) const
inline

Definition at line 75 of file DDHCalBarrelAlgo.h.

References detWidth1, and mps_fire::i.

Referenced by constructInsideDetectors().

75 {return detWidth1[i];}
std::vector< double > detWidth1
double DDHCalBarrelAlgo::getDetWidth2 ( unsigned int  i) const
inline

Definition at line 76 of file DDHCalBarrelAlgo.h.

References detWidth2, and mps_fire::i.

Referenced by constructInsideDetectors().

76 {return detWidth2[i];}
std::vector< double > detWidth2
std::string DDHCalBarrelAlgo::getGenMaterial ( ) const
inline

Definition at line 17 of file DDHCalBarrelAlgo.h.

References genMaterial.

Referenced by constructGeneralVolume().

17 {return genMaterial;}
std::string genMaterial
int DDHCalBarrelAlgo::getLayerAbsorb ( unsigned int  i) const
inline

Definition at line 39 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerAbsorb.

Referenced by constructInsideSector().

39 {return layerAbsorb[i];}
std::vector< int > layerAbsorb
double DDHCalBarrelAlgo::getLayerAlpha ( unsigned  i) const
inline

Definition at line 36 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerAlpha.

Referenced by constructInsideSector().

36 {return layerAlpha[i];}
std::vector< double > layerAlpha
double DDHCalBarrelAlgo::getLayerD1 ( unsigned  i) const
inline

Definition at line 34 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerD1.

Referenced by constructInsideSector().

34 {return layerD1[i];}
std::vector< double > layerD1
double DDHCalBarrelAlgo::getLayerD2 ( unsigned  i) const
inline

Definition at line 35 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerD2.

Referenced by constructInsideSector().

35 {return layerD2[i];}
std::vector< double > layerD2
double DDHCalBarrelAlgo::getLayerGap ( unsigned int  i) const
inline

Definition at line 40 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerGap.

Referenced by constructInsideSector().

40 {return layerGap[i];}
std::vector< double > layerGap
int DDHCalBarrelAlgo::getLayerId ( unsigned  i) const
inline

Definition at line 30 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerId.

Referenced by constructInsideSector().

30 {return layerId[i];}
std::vector< int > layerId
std::string DDHCalBarrelAlgo::getLayerLabel ( unsigned  i) const
inline

Definition at line 31 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerLabel.

Referenced by constructInsideSector().

31 {return layerLabel[i];}
std::vector< std::string > layerLabel
std::string DDHCalBarrelAlgo::getLayerMaterial ( unsigned  i) const
inline

Definition at line 32 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerMat.

Referenced by constructInsideSector().

32 {return layerMat[i];}
std::vector< std::string > layerMat
double DDHCalBarrelAlgo::getLayerT1 ( unsigned  i) const
inline

Definition at line 37 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerT1.

Referenced by constructInsideSector().

37 {return layerT1[i];}
std::vector< double > layerT1
double DDHCalBarrelAlgo::getLayerT2 ( unsigned  i) const
inline

Definition at line 38 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerT2.

Referenced by constructInsideSector().

38 {return layerT2[i];}
std::vector< double > layerT2
double DDHCalBarrelAlgo::getLayerWidth ( unsigned  i) const
inline

Definition at line 33 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and layerWidth.

Referenced by constructInsideSector().

33 {return layerWidth[i];}
std::vector< double > layerWidth
std::string DDHCalBarrelAlgo::getMidAbsMat ( unsigned int  i) const
inline

Definition at line 60 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and midMat.

Referenced by constructMidLayer().

60 {return midMat[i];}
std::vector< std::string > midMat
std::string DDHCalBarrelAlgo::getMidAbsName ( unsigned int  i) const
inline

Definition at line 59 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and midName.

Referenced by constructMidLayer().

59 {return midName[i];}
std::vector< std::string > midName
int DDHCalBarrelAlgo::getMidAbsorber ( ) const
inline

Definition at line 58 of file DDHCalBarrelAlgo.h.

References nMidAbs.

Referenced by constructMidLayer().

58 {return nMidAbs;}
double DDHCalBarrelAlgo::getMidAbsT ( unsigned int  i) const
inline

Definition at line 62 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and midT.

Referenced by constructMidLayer().

62 {return midT[i];}
std::vector< double > midT
double DDHCalBarrelAlgo::getMidAbsW ( unsigned int  i) const
inline

Definition at line 61 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and midW.

Referenced by constructMidLayer().

61 {return midW[i];}
std::vector< double > midW
double DDHCalBarrelAlgo::getMiddleD ( ) const
inline

Definition at line 56 of file DDHCalBarrelAlgo.h.

References middleD.

Referenced by constructMidLayer().

56 {return middleD;}
std::string DDHCalBarrelAlgo::getMiddleMat ( ) const
inline

Definition at line 55 of file DDHCalBarrelAlgo.h.

References middleMat.

Referenced by constructMidLayer().

55 {return middleMat;}
std::string middleMat
double DDHCalBarrelAlgo::getMiddleW ( ) const
inline

Definition at line 57 of file DDHCalBarrelAlgo.h.

References middleW.

Referenced by constructMidLayer().

57 {return middleW;}
int DDHCalBarrelAlgo::getNhalf ( ) const
inline

Definition at line 20 of file DDHCalBarrelAlgo.h.

References nhalf.

Referenced by constructGeneralVolume().

20 {return nhalf;}
int DDHCalBarrelAlgo::getNLayers ( ) const
inline

Definition at line 29 of file DDHCalBarrelAlgo.h.

References nLayers.

Referenced by constructInsideSector().

29 {return nLayers;}
int DDHCalBarrelAlgo::getNsectors ( ) const
inline

Definition at line 18 of file DDHCalBarrelAlgo.h.

References nsectors.

Referenced by constructGeneralVolume(), and constructInsideSector().

18 {return nsectors;}
int DDHCalBarrelAlgo::getNsectortot ( ) const
inline

Definition at line 19 of file DDHCalBarrelAlgo.h.

References nsectortot.

Referenced by constructGeneralVolume().

19 {return nsectortot;}
double DDHCalBarrelAlgo::getRin ( ) const
inline

Definition at line 21 of file DDHCalBarrelAlgo.h.

References rin.

Referenced by constructGeneralVolume(), and constructInsideSector().

21 {return rin;}
double DDHCalBarrelAlgo::getRmax ( unsigned int  i) const
inline

Definition at line 26 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and rmax.

Referenced by constructGeneralVolume(), constructInsideLayers(), constructInsideSector(), constructMidLayer(), and constructSideLayer().

26 {return rmax[i];}
std::vector< double > rmax
double DDHCalBarrelAlgo::getRout ( ) const
inline

Definition at line 22 of file DDHCalBarrelAlgo.h.

References rout.

Referenced by constructGeneralVolume().

22 {return rout;}
int DDHCalBarrelAlgo::getRzones ( ) const
inline
std::string DDHCalBarrelAlgo::getSideAbsMat ( unsigned int  i) const
inline

Definition at line 47 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideAbsMat.

Referenced by constructSideLayer().

47 {return sideAbsMat[i];}
std::vector< std::string > sideAbsMat
std::string DDHCalBarrelAlgo::getSideAbsName ( unsigned int  i) const
inline

Definition at line 46 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideAbsName.

Referenced by constructSideLayer().

46 {return sideAbsName[i];}
std::vector< std::string > sideAbsName
int DDHCalBarrelAlgo::getSideAbsorber ( ) const
inline

Definition at line 45 of file DDHCalBarrelAlgo.h.

References nSideAbs.

Referenced by constructSideLayer().

45 {return nSideAbs;}
double DDHCalBarrelAlgo::getSideAbsW ( unsigned int  i) const
inline

Definition at line 48 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideAbsW.

Referenced by constructSideLayer().

48 {return sideAbsW[i];}
std::vector< double > sideAbsW
double DDHCalBarrelAlgo::getSideD ( unsigned int  i) const
inline

Definition at line 43 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideD.

Referenced by constructSideLayer().

43 {return sideD[i];}
std::vector< double > sideD
std::string DDHCalBarrelAlgo::getSideMat ( unsigned int  i) const
inline

Definition at line 42 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideMat.

Referenced by constructSideLayer().

42 {return sideMat[i];}
std::vector< std::string > sideMat
double DDHCalBarrelAlgo::getSideT ( unsigned int  i) const
inline

Definition at line 44 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and sideT.

Referenced by constructSideLayer().

44 {return sideT[i];}
std::vector< double > sideT
double DDHCalBarrelAlgo::getTanTheta ( unsigned int  i) const
inline
double DDHCalBarrelAlgo::getTheta ( unsigned int  i) const
inline

Definition at line 25 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and theta.

25 {return theta[i];}
std::vector< double > theta
double DDHCalBarrelAlgo::getZoff ( unsigned int  i) const
inline

Definition at line 27 of file DDHCalBarrelAlgo.h.

References mps_fire::i, and zoff.

Referenced by constructGeneralVolume(), constructInsideLayers(), constructInsideSector(), constructMidLayer(), and constructSideLayer().

27 {return zoff[i];}
std::vector< double > zoff
void DDHCalBarrelAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)
override

Definition at line 38 of file DDHCalBarrelAlgo.cc.

References absorbD, absorbMat, absorbName, absorbT, dbl_to_int(), detdP1, detdP2, detMat, detMatPl, detMatSc, detPosY, detRot, detT11, detT12, detT21, detT22, detTsc, detType, detWidth1, detWidth2, genMaterial, mps_fire::i, idName, idNameSpace, idOffset, createfilelist::int, layerAbsorb, layerAlpha, layerD1, layerD2, layerGap, layerId, layerLabel, layerMat, layerT1, layerT2, layerWidth, middleD, middleMat, middleW, midMat, midName, midT, midW, nAbsorber, nhalf, nLayers, nMidAbs, DDCurrentNamespace::ns(), nsectors, nsectortot, nSideAbs, class-composition::parent, rin, rmax, rotHalf, rotns, rout, rzones, sideAbsMat, sideAbsName, sideAbsW, sideD, sideMat, sideT, funct::tan(), theta, ttheta, and zoff.

Referenced by getDetPosY().

42  {
43 
44  genMaterial = sArgs["MaterialName"];
45  nsectors = int (nArgs["NSector"]);
46  nsectortot = int (nArgs["NSectorTot"]);
47  nhalf = int (nArgs["NHalf"]);
48  rin = nArgs["RIn"];
49  rout = nArgs["ROut"];
50  rzones = int (nArgs["RZones"]);
51  rotHalf = sArgs["RotHalf"];
52  rotns = sArgs["RotNameSpace"];
53 
54  theta = vArgs["Theta"];
55  rmax = vArgs["RMax"];
56  zoff = vArgs["ZOff"];
57  for (int i = 0; i < rzones; i++) {
58  ttheta.emplace_back(tan(theta[i])); //*deg already done in XML
59  }
60  if (rzones > 3)
61  rmax[2] = (zoff[3] - zoff[2]) / ttheta[2];
62 
63 #ifdef EDM_ML_DEBUG
64  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: General material "
65  << genMaterial << "\tSectors " << nsectors
66  << ", " << nsectortot <<"\tHalves "
67  << nhalf << "\tRotation matrix " << rotns
68  << ":" << rotHalf << "\n\t\t" << rin << "\t"
69  << rout << "\t" << rzones;
70  for (int i = 0; i < rzones; i++)
71  edm::LogVerbatim("HCalGeom") << "\tTheta[" << i << "] = " << theta[i]
72  << "\trmax[" << i << "] = " << rmax[i]
73  << "\tzoff[" << i << "] = " << zoff[i];
74 #endif
75  //Layers
77  nLayers = int(nArgs["NLayers"]);
78 #ifdef EDM_ML_DEBUG
79  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Layer\t" << nLayers;
80 #endif
81  layerId = dbl_to_int (vArgs["Id"]);
82  layerLabel = vsArgs["LayerLabel"];
83  layerMat = vsArgs["LayerMat"];
84  layerWidth = vArgs["LayerWidth"];
85  layerD1 = vArgs["D1"];
86  layerD2 = vArgs["D2"];
87  layerAlpha = vArgs["Alpha2"];
88  layerT1 = vArgs["T1"];
89  layerT2 = vArgs["T2"];
90  layerAbsorb = dbl_to_int(vArgs["AbsL"]);
91  layerGap = vArgs["Gap"];
92 #ifdef EDM_ML_DEBUG
93  for (int i = 0; i < nLayers; i++)
94  edm::LogVerbatim("HCalGeom") << layerLabel[i] << "\t" << layerId[i] << "\t"
95  << layerMat[i] << "\t" << layerWidth[i]
96  << "\t" << layerD1[i] << "\t" << layerD2[i]
97  << "\t" << layerAlpha[i] << "\t" << layerT1[i]
98  << "\t" << layerT2[i] << "\t"
99  << layerAbsorb[i] << "\t" << layerGap[i];
100 #endif
101 
103  //Absorber Layers and middle part
104  absorbName = vsArgs["AbsorbName"];
105  absorbMat = vsArgs["AbsorbMat"];
106  absorbD = vArgs["AbsorbD"];
107  absorbT = vArgs["AbsorbT"];
108  nAbsorber = absorbName.size();
109 #ifdef EDM_ML_DEBUG
110  for (int i = 0; i < nAbsorber; i++)
111  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << absorbName[i]
112  <<" Material " << absorbMat[i] << " d "
113  << absorbD[i] << " t " <<absorbT[i];
114 #endif
115  middleMat = sArgs["MiddleMat"];
116  middleD = nArgs["MiddleD"];
117  middleW = nArgs["MiddleW"];
118 #ifdef EDM_ML_DEBUG
119  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Middle material "
120  << middleMat << " d " << middleD << " w "
121  << middleW;
122 #endif
123  midName = vsArgs["MidAbsName"];
124  midMat = vsArgs["MidAbsMat"];
125  midW = vArgs["MidAbsW"];
126  midT = vArgs["MidAbsT"];
127  nMidAbs = midName.size();
128 #ifdef EDM_ML_DEBUG
129  for (int i = 0; i < nMidAbs; i++)
130  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << midName[i]
131  << " Material " << midMat[i] << " W "
132  << midW[i] << " T " << midT[i];
133 #endif
134 
135  //Absorber layers in the side part
136  sideMat = vsArgs["SideMat"];
137  sideD = vArgs["SideD"];
138  sideT = vArgs["SideT"];
139 #ifdef EDM_ML_DEBUG
140  for (unsigned int i = 0; i < sideMat.size(); i++)
141  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Side material "
142  << sideMat[i] << " d " << sideD[i] << " t "
143  << sideT[i];
144 #endif
145  sideAbsName = vsArgs["SideAbsName"];
146  sideAbsMat = vsArgs["SideAbsMat"];
147  sideAbsW = vArgs["SideAbsW"];
148  nSideAbs = sideAbsName.size();
149 #ifdef EDM_ML_DEBUG
150  for (int i = 0; i < nSideAbs; i++)
151  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << sideAbsName[i]
152  <<" Material " << sideAbsMat[i] << " W "
153  << sideAbsW[i];
154 #endif
155 
157  // Detectors
158 
159  detMat = sArgs["DetMat"];
160  detRot = sArgs["DetRot"];
161  detMatPl = sArgs["DetMatPl"];
162  detMatSc = sArgs["DetMatSc"];
163 #ifdef EDM_ML_DEBUG
164  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Detector (" << nLayers
165  << ") Rotation matrix " << rotns << ":"
166  << detRot << "\n\t\t" << detMat << "\t"
167  << detMatPl << "\t" << detMatSc;
168 #endif
169  detType = dbl_to_int(vArgs["DetType"]);
170  detdP1 = vArgs["DetdP1"];
171  detdP2 = vArgs["DetdP2"];
172  detT11 = vArgs["DetT11"];
173  detT12 = vArgs["DetT12"];
174  detTsc = vArgs["DetTsc"];
175  detT21 = vArgs["DetT21"];
176  detT22 = vArgs["DetT22"];
177  detWidth1 = vArgs["DetWidth1"];
178  detWidth2 = vArgs["DetWidth2"];
179  detPosY = dbl_to_int(vArgs["DetPosY"]);
180 #ifdef EDM_ML_DEBUG
181  for (int i = 0; i < nLayers; i ++)
182  edm::LogVerbatim("HCalGeom") << i+1 << "\t" << detType[i] << "\t"
183  << detdP1[i] << ", " << detdP2[i] << "\t"
184  << detT11[i] << ", " << detT12[i] << "\t"
185  << detTsc[i] << "\t" << detT21[i] << ", "
186  << detT22[i] << "\t" << detWidth1[i] << "\t"
187  << detWidth2[i] << "\t" << detPosY[i];
188 #endif
189 
190  // idName = parentName.name();
191  idName = sArgs["MotherName"];
193  idOffset = int (nArgs["IdOffset"]);
194 #ifdef EDM_ML_DEBUG
195  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Parent " <<parent().name()
196  <<" idName " << idName << " NameSpace "
197  << idNameSpace << " Offset " << idOffset;
198 #endif
199 }
std::vector< std::string > absorbMat
std::vector< std::string > midMat
std::vector< double > sideAbsW
std::vector< std::string > layerLabel
std::string idNameSpace
std::vector< double > layerD2
std::vector< std::string > layerMat
std::vector< int > layerId
static std::string & ns()
std::vector< double > rmax
std::string detMatSc
std::string genMaterial
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Definition: DDutils.h:7
std::vector< double > layerT1
std::vector< double > detdP2
std::vector< double > detWidth2
std::vector< std::string > sideAbsName
std::vector< double > detdP1
std::vector< double > absorbT
std::vector< double > detWidth1
std::vector< double > layerGap
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< double > layerAlpha
std::vector< double > detT22
std::vector< int > layerAbsorb
std::vector< std::string > sideAbsMat
std::vector< double > sideT
std::vector< double > detTsc
std::vector< std::string > midName
std::vector< std::string > sideMat
std::vector< double > detT21
std::vector< int > detPosY
std::vector< int > detType
std::string detMatPl
std::vector< double > zoff
std::vector< double > sideD
std::vector< double > detT11
std::vector< double > absorbD
std::vector< double > ttheta
std::vector< double > theta
std::string middleMat
std::vector< double > layerWidth
std::vector< std::string > absorbName
std::vector< double > midW
std::vector< double > layerD1
std::vector< double > detT12
std::vector< double > midT
std::vector< double > layerT2

Member Data Documentation

std::vector<double> DDHCalBarrelAlgo::absorbD
private

Definition at line 169 of file DDHCalBarrelAlgo.h.

Referenced by getAbsorbD(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::absorbMat
private

Definition at line 168 of file DDHCalBarrelAlgo.h.

Referenced by getAbsorbMat(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::absorbName
private

Definition at line 167 of file DDHCalBarrelAlgo.h.

Referenced by getAbsorbName(), and initialize().

std::vector<double> DDHCalBarrelAlgo::absorbT
private

Definition at line 170 of file DDHCalBarrelAlgo.h.

Referenced by getAbsorbT(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detdP1
private

Definition at line 205 of file DDHCalBarrelAlgo.h.

Referenced by getDetdP1(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detdP2
private

Definition at line 206 of file DDHCalBarrelAlgo.h.

Referenced by getDetdP2(), and initialize().

std::string DDHCalBarrelAlgo::detMat
private

Definition at line 200 of file DDHCalBarrelAlgo.h.

Referenced by getDetMat(), and initialize().

std::string DDHCalBarrelAlgo::detMatPl
private

Definition at line 202 of file DDHCalBarrelAlgo.h.

Referenced by getDetMatPl(), and initialize().

std::string DDHCalBarrelAlgo::detMatSc
private

Definition at line 203 of file DDHCalBarrelAlgo.h.

Referenced by getDetMatSc(), and initialize().

std::vector<int> DDHCalBarrelAlgo::detPosY
private

Definition at line 214 of file DDHCalBarrelAlgo.h.

Referenced by getDetPosY(), and initialize().

std::string DDHCalBarrelAlgo::detRot
private

Definition at line 201 of file DDHCalBarrelAlgo.h.

Referenced by constructInsideLayers(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detT11
private

Definition at line 207 of file DDHCalBarrelAlgo.h.

Referenced by getDetT11(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detT12
private

Definition at line 208 of file DDHCalBarrelAlgo.h.

Referenced by getDetT12(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detT21
private

Definition at line 210 of file DDHCalBarrelAlgo.h.

Referenced by getDetT21(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detT22
private

Definition at line 211 of file DDHCalBarrelAlgo.h.

Referenced by getDetT22(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detTsc
private

Definition at line 209 of file DDHCalBarrelAlgo.h.

Referenced by getDetTsc(), and initialize().

std::vector<int> DDHCalBarrelAlgo::detType
private

Definition at line 204 of file DDHCalBarrelAlgo.h.

Referenced by getDetType(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detWidth1
private

Definition at line 212 of file DDHCalBarrelAlgo.h.

Referenced by getDetWidth1(), and initialize().

std::vector<double> DDHCalBarrelAlgo::detWidth2
private

Definition at line 213 of file DDHCalBarrelAlgo.h.

Referenced by getDetWidth2(), and initialize().

std::string DDHCalBarrelAlgo::genMaterial
private

Definition at line 114 of file DDHCalBarrelAlgo.h.

Referenced by getGenMaterial(), and initialize().

std::string DDHCalBarrelAlgo::idName
private
std::string DDHCalBarrelAlgo::idNameSpace
private
int DDHCalBarrelAlgo::idOffset
private

Definition at line 218 of file DDHCalBarrelAlgo.h.

Referenced by constructInsideLayers(), and initialize().

std::vector<int> DDHCalBarrelAlgo::layerAbsorb
private

Definition at line 163 of file DDHCalBarrelAlgo.h.

Referenced by getLayerAbsorb(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerAlpha
private

Definition at line 160 of file DDHCalBarrelAlgo.h.

Referenced by getLayerAlpha(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerD1
private

Definition at line 158 of file DDHCalBarrelAlgo.h.

Referenced by getLayerD1(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerD2
private

Definition at line 159 of file DDHCalBarrelAlgo.h.

Referenced by getLayerD2(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerGap
private

Definition at line 164 of file DDHCalBarrelAlgo.h.

Referenced by getLayerGap(), and initialize().

std::vector<int> DDHCalBarrelAlgo::layerId
private

Definition at line 154 of file DDHCalBarrelAlgo.h.

Referenced by getLayerId(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::layerLabel
private

Definition at line 155 of file DDHCalBarrelAlgo.h.

Referenced by getLayerLabel(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::layerMat
private

Definition at line 156 of file DDHCalBarrelAlgo.h.

Referenced by getLayerMaterial(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerT1
private

Definition at line 161 of file DDHCalBarrelAlgo.h.

Referenced by getLayerT1(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerT2
private

Definition at line 162 of file DDHCalBarrelAlgo.h.

Referenced by getLayerT2(), and initialize().

std::vector<double> DDHCalBarrelAlgo::layerWidth
private

Definition at line 157 of file DDHCalBarrelAlgo.h.

Referenced by getLayerWidth(), and initialize().

double DDHCalBarrelAlgo::middleD
private

Definition at line 172 of file DDHCalBarrelAlgo.h.

Referenced by getMiddleD(), and initialize().

std::string DDHCalBarrelAlgo::middleMat
private

Definition at line 171 of file DDHCalBarrelAlgo.h.

Referenced by getMiddleMat(), and initialize().

double DDHCalBarrelAlgo::middleW
private

Definition at line 173 of file DDHCalBarrelAlgo.h.

Referenced by getMiddleW(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::midMat
private

Definition at line 176 of file DDHCalBarrelAlgo.h.

Referenced by getMidAbsMat(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::midName
private

Definition at line 175 of file DDHCalBarrelAlgo.h.

Referenced by getMidAbsName(), and initialize().

std::vector<double> DDHCalBarrelAlgo::midT
private

Definition at line 178 of file DDHCalBarrelAlgo.h.

Referenced by getMidAbsT(), and initialize().

std::vector<double> DDHCalBarrelAlgo::midW
private

Definition at line 177 of file DDHCalBarrelAlgo.h.

Referenced by getMidAbsW(), and initialize().

int DDHCalBarrelAlgo::nAbsorber
private

Definition at line 166 of file DDHCalBarrelAlgo.h.

Referenced by getAbsorberN(), and initialize().

int DDHCalBarrelAlgo::nhalf
private

Definition at line 117 of file DDHCalBarrelAlgo.h.

Referenced by getNhalf(), and initialize().

int DDHCalBarrelAlgo::nLayers
private

Definition at line 153 of file DDHCalBarrelAlgo.h.

Referenced by getNLayers(), and initialize().

int DDHCalBarrelAlgo::nMidAbs
private

Definition at line 174 of file DDHCalBarrelAlgo.h.

Referenced by getMidAbsorber(), and initialize().

int DDHCalBarrelAlgo::nsectors
private

Definition at line 115 of file DDHCalBarrelAlgo.h.

Referenced by getNsectors(), and initialize().

int DDHCalBarrelAlgo::nsectortot
private

Definition at line 116 of file DDHCalBarrelAlgo.h.

Referenced by getNsectortot(), and initialize().

int DDHCalBarrelAlgo::nSideAbs
private

Definition at line 183 of file DDHCalBarrelAlgo.h.

Referenced by getSideAbsorber(), and initialize().

double DDHCalBarrelAlgo::rin
private
std::vector<double> DDHCalBarrelAlgo::rmax
private

Definition at line 121 of file DDHCalBarrelAlgo.h.

Referenced by constructMidLayer(), getRmax(), and initialize().

std::string DDHCalBarrelAlgo::rotHalf
private

Definition at line 124 of file DDHCalBarrelAlgo.h.

Referenced by constructGeneralVolume(), and initialize().

std::string DDHCalBarrelAlgo::rotns
private

Definition at line 125 of file DDHCalBarrelAlgo.h.

Referenced by constructGeneralVolume(), constructInsideLayers(), and initialize().

double DDHCalBarrelAlgo::rout
private
int DDHCalBarrelAlgo::rzones
private

Definition at line 119 of file DDHCalBarrelAlgo.h.

Referenced by getRzones(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::sideAbsMat
private

Definition at line 185 of file DDHCalBarrelAlgo.h.

Referenced by getSideAbsMat(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::sideAbsName
private

Definition at line 184 of file DDHCalBarrelAlgo.h.

Referenced by getSideAbsName(), and initialize().

std::vector<double> DDHCalBarrelAlgo::sideAbsW
private

Definition at line 186 of file DDHCalBarrelAlgo.h.

Referenced by getSideAbsW(), and initialize().

std::vector<double> DDHCalBarrelAlgo::sideD
private

Definition at line 181 of file DDHCalBarrelAlgo.h.

Referenced by getSideD(), and initialize().

std::vector<std::string> DDHCalBarrelAlgo::sideMat
private

Definition at line 180 of file DDHCalBarrelAlgo.h.

Referenced by getSideMat(), and initialize().

std::vector<double> DDHCalBarrelAlgo::sideT
private

Definition at line 182 of file DDHCalBarrelAlgo.h.

Referenced by getSideT(), and initialize().

std::vector<double> DDHCalBarrelAlgo::theta
private

Definition at line 120 of file DDHCalBarrelAlgo.h.

Referenced by constructGeneralVolume(), getTheta(), initialize(), and Tau.Tau::zImpact().

std::vector<double> DDHCalBarrelAlgo::ttheta
private

Definition at line 123 of file DDHCalBarrelAlgo.h.

Referenced by getTanTheta(), and initialize().

std::vector<double> DDHCalBarrelAlgo::zoff
private

Definition at line 122 of file DDHCalBarrelAlgo.h.

Referenced by getZoff(), and initialize().