21 using namespace geant_units::operators;
27 std::vector<double> localrMaxVec = msol.
rMaxVec();
28 std::vector<double> localrMinVec = msol.
rMinVec();
50 <<
"DDDividedPolyconeRho::checkParametersValidity()" << std::endl
51 <<
" Solid " << msol << std::endl
52 <<
" Division along r will be done with a width "
53 <<
"different for each solid section." << std::endl
54 <<
" WIDTH will not be used !" << std::endl;
58 <<
"DDDividedPolyconeRho::checkParametersValidity()" << std::endl
59 <<
" Solid " << msol << std::endl
60 <<
" Division along R will be done with a width "
61 <<
"different for each solid section." << std::endl
62 <<
" OFFSET will not be used !" << std::endl;
68 std::vector<double> localrMaxVec = msol.
rMaxVec();
69 std::vector<double> localrMinVec = msol.
rMinVec();
71 return localrMaxVec[0] - localrMinVec[0];
89 std::vector<double> localrMaxVec = msol.
rMaxVec();
90 std::vector<double> localrMinVec = msol.rMinVec();
91 std::vector<double> localzVec = msol.zVec();
93 int nZplanes = localzVec.size();
95 std::vector<double> newrMinVec;
96 std::vector<double> newrMaxVec;
99 for (
int ii = 0;
ii < nZplanes; ++
ii) {
101 newrMinVec.emplace_back(localrMinVec[ii] +
div_.
offset() + width * copyNo);
102 newrMaxVec.emplace_back(localrMinVec[ii] +
div_.
offset() + width * (copyNo + 1));
106 ddpolycone =
DDSolidFactory::polycone(solname, msol.startPhi(), msol.deltaPhi(), localzVec, newrMinVec, newrMaxVec);
116 setType(
"DivisionPolyconePhi");
164 std::vector<double> localrMaxVec = msol.
rMaxVec();
165 std::vector<double> localrMinVec = msol.rMinVec();
166 std::vector<double> localzVec = msol.zVec();
170 if (!sol.isDefined().second) {
186 std::vector<double> localrMaxVec = msol.
rMaxVec();
187 std::vector<double> localrMinVec = msol.
rMinVec();
188 std::vector<double> localzVec = msol.
zVec();
201 std::vector<double> localzVec = msol.
zVec();
208 if ((msol.
zVec().size() - 1) != tempNDiv) {
209 std::string s =
"ERROR - DDDividedPolyconeZ::checkParametersValidity()";
210 s +=
"\n\tDivision along Z will be done splitting in the defined";
211 s +=
"\n\tz_planes, i.e, the number of division would be :";
212 s +=
"\n\t" + std::to_string(msol.
zVec().size() - 1);
213 s +=
"\n\tinstead of " + std::to_string(tempNDiv) +
" !\n";
221 std::vector<double> localzVec = msol.
zVec();
223 return (localzVec[localzVec.size() - 1] - localzVec[0]);
234 std::vector<double> localzVec = msol.
zVec();
235 double posi = (localzVec[copyNo] + localzVec[copyNo + 1]) / 2;
236 translation.SetZ(posi);
245 std::vector<double> localrMaxVec = msol.
rMaxVec();
246 std::vector<double> localrMinVec = msol.rMinVec();
247 std::vector<double> localzVec = msol.zVec();
252 localrMinVec[copyNo],
253 localrMaxVec[copyNo],
254 localrMinVec[copyNo + 1],
255 localrMaxVec[copyNo + 1],
def_type isDefined() const
DDTranslation makeDDTranslation(int copyNo) const override
void checkParametersValidity() override
DDTranslation makeDDTranslation(int copyNo) const override
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)
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
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.
Compact representation of the geometrical detector hierarchy.
DDRotation makeDDRotation(int copyNo) const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
DDRotation makeDDRotation(int copyNo) const override
Represents a uniquely identifyable rotation matrix.
double getMaxParameter() const override
DivisionType divisionType_
std::vector< double > rMinVec(void) const
DDRotation makeDDRotation(int copyNo) const override
void checkParametersValidity() override
double deltaPhi(void) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual void setType(const std::string &type)
double getMaxParameter() const override
DDTranslation makeDDTranslation(int copyNo) const override
DDDividedPolyconeZ(const DDDivision &div, DDCompactView *cpv)
std::unique_ptr< DDRotationMatrix > changeRotMatrix(double rotZ=0.) const
DDDividedPolyconePhi(const DDDivision &div, DDCompactView *cpv)
DDLogicalPart makeDDLogicalPart(int copyNo) const override
const DDLogicalPart & parent() const
double getMaxParameter() const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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