CMS 3D CMS Logo

List of all members | Public Member Functions
DDDividedPolyhedraRho Class Referencefinal

#include <DDDividedPolyhedra.h>

Inheritance diagram for DDDividedPolyhedraRho:
DDDividedGeometryObject

Public Member Functions

void checkParametersValidity () override
 
 DDDividedPolyhedraRho (const DDDivision &div, DDCompactView *cpv)
 
double getMaxParameter () const override
 
DDLogicalPart makeDDLogicalPart (int copyNo) const override
 
DDRotation makeDDRotation (int copyNo) const override
 
DDTranslation makeDDTranslation (int copyNo) const override
 
- Public Member Functions inherited from DDDividedGeometryObject
 DDDividedGeometryObject (const DDDivision &div, DDCompactView *cpv)
 
virtual void execute (void)
 
virtual const std::string & getType (void) const
 
virtual void setType (const std::string &type)
 
int volumeFirstCopyNo (void) const
 
virtual ~DDDividedGeometryObject (void)=default
 

Additional Inherited Members

- Static Public Member Functions inherited from DDDividedGeometryObject
static const double tolerance (void)
 
- Protected Member Functions inherited from DDDividedGeometryObject
int calculateNDiv (double motherDim, double width, double offset) const
 
double calculateWidth (double motherDim, int nDiv, double offset) const
 
std::unique_ptr< DDRotationMatrixchangeRotMatrix (double rotZ=0.) const
 
void checkNDivAndWidth (double maxPar)
 
void checkOffset (double maxPar)
 
- Protected Attributes inherited from DDDividedGeometryObject
int compNDiv_
 
double compWidth_
 
DDCompactViewcpv_
 
DDDivision div_
 
DivisionType divisionType_
 
std::string ftype_
 
int theVoluFirstCopyNo_
 

Detailed Description

Definition at line 12 of file DDDividedPolyhedra.h.

Constructor & Destructor Documentation

◆ DDDividedPolyhedraRho()

DDDividedPolyhedraRho::DDDividedPolyhedraRho ( const DDDivision div,
DDCompactView cpv 
)

Member Function Documentation

◆ checkParametersValidity()

void DDDividedPolyhedraRho::checkParametersValidity ( void  )
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 37 of file DDDividedPolyhedra.cc.

37  {
39 
40  DDPolyhedra msol = (DDPolyhedra)(div_.parent().solid());
41 
43  std::cout << "WARNING - "
44  << "DDDividedPolyhedraRho::checkParametersValidity()" << std::endl
45  << " Solid " << msol << std::endl
46  << " Division along R will be done with a width "
47  << "different for each solid section." << std::endl
48  << " WIDTH will not be used !" << std::endl;
49  }
50  if (div_.offset() != 0.) {
51  std::cout << "WARNING - "
52  << "DDDividedPolyhedraRho::checkParametersValidity()" << std::endl
53  << " Solid " << msol << std::endl
54  << " Division along R will be done with a width "
55  << "different for each solid section." << std::endl
56  << " OFFSET will not be used !" << std::endl;
57  }
58 }

References DDDividedGeometryObject::checkParametersValidity(), gather_cfg::cout, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIVandWIDTH, DivWIDTH, DDDivision::offset(), DDDivision::parent(), and DDLogicalPart::solid().

Referenced by DDDividedPolyhedraRho().

◆ getMaxParameter()

double DDDividedPolyhedraRho::getMaxParameter ( void  ) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 60 of file DDDividedPolyhedra.cc.

60  {
61  DDPolyhedra msol = (DDPolyhedra)(div_.parent().solid());
62  return msol.rMaxVec()[0] - msol.rMinVec()[0];
63 }

References DDDividedGeometryObject::div_, DDDivision::parent(), DDPolyhedra::rMaxVec(), DDPolyhedra::rMinVec(), and DDLogicalPart::solid().

◆ makeDDLogicalPart()

DDLogicalPart DDDividedPolyhedraRho::makeDDLogicalPart ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 69 of file DDDividedPolyhedra.cc.

69  {
70  DDPolyhedra msol = (DDPolyhedra)(div_.parent().solid());
71  DDMaterial usemat = div_.parent().material();
72 
73  std::vector<double> localrMaxVec = msol.rMaxVec();
74  std::vector<double> localrMinVec = msol.rMinVec();
75  std::vector<double> localzVec = msol.zVec();
76  std::vector<double> newrMinVec;
77  std::vector<double> newrMaxVec;
78  int nZplanes = localzVec.size();
79 
80  double width = 0.;
81  for (int ii = 0; ii < nZplanes; ++ii) {
82  // width = CalculateWidth( origparamMother->Rmax[ii]
83  // - origparamMother->Rmin[ii], compNDiv_, foffset );
84  // origparam.Rmin[ii] = origparamMother->Rmin[ii]+foffset+width*copyNo;
85  // origparam.Rmax[ii] = origparamMother->Rmin[ii]+foffset+width*(copyNo+1);
86  width = calculateWidth(localrMaxVec[ii] - localrMinVec[ii], compNDiv_, div_.offset());
87  newrMinVec[ii] = localrMinVec[ii] + div_.offset() + width * copyNo;
88  newrMaxVec[ii] = localrMaxVec[ii] + div_.offset() + width * (copyNo + 1);
89  }
90 
91  // phedra.SetOriginalParameters(&origparam); // copy values & transfer pointers
92  // phedra.Reset(); // reset to new solid parameters
93 
94  DDName solname(div_.parent().ddname().name() + "_DIVCHILD" + std::to_string(copyNo), div_.parent().ddname().ns());
95 
97  solname, msol.sides(), msol.startPhi(), msol.deltaPhi(), localzVec, newrMinVec, newrMaxVec);
98  DDLogicalPart ddlp = DDLogicalPart(solname, usemat, dsol);
99  return ddlp;
100 }

References DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::compNDiv_, DDBase< N, C >::ddname(), DDPolyhedra::deltaPhi(), DDDividedGeometryObject::div_, cuy::ii, DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), DDSolidFactory::polyhedra(), DDPolyhedra::rMaxVec(), DDPolyhedra::rMinVec(), DDPolyhedra::sides(), DDLogicalPart::solid(), DDPolyhedra::startPhi(), ApeEstimator_cff::width, and DDPolyhedra::zVec().

◆ makeDDRotation()

DDRotation DDDividedPolyhedraRho::makeDDRotation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 67 of file DDDividedPolyhedra.cc.

67 { return DDRotation(); }

◆ makeDDTranslation()

DDTranslation DDDividedPolyhedraRho::makeDDTranslation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 65 of file DDDividedPolyhedra.cc.

65 { return DDTranslation(); }
DDDividedGeometryObject::compWidth_
double compWidth_
Definition: DDDividedGeometryObject.h:56
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
DDPolyhedra::rMaxVec
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:338
DDDivision::width
double width() const
Definition: DDDivision.cc:53
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDPolyhedra::zVec
std::vector< double > zVec(void) const
Definition: DDSolid.cc:324
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DDLogicalPart::material
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
Definition: DDLogicalPart.cc:118
DDDividedGeometryObject::DDDividedGeometryObject
DDDividedGeometryObject(const DDDivision &div, DDCompactView *cpv)
Definition: DDDividedGeometryObject.cc:13
DDPolyhedra::rMinVec
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:331
DivWIDTH
Definition: DDDividedGeometryObject.h:14
DDDividedPolyhedraRho::checkParametersValidity
void checkParametersValidity() override
Definition: DDDividedPolyhedra.cc:37
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDDividedGeometryObject::checkParametersValidity
virtual void checkParametersValidity(void)
Definition: DDDividedGeometryObject.cc:41
DDPolyhedra::sides
int sides(void) const
Definition: DDSolid.cc:311
DDSolidFactory::polyhedra
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:551
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DivNDIV
Definition: DDDividedGeometryObject.h:14
DivNDIVandWIDTH
Definition: DDDividedGeometryObject.h:14
DDDividedGeometryObject::calculateNDiv
int calculateNDiv(double motherDim, double width, double offset) const
Definition: DDDividedGeometryObject.cc:33
DDDividedGeometryObject::div_
DDDivision div_
Definition: DDDividedGeometryObject.h:53
DDDividedGeometryObject::compNDiv_
int compNDiv_
Definition: DDDividedGeometryObject.h:55
DDBase::ddname
const N & ddname() const
Definition: DDBase.h:61
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDDividedGeometryObject::divisionType_
DivisionType divisionType_
Definition: DDDividedGeometryObject.h:57
DDDividedGeometryObject::setType
virtual void setType(const std::string &type)
Definition: DDDividedGeometryObject.cc:81
DDDivision::offset
double offset() const
Definition: DDDivision.cc:55
DDName::name
const std::string & name() const
Returns the name.
Definition: DDName.cc:40
DDDivision::nReplicas
int nReplicas() const
Definition: DDDivision.cc:51
DDPolyhedra
Definition: DDSolid.h:224
DDPolyhedra::deltaPhi
double deltaPhi(void) const
Definition: DDSolid.cc:315
DDName::ns
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:51
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDPolyhedra::startPhi
double startPhi(void) const
Definition: DDSolid.cc:313
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
cuy.ii
ii
Definition: cuy.py:590
DDDivision::parent
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:18
DDDividedGeometryObject::calculateWidth
double calculateWidth(double motherDim, int nDiv, double offset) const
Definition: DDDividedGeometryObject.cc:37