CMS 3D CMS Logo

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

#include <DDDividedTubs.h>

Inheritance diagram for DDDividedTubsRho:
DDDividedGeometryObject

Public Member Functions

 DDDividedTubsRho (const DDDivision &div, DDCompactView *cpv)
 
virtual double getMaxParameter () const
 
virtual DDLogicalPart makeDDLogicalPart (const int copyNo) const
 
virtual DDRotation makeDDRotation (const int copyNo) const
 
virtual DDTranslation makeDDTranslation (const int copyNo) const
 
virtual ~DDDividedTubsRho ()
 
- 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)
 

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 14 of file DDDividedTubs.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file DDDividedTubs.cc.

References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDTubs::rIn(), DDTubs::rOut(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().

22 {
24  setType( "DivisionTubsRho" );
25  DDTubs msol = (DDTubs)(div_.parent().solid());
26 
27  if( divisionType_ == DivWIDTH )
28  {
29  compNDiv_ = calculateNDiv( msol.rIn() - msol.rOut(),
30  div_.width(), div_.offset() );
31  }
32  else if( divisionType_ == DivNDIV )
33  {
34  compWidth_ = calculateWidth( msol.rIn() - msol.rOut(),
35  div_.nReplicas(), div_.offset() );
36  }
37 
38  DCOUT_V ('P', " DDDividedTubsRho - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_);
39 
40 }
int nReplicas() const
Definition: DDDivision.cc:71
double offset() const
Definition: DDDivision.cc:81
int calculateNDiv(double motherDim, double width, double offset) const
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)
virtual void setType(const std::string &type)
double rOut(void) const
Definition: DDSolid.cc:509
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
double width() const
Definition: DDDivision.cc:76
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86
double rIn(void) const
Definition: DDSolid.cc:507
DDDividedTubsRho::~DDDividedTubsRho ( void  )
virtual

Definition at line 42 of file DDDividedTubs.cc.

43 {}

Member Function Documentation

double DDDividedTubsRho::getMaxParameter ( void  ) const
virtual

Reimplemented from DDDividedGeometryObject.

Definition at line 46 of file DDDividedTubs.cc.

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

47 {
48  DDTubs msol = (DDTubs)(div_.parent().solid());
49  return msol.rOut() - msol.rIn();
50 
51 }
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
double rOut(void) const
Definition: DDSolid.cc:509
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86
double rIn(void) const
Definition: DDSolid.cc:507
DDLogicalPart DDDividedTubsRho::makeDDLogicalPart ( const int  copyNo) const
virtual

Reimplemented from DDDividedGeometryObject.

Definition at line 73 of file DDDividedTubs.cc.

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

74 {
75  // must always make new name and new solid
76  DDName solname(div_.parent().ddname().name() + "_DIVCHILD"
77  + DDXMLElement::itostr(copyNo)
78  , div_.parent().ddname().ns());
79  DDSolid ddtubs(solname);
80  DDMaterial usemat(div_.parent().material());
81  DDTubs msol = (DDTubs) (div_.parent().solid());
82  DDLogicalPart ddlp;
83 
84  double pRMin = msol.rIn() + div_.offset() + compWidth_ * copyNo;
85  double pRMax = msol.rIn() + div_.offset() + compWidth_ * (copyNo+1);
86  double pDz = msol.zhalf();
87  double pSPhi = msol.startPhi();
88  double pDPhi = msol.deltaPhi();
89  ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi);
90  ddlp = DDLogicalPart(solname, usemat, ddtubs);
91 
92  DCOUT_V ('P', " DDDividedTubsRho::computeDimensions() lp:" << ddlp);
93  return ddlp;
94 }
static std::string itostr(int i)
WARNING: abused by other classes in this system: yet another conversion from int to std::string...
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
double offset() const
Definition: DDDivision.cc:81
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:101
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
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:35
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:788
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
const DDLogicalPart & parent() const
Definition: DDDivision.cc:86
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
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 DDDividedTubsRho::makeDDRotation ( const int  copyNo) const
virtual

Reimplemented from DDDividedGeometryObject.

Definition at line 54 of file DDDividedTubs.cc.

References DCOUT_V.

55 {
56  DDRotation myddrot; // sets to identity.
57  DCOUT_V ('P', "DDDividedTubsRho::makeDDRotation made a rotation: " << myddrot);
58  return myddrot;
59 }
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
DDTranslation DDDividedTubsRho::makeDDTranslation ( const int  copyNo) const
virtual

Reimplemented from DDDividedGeometryObject.

Definition at line 63 of file DDDividedTubs.cc.

References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, and DDAxesNames::name().

64 {
65  //----- translation
66  DDTranslation translation;
67 
68  DCOUT_V ('P', " DDDividedTubsRho " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis()));
69  return translation;
70 }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
static const std::string name(const DDAxes &s)
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
DDAxes axis() const
Definition: DDDivision.cc:66