CMS 3D CMS Logo

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
 
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 20 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().

22 {
24  setType( "DivisionConsRho" );
25  DDCons msol = (DDCons)(div_.parent().solid());
26 
27  if( msol.rInPlusZ() == 0. )
28  {
29  std::cout << "WARNING - DDDividedConsRho, rOutMinusZ = 0. "
30  << std::endl
31  << " Width is calculated as that of rOutMinusZ !"
32  << std::endl;
33  }
34 
35  if( divisionType_ == DivWIDTH )
36  {
38  - msol.rInMinusZ(), div_.width(), div_.offset() );
39  }
40  else if( divisionType_ == DivNDIV )
41  {
42  DDCons msol = (DDCons)(div_.parent().solid());
44  , div_.nReplicas()
45  , div_.offset() );
46  }
47 }
int nReplicas() const
Definition: DDDivision.cc:71
double offset() const
Definition: DDDivision.cc:81
int calculateNDiv(double motherDim, double width, double offset) const
double rOutMinusZ(void) const
Definition: DDSolid.cc:557
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:554
virtual void setType(const std::string &type)
double width() const
Definition: DDDivision.cc:76
double rInPlusZ(void) const
Definition: DDSolid.cc:560
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86

Member Function Documentation

double DDDividedConsRho::getMaxParameter ( void  ) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 50 of file DDDividedCons.cc.

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

51 {
52  DDCons msol = (DDCons)(div_.parent().solid());
53  return msol.rOutMinusZ() - msol.rInMinusZ();
54 }
double rOutMinusZ(void) const
Definition: DDSolid.cc:557
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:554
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86
DDLogicalPart DDDividedConsRho::makeDDLogicalPart ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 71 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(), and DDLogicalPart::solid().

72 {
73  DDName solname(div_.parent().ddname().name() + "_DIVCHILD"
74  + std::to_string(copyNo),
75  div_.parent().ddname().ns());
76  DDSolid ddcons(solname);
77  DDMaterial usemat(div_.parent().material());
78  DDCons msol = (DDCons)(div_.parent().solid());
79 
80  double pRMin1 = msol.rInMinusZ() + div_.offset() + compWidth_ * copyNo;
81  double pRMax1 = msol.rInMinusZ() + div_.offset() + compWidth_ * (copyNo+1);
82 
83  //width at Z Plus
84  //- double compWidth_Plus =
85  // compWidth_ * ( msol.rOutPlusZ()/ msol.rInPlusZ())
86  //- / ( msol.rOutMinusZ() - msol.rInMinusZ());
87  double compWidth_Plus = calculateWidth( msol.rOutPlusZ()
88  - msol.rInPlusZ(), compNDiv_, div_.offset() );
89  double pRMin2 = msol.rInPlusZ()
90  + div_.offset() + compWidth_Plus * copyNo;
91  double pRMax2 = msol.rInPlusZ()
92  + div_.offset() + compWidth_Plus * (copyNo+1);
93  double pDz = msol.zhalf();
94 
95  double pSPhi = msol.phiFrom();
96  double pDPhi = msol.deltaPhi();
97 
98  ddcons = DDSolidFactory::cons(DDName(solname), pDz, pRMin1, pRMax1
99  , pRMin2, pRMax2, pSPhi, pDPhi);
100 
101  DDLogicalPart ddlp = DDLogicalPart(solname, usemat, ddcons);
102  return ddlp;
103 }
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
double offset() const
Definition: DDDivision.cc:81
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
Definition: DDSolid.cc:959
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:104
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
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:38
double rInMinusZ(void) const
Definition: DDSolid.cc:554
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
const N & ddname() const
Definition: DDBase.h:80
DDRotation DDDividedConsRho::makeDDRotation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 57 of file DDDividedCons.cc.

58 {
59  DDRotation myddrot; // sets to identity.
60  return myddrot;
61 }
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:67
DDTranslation DDDividedConsRho::makeDDTranslation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 64 of file DDDividedCons.cc.

65 {
66  DDTranslation translation;
67  return translation;
68 }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7