CMS 3D CMS Logo

List of all members | Public Member Functions
DDDividedTubsZ Class Referencefinal

#include <DDDividedTubs.h>

Inheritance diagram for DDDividedTubsZ:
DDDividedGeometryObject

Public Member Functions

 DDDividedTubsZ (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 32 of file DDDividedTubs.h.

Constructor & Destructor Documentation

◆ DDDividedTubsZ()

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

Member Function Documentation

◆ getMaxParameter()

double DDDividedTubsZ::getMaxParameter ( void  ) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 142 of file DDDividedTubs.cc.

142  {
143  DDTubs msol = (DDTubs)(div_.parent().solid());
144  return 2 * msol.zhalf();
145 }

References DDDividedGeometryObject::div_, DDDivision::parent(), DDLogicalPart::solid(), and DDTubs::zhalf().

◆ makeDDLogicalPart()

DDLogicalPart DDDividedTubsZ::makeDDLogicalPart ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 162 of file DDDividedTubs.cc.

162  {
163  DDMaterial usemat(div_.parent().material());
164  DDTubs msol = (DDTubs)(div_.parent().solid());
165  DDLogicalPart ddlp;
166 
167  DDName solname(div_.parent().ddname().name() + "_DIVCHILD", div_.parent().ddname().ns());
168  DDSolid ddtubs(solname);
169 
170  if (!ddtubs.isDefined().second) // only if it is not defined, make new dimensions and solid.
171  {
172  double pRMin = msol.rIn();
173  double pRMax = msol.rOut();
174  double pDz = compWidth_ / 2.;
175  double pSPhi = msol.startPhi();
176  double pDPhi = msol.deltaPhi();
177  ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi);
178  ddlp = DDLogicalPart(solname, usemat, ddtubs);
179  } else {
180  ddlp = DDLogicalPart(solname);
181  }
182  return ddlp;
183 }

References DDDividedGeometryObject::compWidth_, DDBase< N, C >::ddname(), ddtubs, DDDividedGeometryObject::div_, DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::parent(), DDLogicalPart::solid(), and DDSolidFactory::tubs().

◆ makeDDRotation()

DDRotation DDDividedTubsZ::makeDDRotation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 147 of file DDDividedTubs.cc.

147  {
148  DDRotation myddrot; // sets to identity.
149  return myddrot;
150 }

◆ makeDDTranslation()

DDTranslation DDDividedTubsZ::makeDDTranslation ( int  copyNo) const
overridevirtual

Reimplemented from DDDividedGeometryObject.

Definition at line 152 of file DDDividedTubs.cc.

152  {
153  DDTranslation translation;
154 
155  DDTubs msol = (DDTubs)(div_.parent().solid());
156  double posi = -msol.zhalf() + div_.offset() + compWidth_ / 2 + copyNo * compWidth_;
157  translation.SetZ(posi);
158 
159  return translation;
160 }

References DDDividedGeometryObject::compWidth_, DDDividedGeometryObject::div_, DDDivision::offset(), DDDivision::parent(), DDLogicalPart::solid(), and DDTubs::zhalf().

DDTubs::zhalf
double zhalf(void) const
Definition: DDSolid.cc:450
DDDividedGeometryObject::compWidth_
double compWidth_
Definition: DDDividedGeometryObject.h:56
DDDivision::width
double width() const
Definition: DDDivision.cc:53
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
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
DivWIDTH
Definition: DDDividedGeometryObject.h:14
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDDividedGeometryObject::checkParametersValidity
virtual void checkParametersValidity(void)
Definition: DDDividedGeometryObject.cc:41
DDSolidShape::ddtubs
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DivNDIV
Definition: DDDividedGeometryObject.h:14
DDSolidFactory::tubs
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:653
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
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
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
DDDivision::parent
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57
DDTubs
Definition: DDSolid.h:255
DDDividedGeometryObject::calculateWidth
double calculateWidth(double motherDim, int nDiv, double offset) const
Definition: DDDividedGeometryObject.cc:37