103 std::unique_ptr<TGeoHMatrix> fMatrix;
115 Double_t GetMisalignmentAngle()
const
122 void initialize_root_geo();
123 void set_volume_centre();
124 void set_surface_centre();
131 : fTheta(o.fTheta),fPhi(o.fPhi),fTheta_min(o.fTheta_min),
132 fTheta_max(o.fTheta_max),fPhi_min(o.fPhi_min),fDistance(o.fDistance),
135 fVolumeCentre(o.fVolumeCentre),
136 fSurfaceCentre(o.fSurfaceCentre),
137 fNormal(o.fNormal) {}
147 swap(p1.fTheta,p2.fTheta);
148 swap(p1.fPhi,p2.fPhi);
149 swap(p1.fTheta_min,p2.fTheta_min);
150 swap(p1.fTheta_max,p2.fTheta_max);
151 swap(p1.fPhi_min,p2.fPhi_min);
152 swap(p1.fPhi_max,p2.fPhi_max);
153 swap(p1.fDistance,p2.fDistance);
154 swap(p1.fMatrix,p2.fMatrix);
155 swap(p1.fShape,p2.fShape);
156 swap(p1.fSolidAngle,p2.fSolidAngle);
157 swap(p1.fVolumeCentre,p2.fVolumeCentre);
158 swap(p1.fSurfaceCentre,p2.fSurfaceCentre);
159 swap(p1.fNormal,p2.fNormal);
192 if(
ROOTGeo() && fPhi_min==fPhi_max)
198 if(
ROOTGeo() && fPhi_min==fPhi_max)
204 if(
ROOTGeo() && fTheta_min==fTheta_max)
210 if(
ROOTGeo() && fTheta_min==fTheta_max)
260 return (fMatrix &&
fShape);
269 return fSurfaceCentre;
273 return fVolumeCentre;
287 if(fMaxMisalignment<0)
289 return fMaxMisalignment;
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Base class used for handling geometry in a multidetector array.
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Bool_t IsInPhiRange(const Double_t phi)
virtual void SetAzimuthalWidth(Double_t aw)
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
Bool_t IsAzimuthallyWiderThan(KVPosition *pos)
virtual void SetShape(TGeoBBox *)
virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
Set min and max azimuthal angles and calculate (mean) phi.
virtual void SetAzimuthalAngle(Double_t ph)
virtual Double_t GetSolidAngle(void) const
virtual Double_t GetTheta() const
void GetCornerCoordinates(TVector3 *, Double_t=0)
virtual TGeoHMatrix * GetMatrix() const
virtual TVector3 GetSurfaceCentre() const
void GetWidthsFromDimension(Double_t lin_dim)
void SetDistance(Double_t d)
TRotation GetRandomIsotropicRotation()
virtual TVector3 GetVolumeCentre() const
virtual void SetPolarAngle(Double_t th)
virtual Double_t GetPhi() const
Double_t GetPhiMax() const
virtual Double_t GetDistance(void) const
Double_t GetPhiMin() const
Bool_t IsSmallerThan(KVPosition *pos)
kTRUE if "this" is entirely contained within "pos"
virtual Double_t GetSurfaceArea(int npoints=100000) const
Double_t GetThetaMin() const
virtual Double_t GetSinTheta() const
KVPosition(const KVPosition &o)
virtual TVector3 GetNormalIntoShape() const
Double_t GetAzimuthalWidth(Double_t phmin=-1., Double_t phimax=-1.) const
Bool_t IsInPolarRange(const Double_t theta)
kTRUE if given angle theta is within the polar range of this solid angle element
virtual void SetPolarWidth(Double_t pw)
Bool_t IsAlignedWith(KVPosition *pos)
kTRUE if one of the two solid angle elements is completely contained within the other.
friend void swap(KVPosition &p1, KVPosition &p2)
void SetTheta(Double_t t)
KVPosition & operator=(KVPosition other)
void CalculateEstimatedAngularLimits(int N=10000)
virtual ~KVPosition()=default
void SetPhiMinMax(Double_t min, Double_t max)
virtual void SetPolarMinMax(Double_t min, Double_t max)
Set min and max polar angles and calculate (mean) theta.
virtual void SetMatrix(const TGeoHMatrix *)
Set the global transformation matrix for this volume.
virtual Double_t GetCosineMaximumMisalignmentAngle() const
virtual TGeoBBox * GetShape() const
virtual Double_t GetCosTheta() const
virtual Double_t GetMaximumMisalignmentAngle() const
Bool_t IsOverlappingWith(KVPosition *pos)
kTRUE if there is at least partial overlap between two solid angle elements
virtual Bool_t ROOTGeo() const
void GetCornerCoordinatesInOwnFrame(TVector3 *, Double_t=0)
KVPosition(KVPosition &&other) noexcept
Double_t GetThetaMax() const
virtual TVector3 GetDirection()
virtual TVector3 GetRandomPointOnSurface() const
Double_t Dot(const TVector3 &) const
void swap(RVec< T > &lhs, RVec< T > &rhs)
double min(double x, double y)
double max(double x, double y)
constexpr Double_t DegToRad()
constexpr Double_t RadToDeg()