11 #include "TGeoMatrix.h"
12 #include "TGeoShape.h"
13 #include "TRotation.h"
20 using namespace Geometry ;
45 double uv = u() *
v() ;
46 Vector3D uprime = ( u() - uv *
v() ).unit() ;
47 Vector3D vprime = (
v() - uv * u() ).unit() ;
48 double uup = u() * uprime ;
49 double vvp =
v() * vprime ;
51 return Vector2D( p*uprime / uup , p*vprime / vvp ) ;
56 Vector3D g = origin() + point[0] * u() + point[1] *
v() ;
81 if( volume()->GetShape()->Contains( o.
const_array() ) ){
83 dist_p = volume()->GetShape()->DistFromInside( const_cast<double*> ( o.
const_array() ) ,
85 dist_m = volume()->GetShape()->DistFromInside( const_cast<double*> ( o.
const_array() ) ,
86 const_cast<double*> ( um.
array() ) ) ;
97 dist_p = volume()->GetShape()->DistFromOutside( const_cast<double*> ( o.
const_array() ) ,
99 dist_m = volume()->GetShape()->DistFromOutside( const_cast<double*> ( o.
const_array() ) ,
100 const_cast<double*> ( um.
array() ) ) ;
113 dist_p += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_1.
const_array() ) ,
114 const_cast<double*> ( u_val.const_array() ) ) ;
116 dist_m += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_2.
const_array() ) ,
117 const_cast<double*> ( um.array() ) ) ;
125 return dist_p + dist_m ;
144 if( volume()->GetShape()->Contains( o.
const_array() ) ){
146 dist_p = volume()->GetShape()->DistFromInside( const_cast<double*> ( o.
const_array() ) ,
148 dist_m = volume()->GetShape()->DistFromInside( const_cast<double*> ( o.
const_array() ) ,
149 const_cast<double*> ( vm.
array() ) ) ;
160 dist_p = volume()->GetShape()->DistFromOutside( const_cast<double*> ( o.
const_array() ) ,
162 dist_m = volume()->GetShape()->DistFromOutside( const_cast<double*> ( o.
const_array() ) ,
163 const_cast<double*> ( vm.
array() ) ) ;
176 dist_p += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_1.
const_array() ) ,
177 const_cast<double*> ( v_val.const_array() ) ) ;
179 dist_m += volume()->GetShape()->DistFromInside( const_cast<double*> ( o_2.
const_array() ) ,
180 const_cast<double*> ( vm.array() ) ) ;
188 return dist_p + dist_m ;
199 double dist = std::abs ( distance( point ) ) ;
201 bool inShape = volume()->GetShape()->Contains( point.
const_array() ) ;
203 std::cout <<
" ** Surface::insideBound( " << point <<
" ) - distance = " << dist
204 <<
" origin = " << origin() <<
" normal = " << normal()
205 <<
" p * n = " << point * normal()
206 <<
" isInShape : " << inShape << std::endl ;
208 return dist < epsilon && inShape ;
212 return ( std::abs ( distance( point ) ) < epsilon ) && volume()->GetShape()->Contains( const_cast<double*> (point.
const_array() ) ) ;
220 std::vector< std::pair<Vector3D, Vector3D> > lines ;
243 return _surf->insideBounds( point, epsilon ) ;
246 return _surf->getLines(nMax) ;
253 return ( point - origin() ) * normal() ;
258 double thickness_inner ,
double thickness_outer,
Vector3D o ) :
295 while( phi < -
M_PI ) phi += 2.*
M_PI ;
296 while( phi >
M_PI ) phi -= 2.*
M_PI ;
304 double z = point.
v() +
origin().
z() ;
307 while( phi < -
M_PI ) phi += 2.*
M_PI ;
308 while( phi >
M_PI ) phi -= 2.*
M_PI ;
322 double thickness_inner ,
double thickness_outer,
Vector3D v_val,
Vector3D o_val ) :
326 Vector3D o_rphi( o_val.
x() , o_val.
y() , 0. ) ;
329 double dphi = v_val.
phi() - o_rphi.phi() ;
330 while( dphi < -
M_PI ) dphi += 2.*
M_PI ;
331 while( dphi >
M_PI ) dphi -= 2.*
M_PI ;
333 if( std::fabs( dphi ) > 1
e-6 ){
334 std::stringstream sst ; sst <<
"VolConeImpl::VolConeImpl() - incompatibel vector v and o given "
335 << v_val <<
" - " << o_val ;
336 throw std::runtime_error( sst.str() ) ;
339 double theta = v_val.
theta() ;
351 _ztip = o_val.
z() - tipoffset ;
353 double dist_p = vol->GetShape()->DistFromInside( const_cast<double*> ( o_val.
const_array() ) ,
356 double dist_m = vol->GetShape()->DistFromInside( const_cast<double*> ( o_val.
const_array() ) ,
357 const_cast<double*> ( vm.
array() ) ) ;
359 double costh = std::cos( theta) ;
360 _zt0 = tipoffset - dist_m * costh ;
361 _zt1 = tipoffset + dist_p * costh ;
382 return av.
cross( n ) ;
396 while( phi < -
M_PI ) phi += 2.*
M_PI ;
397 while( phi >
M_PI ) phi -= 2.*
M_PI ;
414 while( phi < -
M_PI ) phi += 2.*
M_PI ;
415 while( phi >
M_PI ) phi -= 2.*
M_PI ;
440 double zp = point.
z() -
_ztip ;
442 return r * std::cos(
_v.
theta() ) ;
449 std::vector< std::pair<DDSurfaces::Vector3D, DDSurfaces::Vector3D> > lines ;
451 lines.reserve( nMax ) ;
453 double theta =
v().
theta() ;
456 Vector3D zv( 0. , 0. , half_length ) ;
458 double dr = half_length * tan( theta ) ;
464 unsigned n = nMax / 4 ;
465 double dPhi = 2.* ROOT::Math::Pi() / double( n ) ;
467 for(
unsigned i = 0 ; i < n ; ++i ) {
469 Vector3D r0v0( r0*sin( i *dPhi ) , r0*cos( i *dPhi ) , 0. ) ;
470 Vector3D r0v1( r0*sin( (i+1)*dPhi ) , r0*cos( (i+1)*dPhi ) , 0. ) ;
472 Vector3D r1v0( r1*sin( i *dPhi ) , r1*cos( i *dPhi ) , 0. ) ;
473 Vector3D r1v1( r1*sin( (i+1)*dPhi ) , r1*cos( (i+1)*dPhi ) , 0. ) ;
480 lines.push_back( std::make_pair( pl0, pl1 ) ) ;
481 lines.push_back( std::make_pair( pl1, pl2 ) ) ;
482 lines.push_back( std::make_pair( pl2, pl3 ) ) ;
483 lines.push_back( std::make_pair( pl3, pl0 ) ) ;
503 for( SurfaceList::iterator i=begin(), n=end() ; i !=n ; ++i ) {
520 }
catch(
const std::runtime_error&
e){
534 volList.push_back( pv ) ;
553 const TGeoNode* node = pv.
ptr();
559 throw std::runtime_error(
"*** findVolume: Invalid placement: - node pointer Null ! " + std::string( pv.
name() ) );
565 for (Int_t idau = 0, ndau = node->GetNdaughters(); idau < ndau; ++idau) {
567 TGeoNode* daughter = node->GetDaughter(idau);
570 if ( !placement.
data() ) {
571 throw std::runtime_error(
"*** findVolume: Invalid not instrumented placement:"+std::string(daughter->GetName())
572 +
" [Internal error -- bad detector constructor]");
577 if(
findVolume( pv_dau , theVol , volList ) ) {
598 _wtM(0) , _id( 0) , _type( _volSurf.type() ) {
622 if( ! ( mat.
Z() > 0 ) ) {
632 materials[0].first ) ;
641 if( ! ( mat.
Z() > 0 ) ) {
651 materials[0].first ) ;
664 double uv =
u() *
v() ;
667 double uup =
u() * uprime ;
668 double vvp =
v() * vprime ;
670 return Vector2D( p*uprime / uup , p*vprime / vvp ) ;
696 _wtM->MasterToLocal( point , pa ) ;
705 _wtM->MasterToLocal( point , pa ) ;
714 std::list< PlacedVolume > pVList ;
720 std::stringstream sst ; sst <<
" ***** ERROR: Volume " << theVol.
name() <<
" not found for DetElement " <<
_det.
name() <<
" with surface " ;
721 throw std::runtime_error( sst.str() ) ;
730 for( std::list<PlacedVolume>::iterator it= pVList.begin(), n = pVList.end() ; it != n ; ++it ){
732 TGeoMatrix*
m = pv->GetMatrix();
733 std::cout <<
" +++ matrix for placed volume : " << std::endl ;
745 for( std::list<PlacedVolume>::iterator it = ++( pVList.begin() ) , n = pVList.end() ; it != n ; ++it ){
748 TGeoMatrix*
m = pvol->GetMatrix();
758 #if 0 //fixme: which convention to use here - the correct should be wtI, however it is the inverse of what is stored in DetElement ???
762 _wtM = wt.release() ;
766 _wtM = wtI.release() ;
772 double ua[3], va[3], na[3], oa[3] ;
828 const static double epsilon = 1
e-6 ;
830 std::vector< std::pair<Vector3D, Vector3D> > lines ;
834 const std::vector< std::pair<Vector3D, Vector3D> >& local_lines =
_volSurf.
getLines() ;
836 if( local_lines.size() > 0 ) {
837 unsigned n=local_lines.size() ;
840 for(
unsigned i=0;i<n;++i){
843 _wtM->LocalToMaster( local_lines[i].first , av.
array() ) ;
846 lines.push_back( std::make_pair( av, bv ) );
861 const TGeoShape* shape = vol->GetShape() ;
864 if(
type().isPlane() ) {
866 if( shape->IsA() == TGeoBBox::Class() ) {
868 TGeoBBox* box = ( TGeoBBox* ) shape ;
873 bool isYZ = std::fabs( ln.
x() - 1.0 ) < epsilon ;
874 bool isXZ = std::fabs( ln.
y() - 1.0 ) < epsilon ;
875 bool isXY = std::fabs( ln.
z() - 1.0 ) < epsilon ;
878 if( isYZ || isXZ || isXY ) {
889 ubl.
fill( 1., 0., 0. ) ;
890 vbl.
fill( 0., 0., 1. ) ;
896 ubl.
fill( 1., 0., 0. ) ;
897 vbl.
fill( 0., 1., 0. ) ;
904 _wtM->LocalToMasterVect( ubl , ub.
array() ) ;
905 _wtM->LocalToMasterVect( vbl , vb.
array() ) ;
909 lines.push_back( std::make_pair(
_o + boxDim[ uidx ] * ub + boxDim[ vidx ] * vb ,
_o - boxDim[ uidx ] * ub + boxDim[ vidx ] * vb ) ) ;
910 lines.push_back( std::make_pair(
_o - boxDim[ uidx ] * ub + boxDim[ vidx ] * vb ,
_o - boxDim[ uidx ] * ub - boxDim[ vidx ] * vb ) ) ;
911 lines.push_back( std::make_pair(
_o - boxDim[ uidx ] * ub - boxDim[ vidx ] * vb ,
_o + boxDim[ uidx ] * ub - boxDim[ vidx ] * vb ) ) ;
912 lines.push_back( std::make_pair(
_o + boxDim[ uidx ] * ub - boxDim[ vidx ] * vb ,
_o + boxDim[ uidx ] * ub + boxDim[ vidx ] * vb ) ) ;
917 }
else if( shape->IsA() == TGeoConeSeg::Class() ) {
919 TGeoCone* cone = ( TGeoCone* ) shape ;
924 if( lo.
rho() > epsilon ) {
931 double zhalf = cone->GetDZ() ;
932 double rmax1 = cone->GetRmax1() ;
933 double rmax2 = cone->GetRmax2() ;
934 double rmin1 = cone->GetRmin1() ;
935 double rmin2 = cone->GetRmin2() ;
939 double r0 = rmin1 + ( rmin2 - rmin1 ) / ( 2. * zhalf ) * ( zhalf + lo.
z() ) ;
940 double r1 = rmax1 + ( rmax2 - rmax1 ) / ( 2. * zhalf ) * ( zhalf + lo.
z() ) ;
943 unsigned n = nMax / 4 ;
944 double dPhi = 2.* ROOT::Math::Pi() / double( n ) ;
946 for(
unsigned i = 0 ; i < n ; ++i ) {
948 Vector3D rv00( r0*sin( i *dPhi ) , r0*cos( i *dPhi ) , 0. ) ;
949 Vector3D rv01( r0*sin( (i+1)*dPhi ) , r0*cos( (i+1)*dPhi ) , 0. ) ;
951 Vector3D rv10( r1*sin( i *dPhi ) , r1*cos( i *dPhi ) , 0. ) ;
952 Vector3D rv11( r1*sin( (i+1)*dPhi ) , r1*cos( (i+1)*dPhi ) , 0. ) ;
964 _wtM->LocalToMaster( pl0, pg0.
array() ) ;
965 _wtM->LocalToMaster( pl1, pg1.
array() ) ;
966 _wtM->LocalToMaster( pl2, pg2.
array() ) ;
967 _wtM->LocalToMaster( pl3, pg3.
array() ) ;
969 lines.push_back( std::make_pair( pg0, pg1 ) ) ;
970 lines.push_back( std::make_pair( pg2, pg3 ) ) ;
975 n = 4 ; dPhi = 2.* ROOT::Math::Pi() / double( n ) ;
977 for(
unsigned i = 0 ; i < n ; ++i ) {
979 Vector3D rv0( r0*sin( i * dPhi ) , r0*cos( i * dPhi ) , 0. ) ;
980 Vector3D rv1( r1*sin( i * dPhi ) , r1*cos( i * dPhi ) , 0. ) ;
987 _wtM->LocalToMaster( pl0, pg0.
array() ) ;
988 _wtM->LocalToMaster( pl1, pg1.
array() ) ;
990 lines.push_back( std::make_pair( pg0, pg1 ) ) ;
998 else if(shape->IsA() == TGeoTrap::Class()) {
999 TGeoTrap* trapezoid = ( TGeoTrap* ) shape;
1001 double dx1 = trapezoid->GetBl1();
1002 double dx2 = trapezoid->GetTl1();
1003 double dz = trapezoid->GetH1();
1013 _wtM->LocalToMasterVect( ubl , ub.
array() ) ;
1014 _wtM->LocalToMasterVect( vbl , vb.
array() ) ;
1019 lines.push_back( std::make_pair(
_o + dx1 * ub - dz * vb ,
_o + dx2 * ub + dz * vb ) ) ;
1020 lines.push_back( std::make_pair(
_o + dx2 * ub + dz * vb ,
_o - dx2 * ub + dz * vb ) ) ;
1021 lines.push_back( std::make_pair(
_o - dx2 * ub + dz * vb ,
_o - dx1 * ub - dz * vb) ) ;
1022 lines.push_back( std::make_pair(
_o - dx1 * ub - dz * vb ,
_o + dx1 * ub - dz * vb) ) ;
1027 else if(shape->IsA() == TGeoTrd1::Class()){
1028 TGeoTrd1* trapezoid = ( TGeoTrd1* ) shape;
1030 double dx1 = trapezoid->GetDx1();
1031 double dx2 = trapezoid->GetDx2();
1033 double dz = trapezoid->GetDz();
1044 _wtM->LocalToMasterVect( ubl , ub.
array() ) ;
1045 _wtM->LocalToMasterVect( vbl , vb.
array() ) ;
1050 lines.push_back( std::make_pair(
_o + dx1 * ub - dz * vb ,
_o + dx2 * ub + dz * vb ) ) ;
1051 lines.push_back( std::make_pair(
_o + dx2 * ub + dz * vb ,
_o - dx2 * ub + dz * vb ) ) ;
1052 lines.push_back( std::make_pair(
_o - dx2 * ub + dz * vb ,
_o - dx1 * ub - dz * vb) ) ;
1053 lines.push_back( std::make_pair(
_o - dx1 * ub - dz * vb ,
_o + dx1 * ub - dz * vb) ) ;
1058 else if(shape->IsA() == TGeoTrd2::Class()){
1059 TGeoTrd2* trapezoid = ( TGeoTrd2* ) shape;
1061 double dx1 = trapezoid->GetDx1();
1062 double dx2 = trapezoid->GetDx2();
1065 double dz = trapezoid->GetDz();
1076 _wtM->LocalToMasterVect( ubl , ub.
array() ) ;
1077 _wtM->LocalToMasterVect( vbl , vb.
array() ) ;
1082 lines.push_back( std::make_pair(
_o + dx1 * ub - dz * vb ,
_o + dx2 * ub + dz * vb ) ) ;
1083 lines.push_back( std::make_pair(
_o + dx2 * ub + dz * vb ,
_o - dx2 * ub + dz * vb ) ) ;
1084 lines.push_back( std::make_pair(
_o - dx2 * ub + dz * vb ,
_o - dx1 * ub - dz * vb) ) ;
1085 lines.push_back( std::make_pair(
_o - dx1 * ub - dz * vb ,
_o + dx1 * ub - dz * vb) ) ;
1098 lines.reserve( nMax ) ;
1100 double dAlpha = 2.* ROOT::Math::Pi() / double( nMax ) ;
1102 TVector3 norm( ln.
x() , ln.
y() , ln.
z() ) ;
1107 for(
unsigned i=0 ; i< nMax ; ++i ){
1109 double alpha = double(i) * dAlpha ;
1111 TVector3 vec( lu.
x() , lu.
y() , lu.
z() ) ;
1114 rot.Rotate( alpha , norm );
1116 TVector3 vecR = rot * vec ;
1119 luRot.
fill( vecR ) ;
1121 double dist = shape->DistFromInside( const_cast<double*> (lo.
const_array()) , const_cast<double*> (luRot.
const_array()) , 3, 0.1 ) ;
1128 _wtM->LocalToMaster( lp , gp.
array() ) ;
1139 lines.push_back( std::make_pair( previous, gp ) ) ;
1145 lines.push_back( std::make_pair( previous, first ) ) ;
1148 }
else if(
type().isCylinder() ) {
1151 if( shape->IsA() == TGeoConeSeg::Class() ) {
1153 lines.reserve( nMax ) ;
1155 TGeoTube* tube = ( TGeoTube* ) shape ;
1157 double zHalf = tube->GetDZ() ;
1161 double r = lo.
rho() ;
1165 unsigned n = nMax / 4 ;
1166 double dPhi = 2.* ROOT::Math::Pi() / double( n ) ;
1168 for(
unsigned i = 0 ; i < n ; ++i ) {
1170 Vector3D rv0( r*sin( i *dPhi ) , r*cos( i *dPhi ) , 0. ) ;
1171 Vector3D rv1( r*sin( (i+1)*dPhi ) , r*cos( (i+1)*dPhi ) , 0. ) ;
1182 _wtM->LocalToMaster( pl0, pg0.
array() ) ;
1183 _wtM->LocalToMaster( pl1, pg1.
array() ) ;
1184 _wtM->LocalToMaster( pl2, pg2.
array() ) ;
1185 _wtM->LocalToMaster( pl3, pg3.
array() ) ;
1187 lines.push_back( std::make_pair( pg0, pg1 ) ) ;
1188 lines.push_back( std::make_pair( pg1, pg2 ) ) ;
1189 lines.push_back( std::make_pair( pg2, pg3 ) ) ;
1190 lines.push_back( std::make_pair( pg3, pg0 ) ) ;
1204 _wtM->MasterToLocal( point , lp.
array() ) ;
1206 _wtM->LocalToMasterVect( lu , u_val.
array() ) ;
1212 _wtM->MasterToLocal( point , lp.
array() ) ;
1214 _wtM->LocalToMasterVect( lv , v_val.
array() ) ;
1220 _wtM->MasterToLocal( point , lp.
array() ) ;
1222 _wtM->LocalToMasterVect( ln , n.
array() ) ;
1229 _wtM->MasterToLocal( point , lp.
array() ) ;
1257 return origin().
rho() - 0.5 * l * tan( theta ) ;
1265 return origin().
rho() + 0.5 * l * tan( theta ) ;
1273 return origin().
z() - 0.5 * l ;
1281 return origin().
z() + 0.5 * l ;
virtual double innerThickness() const
virtual std::vector< std::pair< Vector3D, Vector3D > > getLines(unsigned nMax=100)
virtual Vector3D localToGlobal(const Vector2D &point) const
Handle class holding a placed volume (also called physical volume)
virtual double distance(const Vector3D &point) const
virtual Vector3D u(const Vector3D &point=Vector3D()) const
virtual Vector3D v(const Vector3D &point=Vector3D()) const
Volume volume() const
Logical volume of this placement.
const Vector3D & fill(const T &v)
fill vector from arbitrary class that defines operator[]
bool isZDisk() const
true if this is a plane orthogonal to Z
virtual double length_along_v() const
virtual long64 id() const
The id of this surface - corresponds to DetElement id.
virtual Vector2D globalToLocal(const Vector3D &point) const
VolCylinderImpl()
default c'tor
const char * name() const
Access the object name (or "" if not supported by the object)
virtual bool insideBounds(const Vector3D &point, double epsilon=1.e-4) const
Checks if the given point lies within the surface.
static Cylindrical cylindrical()
virtual Vector3D v(const Vector3D &point=Vector3D()) const
virtual Vector2D globalToLocal(const Vector3D &point) const
virtual std::vector< std::pair< Vector3D, Vector3D > > getLines(unsigned nMax=100)
static Spherical spherical()
IFACE * addExtension(CONCRETE *c) const
Extend the detector element with an arbitrary structure accessible by the type.
virtual Vector3D localToGlobal(const Vector2D &point) const
virtual void setU(const Vector3D &u)
setter for daughter classes
virtual Vector2D globalToLocal(const Vector3D &point) const
virtual long64 id() const
The id of this surface.
Geometry::DetElement _det
Object * data() const
Check if placement is properly instrumented.
virtual const IMaterial & outerMaterial() const
Access to the material in direction of the normal.
virtual double distance(const Vector3D &point) const
Out version of the std auto_ptr implementation base either on auto_ptr or unique_ptr.
virtual double length_along_u() const
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
virtual ~SurfaceList()
d'tor deletes all owned surfaces
virtual double distance(const Vector3D &point) const
std::vector< std::pair< Material, double > > MaterialVec
virtual const Vector3D & origin() const
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
Access to the normal direction at the given point.
virtual Vector3D v(const Vector3D &point=Vector3D()) const
T * ptr() const
Access to the held object.
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
Access to the normal direction at the given point.
virtual const IMaterial & outerMaterial() const
Access to the material in direction of the normal.
virtual double z0() const
the start z of the cone
Handle class holding a placed volume (also called physical volume)
virtual const IMaterial & innerMaterial() const
Access to the material in opposite direction of the normal.
virtual void setV(const Vector3D &v)
setter for daughter classes
virtual double radius() const
the radius of the cylinder (rho of the origin vector)
virtual double distance(const Vector3D &point) const
virtual long64 id() const
The id of this surface - always 0 for VolSurfaces.
virtual Vector2D globalToLocal(const Vector3D &point) const
virtual ~VolSurfaceList()
virtual double length_along_v() const
virtual Vector3D u(const Vector3D &point=Vector3D()) const
VolumeID volumeID() const
The cached VolumeID of this subdetector element.
virtual double length_along_v() const
virtual Vector3D localToGlobal(const Vector2D &point) const
virtual Vector3D volumeOrigin() const
virtual Vector3D v(const Vector3D &point=Vector3D()) const
VolConeImpl()
default c'tor
virtual double z1() const
the end z of the cone
bool checkParallelToZ(const ISurface &surf, double epsilon=1.e-6) const
virtual double distance(const Vector3D &point) const
const MaterialVec & materialsBetween(const DDSurfaces::Vector3D &p0, const DDSurfaces::Vector3D &p1, double epsilon=1e-4)
virtual Vector3D localToGlobal(const Vector2D &point) const
MaterialData createAveragedMaterial(const MaterialVec &materials)
virtual bool insideBounds(const Vector3D &point, double epsilon=1e-4) const
Checks if the given point lies within the surface.
virtual Vector2D globalToLocal(const Vector3D &point) const
virtual double innerThickness() const
virtual bool insideBounds(const Vector3D &point, double epsilon=1e-4) const
Checks if the given point lies within the surface.
virtual const SurfaceType & type() const
PlacedVolume placement() const
Access to the physical volume of this detector element.
void setOuterMaterial(const IMaterial &mat)
set the outer Materal
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
void setProperty(unsigned prop, bool val=true)
set the given peorperty
virtual double outerThickness() const
virtual double Z() const =0
averaged proton number
virtual double length_along_u() const
virtual Vector3D center() const
the center of the cylinder
Handle< NamedObject > Ref_t
Default Ref_t definition describing named objects.
virtual Vector3D u(const Vector3D &point=Vector3D()) const
Geometry::Volume volume() const
the volume to which this surface is attached.
virtual Vector3D v(const Vector3D &point=Vector3D()) const
virtual Vector3D localToGlobal(const Vector2D &point) const
virtual double outerThickness() const
virtual std::vector< std::pair< DDSurfaces::Vector3D, DDSurfaces::Vector3D > > getLines(unsigned nMax=100)
create outer bounding lines for the given symmetry of the polyhedron
virtual double innerThickness() const
virtual const Vector3D & origin() const
virtual Vector2D globalToLocal(const Vector3D &point) const
virtual const SurfaceType & type() const
Handle class describing a detector element.
virtual Vector3D u(const Vector3D &point=Vector3D()) const
VolSurfaceList * volSurfaceList(DetElement &det)
virtual double length_along_u() const
virtual double outerThickness() const
virtual double distance(const Vector3D &point) const
IFACE * extension() const
Access extension element by the type.
virtual const Vector3D & origin() const
bool checkOrthogonalToZ(const ISurface &surf, double epsilon=1.e-6) const
virtual std::vector< std::pair< Vector3D, Vector3D > > getLines(unsigned nMax=100)
Vector3D cross(const Vector3D &v) const
static const double second
virtual Vector3D u(const Vector3D &point=Vector3D()) const
virtual const IMaterial & outerMaterial() const
Access to the material in direction of the normal.
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
virtual void setNormal(const Vector3D &n)
setter for daughter classes
const double * const_array() const
direct access to data as const double*
double * array()
direct access to data as double* - allows modification
virtual const IMaterial & innerMaterial() const
Access to the material in opposite direction of the normal.
virtual Vector3D center() const
the center of the cone
bool findVolume(PlacedVolume pv, Volume theVol, std::list< PlacedVolume > &volList)
virtual Vector3D u(const Vector3D &point=Vector3D()) const
virtual const IMaterial & innerMaterial() const
Access to the material in opposite direction of the normal.
virtual const SurfaceType & type() const
virtual Vector3D normal(const Vector3D &point=Vector3D()) const
Access to the normal direction at the given point.
virtual void setOrigin(const Vector3D &o)
setter for daughter classes
void setInnerMaterial(const IMaterial &mat)
set the innerMaterial
virtual double radius0() const
the start radius of the cone
Geometry::Volume volume() const
The volume that has the surface attached.
virtual double radius1() const
the end radius of the cone
const TGeoHMatrix & worldTransformation() const
Set detector element for reference transformations. Will delete existing reference trafo...
bool isCone() const
true if this a conical surface
virtual Vector3D localToGlobal(const Vector2D &point) const