26 BaseVolumeHandle::BaseVolumeHandle(
bool expand2Pi,
bool debugVal)
77 cout <<
"pos_zplus " << pos_zplus <<
" " << pos_zplus.perp() <<
" " << pos_zplus.phi() << endl
78 <<
"pos_zminus " << pos_zminus <<
" " << pos_zminus.perp() <<
" " << pos_zminus.phi() << endl
79 <<
"pos_phiplus " << pos_phiplus <<
" " << pos_phiplus.perp() <<
" " << pos_phiplus.phi() << endl
80 <<
"pos_phiminus " << pos_phiminus <<
" " << pos_phiminus.perp() <<
" " << pos_phiminus.phi() << endl;
82 cout <<
"y_phiplus " << y_phiplus << endl;
83 cout <<
"y_phiminus " << y_phiminus << endl;
94 if (pos_zplus.z() < pos_zminus.z()) {
95 cout <<
"*** WARNING: pos_zplus < pos_zminus " << endl;
98 cout <<
"*** WARNING: pos_phiplus < pos_phiminus " << endl;
105 if (&s1 == (
surfaces[which_side]).
get()) {
107 cout <<
" sameSurface: OK (same ptr)" << endl;
111 const float maxtilt = 0.999;
120 cout <<
" sameSurface: different types" << endl;
141 if (cy1 !=
nullptr) {
143 if (cy2 ==
nullptr) {
145 cout <<
" sameSurface: different types" << endl;
157 const Cone *co1 =
dynamic_cast<const Cone *
>(&s1);
158 if (co1 !=
nullptr) {
159 const Cone *co2 =
dynamic_cast<const Cone *
>(&
s2);
160 if (co2 ==
nullptr) {
162 cout <<
" sameSurface: different types" << endl;
175 cout <<
" sameSurface: unknown surfaces..." << endl;
181 if (&s1 == (
surfaces[which_side]).
get()) {
187 cout <<
"***ERROR: setSurface: trying to assign a surface that does not match destination surface. Skipping." 193 if (p1 !=
nullptr && p2 !=
nullptr)
199 if (&s1 != (
surfaces[which_side]).
get()) {
200 cout <<
"*** WARNING BaseVolumeHandle::setSurface: trying to reassign a surface to a different surface instance" 208 cout <<
" Volume " <<
name <<
" # " <<
copyno <<
" Assigned: " << (
int)which_side << endl;
218 assert(which_side >= 0 && which_side < 6);
Surface::LocalVector LocalVector
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalVector normalVector() const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
unsigned short copyno
copy number
GlobalPoint vertex() const
Global position of the cone vertex.
GloballyPositioned< float > * refPlane
const Surface & surface(int which_side) const
Get the current surface on specified side.
Scalar radius() const
Radius of the cylinder.
LocalPoint toLocal(const GlobalPoint &gp) const
Cos< T >::type cos(const T &t)
const GlobalPoint & center() const
Return the center of the volume.
void buildPhiZSurf(double startPhi, double deltaPhi, double zhalf, double rCentr)
GlobalPoint toGlobal(const LocalPoint &lp) const
std::string name
Name of the volume.
bool setSurface(const Surface &s1, Sides which_side)
Assign a shared surface perorming sanity checks.
const PositionType & position() const
bool sameSurface(const Surface &s1, Sides which_side, float tolerance=0.01)
Find out if two surfaces are the same physical surface.
virtual ~BaseVolumeHandle()
Geom::Theta< float > openingAngle() const
Angle of the cone.