16 #include "CLHEP/Units/GlobalSystemOfUnits.h"
23 std::vector<double> localrMaxVec = msol.
rMaxVec();
24 std::vector<double> localrMinVec = msol.
rMinVec();
26 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];
90 DCOUT_V (
'P',
"DDDividedPolyconeRho::makeDDRotation : " << myddrot);
109 std::vector<double> localrMaxVec = msol.
rMaxVec();
110 std::vector<double> localrMinVec = msol.rMinVec();
111 std::vector<double> localzVec = msol.zVec();
113 int nZplanes = localzVec.size();
115 std::vector<double> newrMinVec;
116 std::vector<double> newrMaxVec;
119 for(
int ii = 0; ii < nZplanes; ++ii)
127 newrMinVec.push_back(localrMinVec[ii]+
div_.
offset()+width*copyNo);
128 newrMaxVec.push_back(localrMinVec[ii]+
div_.
offset()+width*(copyNo+1));
141 DCOUT_V (
'P',
" DDDividedPolyconeRho::makeDDLogicalPart() lp:" << ddlp);
150 setType(
"DivisionPolyconePhi" );
200 myddrot =
DDrot( ddrotname, rotMat );
202 DCOUT_V(
'P',
"DDDividedPolyconePhi::makeDDRotation : " << myddrot );
221 std::vector<double> localrMaxVec = msol.
rMaxVec();
222 std::vector<double> localrMinVec = msol.rMinVec();
223 std::vector<double> localzVec = msol.zVec();
228 if( !sol.isDefined().second )
242 DCOUT_V(
'P',
" DDDividedPolyconePhi::makeDDLogicalPart() lp:" << ddlp );
251 std::vector<double> localrMaxVec = msol.
rMaxVec();
252 std::vector<double> localrMinVec = msol.
rMinVec();
253 std::vector<double> localzVec = msol.
zVec();
280 std::vector<double> localzVec = msol.
zVec();
286 tempNDiv =
calculateNDiv( localzVec[localzVec.size() - 1] - localzVec[0]
289 if ((msol.
zVec().size() - 1) != tempNDiv)
291 std::string
s =
"ERROR - DDDividedPolyconeZ::checkParametersValidity()";
292 s +=
"\n\tDivision along Z will be done splitting in the defined";
293 s +=
"\n\tz_planes, i.e, the number of division would be :";
305 std::vector<double> localzVec = msol.
zVec();
307 return (localzVec[ localzVec.size() - 1] - localzVec[0]);
314 DCOUT_V (
'P',
"DDDividedPolyconeZ::makeDDRotation : " << myddrot);
323 std::vector<double> localzVec = msol.
zVec();
324 double posi = (localzVec[copyNo] + localzVec[copyNo+1]) / 2;
325 translation.SetZ(posi);
337 std::vector<double> localrMaxVec = msol.
rMaxVec();
338 std::vector<double> localrMinVec = msol.rMinVec();
339 std::vector<double> localzVec = msol.zVec();
345 localrMinVec[copyNo],
346 localrMaxVec[copyNo],
347 localrMinVec[copyNo+1],
348 localrMaxVec[copyNo+1],
354 DCOUT_V(
'P',
" DDDividedPolyconeZ::makeDDLogicalPart() lp:" << ddlp );
def_type isDefined() const
virtual DDTranslation makeDDTranslation(const int copyNo) const
static std::string itostr(int i)
WARNING: abused by other classes in this system: yet another conversion from int to std::string...
DDDividedPolyconeRho(const DDDivision &div, DDCompactView *cpv)
DDMaterial is used to define and access material information.
std::vector< double > rMaxVec(void) const
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
static DDSolid cons(const DDName &name, double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double phiFrom, double deltaPhi)
virtual double getMaxParameter() const
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 ~DDDividedPolyconeRho()
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
virtual ~DDDividedPolyconeZ()
virtual DDTranslation makeDDTranslation(const int copyNo) const
double calculateWidth(double motherDim, int nDiv, double offset) const
virtual DDRotation makeDDRotation(const int copyNo) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
virtual double getMaxParameter() const
virtual DDTranslation makeDDTranslation(const int copyNo) const
type of data representation of DDCompactView
virtual void checkParametersValidity()
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.
virtual DDRotation makeDDRotation(const int copyNo) const
virtual ~DDDividedPolyconePhi()
DivisionType divisionType_
std::vector< double > rMinVec(void) const
virtual void checkParametersValidity()
virtual DDRotation makeDDRotation(const int copyNo) const
double deltaPhi(void) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual void setType(const std::string &type)
DDDividedPolyconeZ(const DDDivision &div, DDCompactView *cpv)
#define DCOUT_V(M_v_Y, M_v_S)
virtual void checkParametersValidity()
DDDividedPolyconePhi(const DDDivision &div, DDCompactView *cpv)
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
const DDLogicalPart & parent() const
virtual double getMaxParameter() 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.
std::vector< double > zVec(void) const
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
DDRotationMatrix * changeRotMatrix(double rotZ=0.) const