#include <DetectorDescription/Parser/src/DDDividedCons.h>
Public Member Functions | |
DDDividedConsRho (const DDDivision &div) | |
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 | ~DDDividedConsRho () |
Definition at line 14 of file DDDividedCons.h.
DDDividedConsRho::DDDividedConsRho | ( | const DDDivision & | div | ) |
Definition at line 26 of file DDDividedCons.cc.
References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, GenMuonPlsPt100GeV_cfg::cout, DCOUT_V, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, lat::endl(), DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rInPlusZ(), DDCons::rOutMinusZ(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().
00027 : DDDividedGeometryObject::DDDividedGeometryObject (div) 00028 { 00029 checkParametersValidity(); 00030 setType( "DivisionConsRho" ); 00031 DDCons msol = (DDCons)(div_.parent().solid()); 00032 00033 if( msol.rInPlusZ() == 0. ) 00034 { 00035 std::cout << "WARNING - DDDividedConsRho, rOutMinusZ = 0. " 00036 << std::endl 00037 << " Width is calculated as that of rOutMinusZ !" 00038 << std::endl; 00039 } 00040 00041 if( divisionType_ == DivWIDTH ) 00042 { 00043 compNDiv_ = calculateNDiv( msol.rOutMinusZ() 00044 - msol.rInMinusZ(), div_.width(), div_.offset() ); 00045 } 00046 else if( divisionType_ == DivNDIV ) 00047 { 00048 DDCons msol = (DDCons)(div_.parent().solid()); 00049 compWidth_ = calculateWidth( msol.rOutMinusZ() - msol.rInMinusZ() 00050 , div_.nReplicas() 00051 , div_.offset() ); 00052 } 00053 00054 DCOUT_V ('P', " DDDividedConsRho - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_); 00055 00056 }
DDDividedConsRho::~DDDividedConsRho | ( | ) | [virtual] |
double DDDividedConsRho::getMaxParameter | ( | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 64 of file DDDividedCons.cc.
References DDDividedGeometryObject::div_, DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rOutMinusZ(), and DDLogicalPart::solid().
00065 { 00066 DDCons msol = (DDCons)(div_.parent().solid()); 00067 return msol.rOutMinusZ() - msol.rInMinusZ(); 00068 00069 }
DDLogicalPart DDDividedConsRho::makeDDLogicalPart | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 89 of file DDDividedCons.cc.
References DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DDSolidFactory::cons(), DCOUT_V, ddcons, DDBase< N, C >::ddname(), DDDividedGeometryObject::div_, DDXMLElement::itostr(), DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), and DDLogicalPart::solid().
00090 { 00091 DDName solname(div_.parent().ddname().name() + "_DIVCHILD" 00092 + DDXMLElement::itostr(copyNo) 00093 , div_.parent().ddname().ns()); 00094 DDSolid ddcons(solname); 00095 DDMaterial usemat(div_.parent().material()); 00096 DDCons msol = (DDCons)(div_.parent().solid()); 00097 00098 double pRMin1 = msol.rInMinusZ() + div_.offset() + compWidth_ * copyNo; 00099 double pRMax1 = msol.rInMinusZ() + div_.offset() + compWidth_ * (copyNo+1); 00100 00101 //width at Z Plus 00102 //- double compWidth_Plus = 00103 // compWidth_ * ( msol.rOutPlusZ()/ msol.rInPlusZ()) 00104 //- / ( msol.rOutMinusZ() - msol.rInMinusZ()); 00105 double compWidth_Plus = calculateWidth( msol.rOutPlusZ() 00106 - msol.rInPlusZ(), compNDiv_, div_.offset() ); 00107 double pRMin2 = msol.rInPlusZ() 00108 + div_.offset() + compWidth_Plus * copyNo; 00109 double pRMax2 = msol.rInPlusZ() 00110 + div_.offset() + compWidth_Plus * (copyNo+1); 00111 double pDz = msol.zhalf(); 00112 00113 double pSPhi = msol.phiFrom(); 00114 double pDPhi = msol.deltaPhi(); 00115 00116 ddcons = DDSolidFactory::cons(DDName(solname), pDz, pRMin1, pRMax1 00117 , pRMin2, pRMax2, pSPhi, pDPhi); 00118 00119 DDLogicalPart ddlp = DDLogicalPart(solname, usemat, ddcons); 00120 DCOUT_V ('P', " DDDividedConsRho::makeDDLogicalPart() lp:" << ddlp); 00121 return ddlp; 00122 00123 }
DDRotation DDDividedConsRho::makeDDRotation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 72 of file DDDividedCons.cc.
References DCOUT_V.
00073 { 00074 DDRotation myddrot; // sets to identity. 00075 DCOUT_V ('P', "DDDividedConsRho::makeDDRotation : " << myddrot); 00076 return myddrot; 00077 }
DDTranslation DDDividedConsRho::makeDDTranslation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 80 of file DDDividedCons.cc.
References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, and DDAxesNames::name().
00081 { 00082 //----- translation 00083 DDTranslation translation; 00084 DCOUT_V ('P', " DDDividedConsRho " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis())); 00085 return translation; 00086 }