9 #include "CLHEP/Units/GlobalSystemOfUnits.h"
10 #include "CLHEP/Units/SystemOfUnits.h"
28 std::vector<double> localrMaxVec = msol.
rMaxVec();
29 std::vector<double> localrMinVec = msol.
rMinVec();
31 setType(
"DivisionPolyconeRho" );
57 <<
"DDDividedPolyconeRho::checkParametersValidity()"
59 <<
" Solid " << msol << std::endl
60 <<
" Division along r will be done with a width "
61 <<
"different for each solid section." << std::endl
62 <<
" WIDTH will not be used !" << std::endl;
67 <<
"DDDividedPolyconeRho::checkParametersValidity()"
69 <<
" Solid " << msol << std::endl
70 <<
" Division along R will be done with a width "
71 <<
"different for each solid section." << std::endl
72 <<
" OFFSET will not be used !" << std::endl;
80 std::vector<double> localrMaxVec = msol.
rMaxVec();
81 std::vector<double> localrMinVec = msol.
rMinVec();
83 return localrMaxVec[0] - localrMinVec[0];
108 std::vector<double> localrMaxVec = msol.
rMaxVec();
109 std::vector<double> localrMinVec = msol.rMinVec();
110 std::vector<double> localzVec = msol.zVec();
112 int nZplanes = localzVec.size();
114 std::vector<double> newrMinVec;
115 std::vector<double> newrMaxVec;
118 for(
int ii = 0;
ii < nZplanes; ++
ii)
126 newrMinVec.push_back(localrMinVec[ii]+
div_.
offset()+width*copyNo);
127 newrMaxVec.push_back(localrMinVec[ii]+
div_.
offset()+width*(copyNo+1));
148 setType(
"DivisionPolyconePhi" );
193 myddrot =
DDrot( ddrotname, rotMat );
213 std::vector<double> localrMaxVec = msol.
rMaxVec();
214 std::vector<double> localrMinVec = msol.rMinVec();
215 std::vector<double> localzVec = msol.zVec();
220 if( !sol.isDefined().second )
243 std::vector<double> localrMaxVec = msol.
rMaxVec();
244 std::vector<double> localrMinVec = msol.
rMinVec();
245 std::vector<double> localzVec = msol.
zVec();
267 std::vector<double> localzVec = msol.
zVec();
273 tempNDiv =
calculateNDiv( localzVec[localzVec.size() - 1] - localzVec[0]
276 if ((msol.
zVec().size() - 1) != tempNDiv)
278 std::string s =
"ERROR - DDDividedPolyconeZ::checkParametersValidity()";
279 s +=
"\n\tDivision along Z will be done splitting in the defined";
280 s +=
"\n\tz_planes, i.e, the number of division would be :";
281 s +=
"\n\t" + std::to_string( msol.
zVec().size() - 1 );
282 s +=
"\n\tinstead of " + std::to_string(tempNDiv) +
" !\n";
292 std::vector<double> localzVec = msol.
zVec();
294 return (localzVec[ localzVec.size() - 1] - localzVec[0]);
309 std::vector<double> localzVec = msol.
zVec();
310 double posi = (localzVec[copyNo] + localzVec[copyNo+1]) / 2;
311 translation.SetZ(posi);
323 std::vector<double> localrMaxVec = msol.
rMaxVec();
324 std::vector<double> localrMinVec = msol.rMinVec();
325 std::vector<double> localzVec = msol.zVec();
331 localrMinVec[copyNo],
332 localrMaxVec[copyNo],
333 localrMinVec[copyNo+1],
334 localrMaxVec[copyNo+1],
def_type isDefined() const
virtual void checkParametersValidity() override
virtual void checkParametersValidity() override
DDDividedPolyconeRho(const DDDivision &div, DDCompactView *cpv)
DDMaterial is used to define and access material information.
std::vector< double > rMaxVec(void) const
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
virtual DDTranslation makeDDTranslation(const int copyNo) const override
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
int calculateNDiv(double motherDim, double width, double offset) const
virtual DDTranslation makeDDTranslation(const int copyNo) const override
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
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.
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
virtual DDRotation makeDDRotation(const int copyNo) const override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
virtual double getMaxParameter() const override
DivisionType divisionType_
std::vector< double > rMinVec(void) const
virtual void checkParametersValidity() override
virtual DDRotation makeDDRotation(const int copyNo) const override
double deltaPhi(void) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual void setType(const std::string &type)
virtual double getMaxParameter() const override
virtual DDTranslation makeDDTranslation(const int copyNo) const override
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
DDDividedPolyconeZ(const DDDivision &div, DDCompactView *cpv)
DDDividedPolyconePhi(const DDDivision &div, DDCompactView *cpv)
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
const DDLogicalPart & parent() const
virtual double getMaxParameter() const override
virtual DDRotation makeDDRotation(const int copyNo) const override
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< double > zVec(void) const
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const