CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DDDividedGeometryObject Class Reference

#include <DDDividedGeometryObject.h>

Inheritance diagram for DDDividedGeometryObject:
DDDividedBoxX DDDividedBoxY DDDividedBoxZ DDDividedConsPhi DDDividedConsRho DDDividedConsZ DDDividedPolyconePhi DDDividedPolyconeRho DDDividedPolyconeZ DDDividedPolyhedraPhi DDDividedPolyhedraRho DDDividedPolyhedraZ DDDividedTrdX DDDividedTrdY DDDividedTrdZ DDDividedTubsPhi DDDividedTubsRho DDDividedTubsZ

Public Member Functions

 DDDividedGeometryObject (const DDDivision &div, DDCompactView *cpv)
 
virtual void execute (void)
 
virtual const std::string & getType (void) const
 
virtual DDLogicalPart makeDDLogicalPart (int copyNo) const
 
virtual DDRotation makeDDRotation (int copyNo) const
 
virtual DDTranslation makeDDTranslation (int copyNo) const
 
virtual void setType (const std::string &type)
 
int volumeFirstCopyNo (void) const
 
virtual ~DDDividedGeometryObject (void)=default
 

Static Public Member Functions

static const double tolerance (void)
 

Protected Member Functions

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)
 
virtual double getMaxParameter (void) const
 

Protected Attributes

int compNDiv_
 
double compWidth_
 
DDCompactViewcpv_
 
DDDivision div_
 
DivisionType divisionType_
 
std::string ftype_
 
int theVoluFirstCopyNo_
 

Detailed Description

Definition at line 20 of file DDDividedGeometryObject.h.

Constructor & Destructor Documentation

◆ DDDividedGeometryObject()

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

Definition at line 13 of file DDDividedGeometryObject.cc.

14  : div_(div),
15  ftype_(),
16  compNDiv_(div.nReplicas()),
17  compWidth_(div.width()),
20  cpv_(cpv) {
21  if (div_.nReplicas() == 0 || div_.width() < tolerance()) {
22  if (div_.width() < tolerance())
24  else
26  }
27 }

References div_, divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), tolerance(), and DDDivision::width().

◆ ~DDDividedGeometryObject()

virtual DDDividedGeometryObject::~DDDividedGeometryObject ( void  )
virtualdefault

Member Function Documentation

◆ calculateNDiv()

int DDDividedGeometryObject::calculateNDiv ( double  motherDim,
double  width,
double  offset 
) const
protected

◆ calculateWidth()

double DDDividedGeometryObject::calculateWidth ( double  motherDim,
int  nDiv,
double  offset 
) const
protected

◆ changeRotMatrix()

std::unique_ptr< DDRotationMatrix > DDDividedGeometryObject::changeRotMatrix ( double  rotZ = 0.) const
protected

Definition at line 29 of file DDDividedGeometryObject.cc.

29  {
30  return std::make_unique<DDRotationMatrix>(ROOT::Math::RotationZ(rotZ));
31 }

Referenced by DDDividedConsPhi::makeDDRotation(), DDDividedTubsPhi::makeDDRotation(), DDDividedPolyhedraPhi::makeDDRotation(), and DDDividedPolyconePhi::makeDDRotation().

◆ checkNDivAndWidth()

void DDDividedGeometryObject::checkNDivAndWidth ( double  maxPar)
protected

Definition at line 64 of file DDDividedGeometryObject.cc.

64  {
65  if ((divisionType_ == DivNDIVandWIDTH) && (div_.offset() + compWidth_ * compNDiv_ - maxPar > tolerance())) {
66  std::string s = "ERROR - DDDividedGeometryObject::checkNDivAndWidth()";
67  s += "\n Division of LogicalPart " + div_.parent().name().name();
68  s += " has too big an offset.";
69 
70  std::cout << compWidth_ << std::endl;
71  throw cms::Exception("DDException") << s;
72  }
73 }

References compNDiv_, compWidth_, gather_cfg::cout, div_, divisionType_, DivNDIVandWIDTH, Exception, DDName::name(), DDBase< N, C >::name(), DDDivision::offset(), DDDivision::parent(), alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and tolerance().

Referenced by checkParametersValidity().

◆ checkOffset()

void DDDividedGeometryObject::checkOffset ( double  maxPar)
protected

Definition at line 54 of file DDDividedGeometryObject.cc.

54  {
55  if (div_.offset() >= maxPar) {
56  std::string s = "DDDividedGeometryObject::checkOffset() IllegalConstruct";
57  s += "\nERROR - DDDividedGeometryObject::checkOffset()";
58  s += "\n failed.";
59  s += " Too big an offset.";
60  throw cms::Exception("DDException") << s;
61  }
62 }

References div_, Exception, DDDivision::offset(), alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by checkParametersValidity().

◆ checkParametersValidity()

void DDDividedGeometryObject::checkParametersValidity ( void  )
protectedvirtual

Reimplemented in DDDividedPolyconeZ, DDDividedPolyhedraZ, DDDividedTrdZ, DDDividedPolyconePhi, DDDividedPolyhedraPhi, DDDividedTrdY, DDDividedPolyconeRho, DDDividedPolyhedraRho, and DDDividedTrdX.

Definition at line 41 of file DDDividedGeometryObject.cc.

41  {
42  double maxPar = getMaxParameter();
43  checkOffset(maxPar);
44  checkNDivAndWidth(maxPar);
45  if (!div_.parent().isDefined().second) {
46  std::string s = "DDDividedGeometryObject::checkParametersValidity() :";
47  s += "\n ERROR - the LogicalPart of the parent must be ";
48  s += "\n defined before a division can occur.";
49  s += "\n Parent= " + div_.parent().toString();
50  throw cms::Exception("DDException") << s;
51  }
52 }

References checkNDivAndWidth(), checkOffset(), div_, Exception, getMaxParameter(), DDBase< N, C >::isDefined(), DDDivision::parent(), alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and DDBase< N, C >::toString().

Referenced by DDDividedPolyconeRho::checkParametersValidity(), DDDividedPolyhedraRho::checkParametersValidity(), DDDividedTrdX::checkParametersValidity(), DDDividedPolyconePhi::checkParametersValidity(), DDDividedPolyhedraPhi::checkParametersValidity(), DDDividedTrdY::checkParametersValidity(), DDDividedPolyconeZ::checkParametersValidity(), DDDividedPolyhedraZ::checkParametersValidity(), DDDividedTrdZ::checkParametersValidity(), DDDividedBoxX::DDDividedBoxX(), DDDividedBoxY::DDDividedBoxY(), DDDividedBoxZ::DDDividedBoxZ(), DDDividedConsPhi::DDDividedConsPhi(), DDDividedConsRho::DDDividedConsRho(), DDDividedConsZ::DDDividedConsZ(), DDDividedTubsPhi::DDDividedTubsPhi(), DDDividedTubsRho::DDDividedTubsRho(), and DDDividedTubsZ::DDDividedTubsZ().

◆ execute()

void DDDividedGeometryObject::execute ( void  )
virtual

◆ getMaxParameter()

double DDDividedGeometryObject::getMaxParameter ( void  ) const
protectedvirtual

◆ getType()

const std::string & DDDividedGeometryObject::getType ( void  ) const
virtual

Definition at line 83 of file DDDividedGeometryObject.cc.

83 { return ftype_; }

References ftype_.

◆ makeDDLogicalPart()

DDLogicalPart DDDividedGeometryObject::makeDDLogicalPart ( int  copyNo) const
virtual

◆ makeDDRotation()

DDRotation DDDividedGeometryObject::makeDDRotation ( int  copyNo) const
virtual

◆ makeDDTranslation()

DDTranslation DDDividedGeometryObject::makeDDTranslation ( int  copyNo) const
virtual

◆ setType()

void DDDividedGeometryObject::setType ( const std::string &  type)
virtual

◆ tolerance()

const double DDDividedGeometryObject::tolerance ( void  )
static

Definition at line 75 of file DDDividedGeometryObject.cc.

75  {
76  // this can come from some global tolerance if you want.
77  static const double tol = 1.0 / 1000.00;
78  return tol;
79 }

Referenced by checkNDivAndWidth(), DDDividedTrdX::checkParametersValidity(), DDDividedTrdY::checkParametersValidity(), and DDDividedGeometryObject().

◆ volumeFirstCopyNo()

int DDDividedGeometryObject::volumeFirstCopyNo ( void  ) const

Member Data Documentation

◆ compNDiv_

int DDDividedGeometryObject::compNDiv_
protected

◆ compWidth_

double DDDividedGeometryObject::compWidth_
protected

Definition at line 56 of file DDDividedGeometryObject.h.

Referenced by checkNDivAndWidth(), DDDividedBoxX::DDDividedBoxX(), DDDividedBoxY::DDDividedBoxY(), DDDividedBoxZ::DDDividedBoxZ(), DDDividedConsPhi::DDDividedConsPhi(), DDDividedConsRho::DDDividedConsRho(), DDDividedConsZ::DDDividedConsZ(), DDDividedPolyconePhi::DDDividedPolyconePhi(), DDDividedPolyconeRho::DDDividedPolyconeRho(), DDDividedPolyconeZ::DDDividedPolyconeZ(), DDDividedPolyhedraPhi::DDDividedPolyhedraPhi(), DDDividedPolyhedraRho::DDDividedPolyhedraRho(), DDDividedPolyhedraZ::DDDividedPolyhedraZ(), DDDividedTrdX::DDDividedTrdX(), DDDividedTrdY::DDDividedTrdY(), DDDividedTrdZ::DDDividedTrdZ(), DDDividedTubsPhi::DDDividedTubsPhi(), DDDividedTubsRho::DDDividedTubsRho(), DDDividedTubsZ::DDDividedTubsZ(), DDDividedTubsRho::makeDDLogicalPart(), DDDividedConsRho::makeDDLogicalPart(), DDDividedBoxX::makeDDLogicalPart(), DDDividedTrdX::makeDDLogicalPart(), DDDividedTubsPhi::makeDDLogicalPart(), DDDividedBoxY::makeDDLogicalPart(), DDDividedConsPhi::makeDDLogicalPart(), DDDividedTrdY::makeDDLogicalPart(), DDDividedPolyconePhi::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedConsZ::makeDDLogicalPart(), DDDividedTubsZ::makeDDLogicalPart(), DDDividedBoxZ::makeDDLogicalPart(), DDDividedTrdZ::makeDDLogicalPart(), DDDividedPolyconeZ::makeDDLogicalPart(), DDDividedTubsPhi::makeDDRotation(), DDDividedConsPhi::makeDDRotation(), DDDividedPolyhedraPhi::makeDDRotation(), DDDividedPolyconePhi::makeDDRotation(), DDDividedBoxX::makeDDTranslation(), DDDividedTrdX::makeDDTranslation(), DDDividedBoxY::makeDDTranslation(), DDDividedTrdY::makeDDTranslation(), DDDividedBoxZ::makeDDTranslation(), DDDividedConsZ::makeDDTranslation(), DDDividedTubsZ::makeDDTranslation(), and DDDividedTrdZ::makeDDTranslation().

◆ cpv_

DDCompactView* DDDividedGeometryObject::cpv_
protected

Definition at line 59 of file DDDividedGeometryObject.h.

Referenced by execute().

◆ div_

DDDivision DDDividedGeometryObject::div_
protected

Definition at line 53 of file DDDividedGeometryObject.h.

Referenced by checkNDivAndWidth(), checkOffset(), DDDividedPolyhedraRho::checkParametersValidity(), DDDividedPolyconeRho::checkParametersValidity(), DDDividedTrdX::checkParametersValidity(), DDDividedTrdY::checkParametersValidity(), DDDividedPolyhedraPhi::checkParametersValidity(), DDDividedTrdZ::checkParametersValidity(), DDDividedPolyconeZ::checkParametersValidity(), DDDividedPolyhedraZ::checkParametersValidity(), checkParametersValidity(), DDDividedBoxX::DDDividedBoxX(), DDDividedBoxY::DDDividedBoxY(), DDDividedBoxZ::DDDividedBoxZ(), DDDividedConsPhi::DDDividedConsPhi(), DDDividedConsRho::DDDividedConsRho(), DDDividedConsZ::DDDividedConsZ(), DDDividedGeometryObject(), DDDividedPolyconePhi::DDDividedPolyconePhi(), DDDividedPolyconeRho::DDDividedPolyconeRho(), DDDividedPolyconeZ::DDDividedPolyconeZ(), DDDividedPolyhedraPhi::DDDividedPolyhedraPhi(), DDDividedPolyhedraRho::DDDividedPolyhedraRho(), DDDividedPolyhedraZ::DDDividedPolyhedraZ(), DDDividedTrdX::DDDividedTrdX(), DDDividedTrdY::DDDividedTrdY(), DDDividedTrdZ::DDDividedTrdZ(), DDDividedTubsPhi::DDDividedTubsPhi(), DDDividedTubsRho::DDDividedTubsRho(), DDDividedTubsZ::DDDividedTubsZ(), execute(), DDDividedTubsRho::getMaxParameter(), DDDividedBoxX::getMaxParameter(), DDDividedConsRho::getMaxParameter(), DDDividedPolyconeRho::getMaxParameter(), DDDividedPolyhedraRho::getMaxParameter(), DDDividedTrdX::getMaxParameter(), DDDividedConsPhi::getMaxParameter(), DDDividedTubsPhi::getMaxParameter(), DDDividedBoxY::getMaxParameter(), DDDividedPolyconePhi::getMaxParameter(), DDDividedTrdY::getMaxParameter(), DDDividedPolyhedraPhi::getMaxParameter(), DDDividedBoxZ::getMaxParameter(), DDDividedTubsZ::getMaxParameter(), DDDividedConsZ::getMaxParameter(), DDDividedTrdZ::getMaxParameter(), DDDividedPolyconeZ::getMaxParameter(), DDDividedPolyhedraZ::getMaxParameter(), DDDividedTubsRho::makeDDLogicalPart(), DDDividedBoxX::makeDDLogicalPart(), DDDividedConsRho::makeDDLogicalPart(), DDDividedPolyconeRho::makeDDLogicalPart(), DDDividedPolyhedraRho::makeDDLogicalPart(), DDDividedTrdX::makeDDLogicalPart(), makeDDLogicalPart(), DDDividedBoxY::makeDDLogicalPart(), DDDividedTubsPhi::makeDDLogicalPart(), DDDividedConsPhi::makeDDLogicalPart(), DDDividedTrdY::makeDDLogicalPart(), DDDividedPolyhedraPhi::makeDDLogicalPart(), DDDividedPolyconePhi::makeDDLogicalPart(), DDDividedConsZ::makeDDLogicalPart(), DDDividedBoxZ::makeDDLogicalPart(), DDDividedTubsZ::makeDDLogicalPart(), DDDividedPolyhedraZ::makeDDLogicalPart(), DDDividedPolyconeZ::makeDDLogicalPart(), DDDividedTrdZ::makeDDLogicalPart(), DDDividedConsPhi::makeDDRotation(), DDDividedTubsPhi::makeDDRotation(), DDDividedPolyconePhi::makeDDRotation(), DDDividedPolyhedraPhi::makeDDRotation(), DDDividedBoxX::makeDDTranslation(), DDDividedTrdX::makeDDTranslation(), DDDividedBoxY::makeDDTranslation(), DDDividedTrdY::makeDDTranslation(), DDDividedTubsZ::makeDDTranslation(), DDDividedConsZ::makeDDTranslation(), DDDividedBoxZ::makeDDTranslation(), DDDividedTrdZ::makeDDTranslation(), DDDividedPolyconeZ::makeDDTranslation(), and DDDividedPolyhedraZ::makeDDTranslation().

◆ divisionType_

DivisionType DDDividedGeometryObject::divisionType_
protected

◆ ftype_

std::string DDDividedGeometryObject::ftype_
protected

Definition at line 54 of file DDDividedGeometryObject.h.

Referenced by getType(), and setType().

◆ theVoluFirstCopyNo_

int DDDividedGeometryObject::theVoluFirstCopyNo_
protected

Definition at line 58 of file DDDividedGeometryObject.h.

Referenced by execute().

DDDividedGeometryObject::checkNDivAndWidth
void checkNDivAndWidth(double maxPar)
Definition: DDDividedGeometryObject.cc:64
DDDividedGeometryObject::compWidth_
double compWidth_
Definition: DDDividedGeometryObject.h:56
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
mps_fire.i
i
Definition: mps_fire.py:428
DDDivision::width
double width() const
Definition: DDDivision.cc:53
DDDividedGeometryObject::makeDDRotation
virtual DDRotation makeDDRotation(int copyNo) const
Definition: DDDividedGeometryObject.cc:93
DDBase::isDefined
def_type isDefined() const
Definition: DDBase.h:90
DDDividedGeometryObject::cpv_
DDCompactView * cpv_
Definition: DDDividedGeometryObject.h:59
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DDDividedGeometryObject::tolerance
static const double tolerance(void)
Definition: DDDividedGeometryObject.cc:75
DDDividedGeometryObject::checkOffset
void checkOffset(double maxPar)
Definition: DDDividedGeometryObject.cc:54
DDDividedGeometryObject::ftype_
std::string ftype_
Definition: DDDividedGeometryObject.h:54
DDDividedGeometryObject::makeDDLogicalPart
virtual DDLogicalPart makeDDLogicalPart(int copyNo) const
Definition: DDDividedGeometryObject.cc:97
DivWIDTH
Definition: DDDividedGeometryObject.h:14
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DivNDIV
Definition: DDDividedGeometryObject.h:14
DDBase::toString
std::string toString() const
Definition: DDBase.h:63
DivNDIVandWIDTH
Definition: DDDividedGeometryObject.h:14
DDDividedGeometryObject::getMaxParameter
virtual double getMaxParameter(void) const
Definition: DDDividedGeometryObject.cc:91
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDDividedGeometryObject::div_
DDDivision div_
Definition: DDDividedGeometryObject.h:53
DDDividedGeometryObject::compNDiv_
int compNDiv_
Definition: DDDividedGeometryObject.h:55
DDDividedGeometryObject::divisionType_
DivisionType divisionType_
Definition: DDDividedGeometryObject.h:57
createfilelist.int
int
Definition: createfilelist.py:10
DDDivision::offset
double offset() const
Definition: DDDivision.cc:55
DDName::name
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
DDDivision::nReplicas
int nReplicas() const
Definition: DDDivision.cc:51
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Exception
Definition: hltDiff.cc:245
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
DDDividedGeometryObject::theVoluFirstCopyNo_
int theVoluFirstCopyNo_
Definition: DDDividedGeometryObject.h:58
DDCompactView::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Definition: DDCompactView.cc:76
DDDivision::parent
const DDLogicalPart & parent() const
Definition: DDDivision.cc:57
DDDividedGeometryObject::makeDDTranslation
virtual DDTranslation makeDDTranslation(int copyNo) const
Definition: DDDividedGeometryObject.cc:95