2 #include "CLHEP/Units/GlobalSystemOfUnits.h" 3 #include "CLHEP/Units/SystemOfUnits.h" 27 std::vector<double> localrMaxVec = msol.
rMaxVec();
28 std::vector<double> localrMinVec = msol.
rMinVec();
30 setType(
"DivisionPolyconeRho" );
56 <<
"DDDividedPolyconeRho::checkParametersValidity()" 58 <<
" Solid " << msol << std::endl
59 <<
" Division along r will be done with a width " 60 <<
"different for each solid section." << std::endl
61 <<
" WIDTH will not be used !" << std::endl;
66 <<
"DDDividedPolyconeRho::checkParametersValidity()" 68 <<
" Solid " << msol << std::endl
69 <<
" Division along R will be done with a width " 70 <<
"different for each solid section." << std::endl
71 <<
" OFFSET will not be used !" << std::endl;
79 std::vector<double> localrMaxVec = msol.
rMaxVec();
80 std::vector<double> localrMinVec = msol.
rMinVec();
82 return localrMaxVec[0] - localrMinVec[0];
107 std::vector<double> localrMaxVec = msol.
rMaxVec();
108 std::vector<double> localrMinVec = msol.rMinVec();
109 std::vector<double> localzVec = msol.zVec();
111 int nZplanes = localzVec.size();
113 std::vector<double> newrMinVec;
114 std::vector<double> newrMaxVec;
117 for(
int ii = 0;
ii < nZplanes; ++
ii)
125 newrMinVec.emplace_back(localrMinVec[ii]+
div_.
offset()+width*copyNo);
126 newrMaxVec.emplace_back(localrMinVec[ii]+
div_.
offset()+width*(copyNo+1));
147 setType(
"DivisionPolyconePhi" );
192 myddrot =
DDrot( ddrotname, rotMat );
212 std::vector<double> localrMaxVec = msol.
rMaxVec();
213 std::vector<double> localrMinVec = msol.rMinVec();
214 std::vector<double> localzVec = msol.zVec();
219 if( !sol.isDefined().second )
229 if( !ddlp.isDefined().second )
242 std::vector<double> localrMaxVec = msol.
rMaxVec();
243 std::vector<double> localrMinVec = msol.
rMinVec();
244 std::vector<double> localzVec = msol.
zVec();
266 std::vector<double> localzVec = msol.
zVec();
272 tempNDiv =
calculateNDiv( localzVec[localzVec.size() - 1] - localzVec[0]
275 if ((msol.
zVec().size() - 1) != tempNDiv)
277 std::string s =
"ERROR - DDDividedPolyconeZ::checkParametersValidity()";
278 s +=
"\n\tDivision along Z will be done splitting in the defined";
279 s +=
"\n\tz_planes, i.e, the number of division would be :";
280 s +=
"\n\t" + std::to_string( msol.
zVec().size() - 1 );
281 s +=
"\n\tinstead of " + std::to_string(tempNDiv) +
" !\n";
291 std::vector<double> localzVec = msol.
zVec();
293 return (localzVec[ localzVec.size() - 1] - localzVec[0]);
308 std::vector<double> localzVec = msol.
zVec();
309 double posi = (localzVec[copyNo] + localzVec[copyNo+1]) / 2;
310 translation.SetZ(posi);
322 std::vector<double> localrMaxVec = msol.
rMaxVec();
323 std::vector<double> localrMinVec = msol.rMinVec();
324 std::vector<double> localzVec = msol.zVec();
330 localrMinVec[copyNo],
331 localrMaxVec[copyNo],
332 localrMinVec[copyNo+1],
333 localrMaxVec[copyNo+1],
void checkParametersValidity() override
void checkParametersValidity() override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
DDDividedPolyconeRho(const DDDivision &div, DDCompactView *cpv)
DDMaterial is used to define and access material information.
std::vector< double > rMaxVec(void) const
DDRotation makeDDRotation(int copyNo) const override
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
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
DDRotation makeDDRotation(int copyNo) const override
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
double getMaxParameter() const override
double calculateWidth(double motherDim, int nDiv, double offset) const
double getMaxParameter() const override
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
DDTranslation makeDDTranslation(int copyNo) const override
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
DDTranslation makeDDTranslation(int copyNo) const override
double getMaxParameter() const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
DivisionType divisionType_
std::vector< double > rMinVec(void) const
void checkParametersValidity() override
double deltaPhi(void) const
DDTranslation makeDDTranslation(int copyNo) const override
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual void setType(const std::string &type)
DDDividedPolyconeZ(const DDDivision &div, DDCompactView *cpv)
DDDividedPolyconePhi(const DDDivision &div, DDCompactView *cpv)
const DDLogicalPart & parent() const
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.
DDLogicalPart makeDDLogicalPart(int copyNo) const override
std::vector< double > zVec(void) const
DDRotation makeDDRotation(int copyNo) const override
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const