![]() |
KaliVeda
Toolkit for HIC analysis
|
Base class used for handling geometry in a multidetector array.
Each KVPosition object represents an element of solid angle, with a domain in polar angle (theta) and azimuthal angle (phi). All methods necessary to inquire about relative positions of such elements (overlaps, inclusion, etc.) are provided.
The coordinate system has the target position for its centre. The beam direction defines the positive z axis, with respect to which polar angles are measured. The +ve x-axis is taken to be vertical, and azimuthal angles increase when going clockwise from the +ve x-axis, looking towards the +ve z direction:
All angles are in degrees.
Polar angles (theta) vary between 0 and 180 degrees Azimuthal angles (phi) vary between 0 and 359.999... degrees.
An element is defined by theta-min/max and phi-min/max:
The above definitions mean that phi-min is not necessarily smaller than phi-max: we redefine "smaller" for phi angles to mean "more anticlockwise than" or "less clockwise than". Some examples:
Generating a random unit vector within a given angular range
Definition at line 91 of file KVPosition.h.
#include <KVPosition.h>

Private Member Functions | |
| Double_t | GetMisalignmentAngle () const |
| Double_t | GetOC_SC_CosAngle () const |
| void | initialize_root_geo () |
| void | set_surface_centre () |
| void | set_volume_centre () |
Private Attributes | |
| Double_t | fDistance = 0 |
| std::unique_ptr< TGeoHMatrix > | fMatrix |
| transform world<->detector coordinates More... | |
| Double_t | fMaxMisalignment =-1. |
| TVector3 | fNormal |
| unit normal to volume i.e. axis of shape, pointing away from the origin More... | |
| Double_t | fPhi = -1 |
| Double_t | fPhi_max = 0 |
| Double_t | fPhi_min = 0 |
| TGeoBBox * | fShape = nullptr |
| Double_t | fSolidAngle = 0 |
| TVector3 | fSurfaceCentre |
| vector position of surface centre More... | |
| Double_t | fTheta = -1 |
| Double_t | fTheta_max = 0 |
| Double_t | fTheta_min = 0 |
| TVector3 | fVolumeCentre |
| vector position of volume centre More... | |
Friends | |
| void | swap (KVPosition &p1, KVPosition &p2) |
|
default |
| KVPosition::KVPosition | ( | Double_t | thmin, |
| Double_t | thmax, | ||
| Double_t | phmin, | ||
| Double_t | phmax, | ||
| Double_t | dist = 0.0 |
||
| ) |
Definition at line 39 of file KVPosition.cpp.
|
virtualdefault |
|
inline |
Definition at line 130 of file KVPosition.h.
|
inline |
Definition at line 138 of file KVPosition.h.
| void KVPosition::CalculateEstimatedAngularLimits | ( | int | N = 10000 | ) |
For ROOT geometries, perform a Monte-Carlo sampling in order to estimate the min/max polar and azimuthal angles of this volume
Definition at line 294 of file KVPosition.cpp.
Calculate azimuthal width taking phi-min as the most anticlockwise point of the element and phi-max the most clockwise. If no arguments are given, width calculated for this object Otherwise, width calculated for given phi-min and phi-max
Definition at line 590 of file KVPosition.cpp.
Fill the array (TVector3 corner[4]) with the coordinates of the 4 'corners' of the solid angle element.
These 'corners' are the points of intersection between the plane defined by the normal to the centre of the solid angle (direction: theta,phi), at a distance fDistance [cm] from the origin, and the four lines starting at the origin with directions (thetamin,phimin), (thetamax,phimin), (thetamax,phimax), (thetamin,phimax).
If optional argument 'depth' [cm] is given, the coordinates are calculated for the plane situated at distance (fDistance+depth) from the origin.
The order of the 4 corners is as follows: corners[3] : theta-min, phi-min corners[2] : theta-max, phi-min corners[1] : theta-max, phi-max corners[0] : theta-min, phi-max
Coordinates are in CENTIMETRES
Definition at line 483 of file KVPosition.cpp.
Like GetCornerCoordinates(), except that the coordinates correspond to a reference frame in which the +ve z-axis goes through the centre of the solid angle
Definition at line 531 of file KVPosition.cpp.
|
inlinevirtual |
The maximum effective thickness of the volume 'seen' from the origin is then \(e/\cos\theta\).
Reimplemented in KVDetector.
Definition at line 291 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 224 of file KVPosition.h.
|
virtual |
Returns a unit vector corresponding to the direction of fTheta, fPhi i.e. the centre of the solid angle element.
Reimplemented in KVDetector.
Definition at line 450 of file KVPosition.cpp.
Reimplemented in KVDetector.
Definition at line 246 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 746 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 282 of file KVPosition.h.
|
inlineprivate |
Return angle (in deg.) between the vector from the target to the volume centre and the normal to the volume surface
Definition at line 115 of file KVPosition.h.
|
inlinevirtual |
normal to shape, i.e. axis along which shape has its nominal thickness, pointing away from the origin i.e. into the shape
Reimplemented in KVDetector.
Definition at line 275 of file KVPosition.h.
|
inlineprivate |
Definition at line 111 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 228 of file KVPosition.h.
|
inline |
Definition at line 196 of file KVPosition.h.
|
inline |
Definition at line 190 of file KVPosition.h.
|
virtual |
Set th and ph to random values between the max and min limits defining the solid angle element. Depending on the optional option string, the direction is either drawn at "random" among the corresponding angles, or "isotropic". By default, the direction is "isotropic".
Reimplemented in KVDetector.
Definition at line 238 of file KVPosition.cpp.
Returns a unit vector in a random direction corresponding to this detector. Depending on the optional option string, the direction is either drawn at "random" among the corresponding angles, or "isotropic". By default, the direction is "isotropic".
Reimplemented in KVDetector.
Definition at line 200 of file KVPosition.cpp.
| TRotation KVPosition::GetRandomIsotropicRotation | ( | ) |
Generates a rotation which, if applied to a unit vector in the Z-direction, will transform it into an isotropically-distributed vector in this angular range.
Definition at line 643 of file KVPosition.cpp.
|
virtual |
It is assumed that the volume was defined in such a way that the entrance window corresponds to the facet in the X-Y plane placed at -dZ.
NOTE: we force the use of TGeoBBox::GetPointsOnFacet. For TGeoArb8, the method has been overridden and does nothing. We use the TGeoBBox method, and then use TGeoShape::Contains to check that the point does actually correspond to the TGeoArb8.
Reimplemented in KVDetector.
Definition at line 782 of file KVPosition.cpp.
|
virtual |
Reimplemented in KVDetector.
Definition at line 759 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 220 of file KVPosition.h.
Return values of the solid angle (in msr) seen by the geometric ensemble For simple geometries defined by theta_min/max etc., this is exact. For ROOT geometries we calculate the area of the entrance window and divide it by the square of the distance to the detector.
Reimplemented in KVDetector.
Definition at line 554 of file KVPosition.cpp.
|
virtual |
Monte Carlo calculation of entrance surface area for TGeoArb8 shapes Area is calculated as area of bounding box facet multiplied by the ratio between number of random points actually on the shape surface to the number of points npoints generated over the surface of the bounding box facet
npoints is the number of points to test
Reimplemented in KVDetector.
Definition at line 902 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 267 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 216 of file KVPosition.h.
|
inline |
Definition at line 208 of file KVPosition.h.
|
inline |
Definition at line 202 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 271 of file KVPosition.h.
Calculate azimuthal and polar widths for a square element placed at a given distance from the origin with linear dimension 'lin_dim' (in mm). SetDistance, SetTheta and SetPhi must already have been called.
Definition at line 617 of file KVPosition.cpp.
|
private |
Initialization of ROOT geometry object
We set the \((\theta,\phi)\) angles corresponding to the centre of the volume, and the distance from the target corresponding to the distance along \((\theta,\phi)\) to the entrance surface of the volume (not necessarily the same as the distance from the target to the centre of the entrance surface)
Definition at line 680 of file KVPosition.cpp.
| Bool_t KVPosition::IsAlignedWith | ( | KVPosition * | pos | ) |
kTRUE if one of the two solid angle elements is completely contained within the other.
Definition at line 382 of file KVPosition.cpp.
| Bool_t KVPosition::IsAzimuthallyWiderThan | ( | KVPosition * | pos | ) |
kTRUE if "this" has larger azimuthal width than "pos". Takes care of cases where the solid angle straddles 0 degrees
Definition at line 433 of file KVPosition.cpp.
kTRUE if given angle phi is within the azimuthal range of this solid angle element
Definition at line 323 of file KVPosition.cpp.
kTRUE if given angle theta is within the polar range of this solid angle element
Definition at line 349 of file KVPosition.cpp.
| Bool_t KVPosition::IsOverlappingWith | ( | KVPosition * | pos | ) |
kTRUE if there is at least partial overlap between two solid angle elements
Definition at line 395 of file KVPosition.cpp.
| Bool_t KVPosition::IsSmallerThan | ( | KVPosition * | pos | ) |
kTRUE if "this" is entirely contained within "pos"
Definition at line 366 of file KVPosition.cpp.
|
inline |
Definition at line 161 of file KVPosition.h.
|
inlinevirtual |
Returns kTRUE if ROOT geometry is used, kFALSE if not
Reimplemented in KVINDRADetector.
Definition at line 257 of file KVPosition.h.
|
private |
It is assumed that the volume was defined in such a way that the entrance surface corresponds to the facet in the X-Y plane placed at -dZ.
Definition at line 855 of file KVPosition.cpp.
|
private |
Definition at line 879 of file KVPosition.cpp.
Sets the azimuthal angle corresponding to the centre of this telescope/solid angle element/etc. If the azimuthal width has been set already (KVPosition::SetAzimuthalWidth), the limits phi-min and phi-max are calculated.
Definition at line 75 of file KVPosition.cpp.
Set min and max azimuthal angles and calculate (mean) phi.
Reimplemented in KVINDRADetector.
Definition at line 174 of file KVPosition.cpp.
Set phi_min and phi_max from width (in degrees) If phi is already known, use to set phi_min and phi_max If not, keep relative values (negative) of phi_min and phi_max, to be used when phi is set
Definition at line 147 of file KVPosition.cpp.
Definition at line 242 of file KVPosition.h.
|
virtual |
Set the global transformation matrix for this volume.
Reimplemented in KVDetector.
Definition at line 713 of file KVPosition.cpp.
Definition at line 238 of file KVPosition.h.
Definition at line 173 of file KVPosition.h.
Sets the polar angle corresponding to the centre of this telescope/solid angle element/etc. If the polar width has been set already (KVPosition::SetPolarWidth), the limits theta-min and theta-max are calculated.
Definition at line 54 of file KVPosition.cpp.
Set min and max polar angles and calculate (mean) theta.
Reimplemented in KVINDRADetector.
Definition at line 129 of file KVPosition.cpp.
Set theta_min and theta_max from width (in degrees). If theta is already known, use to set theta_min and theta_max. If not, keep relative values (negative) of theta_min and theta_max, to be used when theta is set
Definition at line 105 of file KVPosition.cpp.
Set the shape of this volume
Reimplemented in KVDetector.
Definition at line 729 of file KVPosition.cpp.
Definition at line 234 of file KVPosition.h.
|
friend |
Definition at line 144 of file KVPosition.h.
|
private |
Definition at line 100 of file KVPosition.h.
|
private |
transform world<->detector coordinates
Definition at line 103 of file KVPosition.h.
|
private |
Definition at line 109 of file KVPosition.h.
|
private |
unit normal to volume i.e. axis of shape, pointing away from the origin
Definition at line 108 of file KVPosition.h.
|
mutableprivate |
Definition at line 95 of file KVPosition.h.
|
private |
Definition at line 99 of file KVPosition.h.
|
private |
Definition at line 98 of file KVPosition.h.
|
private |
Definition at line 104 of file KVPosition.h.
|
mutableprivate |
Definition at line 105 of file KVPosition.h.
|
private |
vector position of surface centre
Definition at line 107 of file KVPosition.h.
|
private |
Definition at line 94 of file KVPosition.h.
|
private |
Definition at line 97 of file KVPosition.h.
|
private |
Definition at line 96 of file KVPosition.h.
|
private |
vector position of volume centre
Definition at line 106 of file KVPosition.h.