CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
DDDividedConsRho Class Referencefinal

#include <DDDividedCons.h>

Inheritance diagram for DDDividedConsRho:
DDDividedGeometryObject

Public Member Functions

 DDDividedConsRho (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)
 
virtual void checkParametersValidity (void)
 
- 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 DDDividedCons.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file DDDividedCons.cc.

References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, gather_cfg::cout, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rInPlusZ(), DDCons::rOutMinusZ(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().

24  setType("DivisionConsRho");
25  DDCons msol = (DDCons)(div_.parent().solid());
26 
27  if (msol.rInPlusZ() == 0.) {
28  std::cout << "WARNING - DDDividedConsRho, rOutMinusZ = 0. " << std::endl
29  << " Width is calculated as that of rOutMinusZ !" << std::endl;
30  }
31 
32  if (divisionType_ == DivWIDTH) {
34  } else if (divisionType_ == DivNDIV) {
35  DDCons msol = (DDCons)(div_.parent().solid());
37  }
38 }
int nReplicas() const
Definition: DDDivision.cc:51
double offset() const
Definition: DDDivision.cc:55
int calculateNDiv(double motherDim, double width, double offset) const
double rOutMinusZ(void) const
Definition: DDSolid.cc:418
double calculateWidth(double motherDim, int nDiv, double offset) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
virtual void checkParametersValidity(void)
DDDividedGeometryObject(const DDDivision &div, DDCompactView *cpv)
double rInMinusZ(void) const
Definition: DDSolid.cc:416
virtual void setType(const std::string &type)
dd4hep::ConeSegment DDCons
double width() const
Definition: DDDivision.cc:53
double rInPlusZ(void) const
Definition: DDSolid.cc:420
tuple cout
Definition: gather_cfg.py:144
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57

Member Function Documentation

double DDDividedConsRho::getMaxParameter ( void  ) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 40 of file DDDividedCons.cc.

References DDDividedGeometryObject::div_, DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rOutMinusZ(), and DDLogicalPart::solid().

40  {
41  DDCons msol = (DDCons)(div_.parent().solid());
42  return msol.rOutMinusZ() - msol.rInMinusZ();
43 }
double rOutMinusZ(void) const
Definition: DDSolid.cc:418
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
double rInMinusZ(void) const
Definition: DDSolid.cc:416
dd4hep::ConeSegment DDCons
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57
DDLogicalPart DDDividedConsRho::makeDDLogicalPart ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 55 of file DDDividedCons.cc.

References DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DDSolidFactory::cons(), ddcons, DDBase< N, C >::ddname(), DDDividedGeometryObject::div_, DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), DDCons::rInMinusZ(), DDLogicalPart::solid(), and cond::impl::to_string().

55  {
56  DDName solname(div_.parent().ddname().name() + "_DIVCHILD" + std::to_string(copyNo), div_.parent().ddname().ns());
57  DDSolid ddcons(solname);
58  DDMaterial usemat(div_.parent().material());
59  DDCons msol = (DDCons)(div_.parent().solid());
60 
61  double pRMin1 = msol.rInMinusZ() + div_.offset() + compWidth_ * copyNo;
62  double pRMax1 = msol.rInMinusZ() + div_.offset() + compWidth_ * (copyNo + 1);
63 
64  //width at Z Plus
65  //- double compWidth_Plus =
66  // compWidth_ * ( msol.rOutPlusZ()/ msol.rInPlusZ())
67  //- / ( msol.rOutMinusZ() - msol.rInMinusZ());
68  double compWidth_Plus = calculateWidth(msol.rOutPlusZ() - msol.rInPlusZ(), compNDiv_, div_.offset());
69  double pRMin2 = msol.rInPlusZ() + div_.offset() + compWidth_Plus * copyNo;
70  double pRMax2 = msol.rInPlusZ() + div_.offset() + compWidth_Plus * (copyNo + 1);
71  double pDz = msol.zhalf();
72 
73  double pSPhi = msol.phiFrom();
74  double pDPhi = msol.deltaPhi();
75 
76  ddcons = DDSolidFactory::cons(DDName(solname), pDz, pRMin1, pRMax1, pRMin2, pRMax2, pSPhi, pDPhi);
77 
78  DDLogicalPart ddlp = DDLogicalPart(solname, usemat, ddcons);
79  return ddlp;
80 }
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
double offset() const
Definition: DDDivision.cc:55
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
Definition: DDSolid.cc:650
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:52
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
std::string to_string(const V &value)
Definition: OMSAccess.h:71
double calculateWidth(double motherDim, int nDiv, double offset) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
double rInMinusZ(void) const
Definition: DDSolid.cc:416
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
dd4hep::ConeSegment DDCons
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
const N & ddname() const
Definition: DDBase.h:61
DDRotation DDDividedConsRho::makeDDRotation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 45 of file DDDividedCons.cc.

45  {
46  DDRotation myddrot; // sets to identity.
47  return myddrot;
48 }
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDTranslation DDDividedConsRho::makeDDTranslation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 50 of file DDDividedCons.cc.

50  {
51  DDTranslation translation;
52  return translation;
53 }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7