![]() |
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 | GetOC_SC_CosAngle () const |
| TVector3 | GetSCVector () const |
Private Attributes | |
| Double_t | fDistance |
| distance in cm from centre of solid angle element to coordinate system origin (target) More... | |
| TGeoHMatrix * | fMatrix |
| transform world<->detector coordinates More... | |
| Double_t | fPhi |
| azimuthal angle in degrees with respect to 12 o'clock (=0 deg.), corresponds to centre of telescope More... | |
| Double_t | fPhi_max |
| azimuthal angle in degrees corresponding to most clockwise edge of telescope More... | |
| Double_t | fPhi_min |
| azimuthal angle in degrees corresponding to most anticlockwise edge of telescope More... | |
| TGeoBBox * | fShape |
| shape of detector volume More... | |
| Double_t | fSolidAngle |
| solid angle = area of entrance window / distance**2 More... | |
| Double_t | fTheta |
| polar angle in degrees with respect to beam axis, corresponds to centre of telescope More... | |
| Double_t | fTheta_max |
| polar angle in degrees of the edge furthest from the beam axis More... | |
| Double_t | fTheta_min |
| polar angle in degrees corresponding to edge of telescope closest to beam axis More... | |
| KVPosition::KVPosition | ( | ) |
Definition at line 70 of file KVPosition.cpp.
| KVPosition::KVPosition | ( | Double_t | thmin, |
| Double_t | thmax, | ||
| Double_t | phmin, | ||
| Double_t | phmax, | ||
| Double_t | dist = 0.0 |
||
| ) |
Definition at line 79 of file KVPosition.cpp.
|
virtual |
Definition at line 58 of file KVPosition.cpp.
| 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 336 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 627 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 520 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 568 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 177 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 487 of file KVPosition.cpp.
Reimplemented in KVDetector.
Definition at line 199 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 792 of file KVPosition.cpp.
|
virtual |
Return angle (in deg.) between the vector from the target to the volume centre and the normal to the volume surface
Reimplemented in KVDetector.
Definition at line 1029 of file KVPosition.cpp.
|
inlineprivate |
Definition at line 110 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 181 of file KVPosition.h.
|
inline |
Definition at line 149 of file KVPosition.h.
|
inline |
Definition at line 143 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 280 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 242 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 680 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 828 of file KVPosition.cpp.
|
inlineprivate |
Definition at line 106 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 805 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 173 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 591 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 989 of file KVPosition.cpp.
|
virtual |
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.
Reimplemented in KVDetector.
Definition at line 901 of file KVPosition.cpp.
|
virtual |
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.
Reimplemented in KVDetector.
Definition at line 960 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 169 of file KVPosition.h.
|
inline |
Definition at line 161 of file KVPosition.h.
|
inline |
Definition at line 155 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 930 of file KVPosition.cpp.
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 654 of file KVPosition.cpp.
default initialiser
Definition at line 43 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 419 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 470 of file KVPosition.cpp.
kTRUE if given angle phi is within the azimuthal range of this solid angle element
Definition at line 360 of file KVPosition.cpp.
kTRUE if given angle theta is within the polar range of this solid angle element
Definition at line 386 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 432 of file KVPosition.cpp.
| Bool_t KVPosition::IsSmallerThan | ( | KVPosition * | pos | ) |
kTRUE if "this" is entirely contained within "pos"
Definition at line 403 of file KVPosition.cpp.
|
inlinevirtual |
Returns kTRUE if ROOT geometry is used, kFALSE if not
Reimplemented in KVINDRADetector.
Definition at line 210 of file KVPosition.h.
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 117 of file KVPosition.cpp.
Set min and max azimuthal angles and calculate (mean) phi.
Reimplemented in KVINDRADetector.
Definition at line 216 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 189 of file KVPosition.cpp.
Definition at line 195 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 717 of file KVPosition.cpp.
Definition at line 191 of file KVPosition.h.
Definition at line 126 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 96 of file KVPosition.cpp.
Set min and max polar angles and calculate (mean) theta.
Reimplemented in KVINDRADetector.
Definition at line 171 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 147 of file KVPosition.cpp.
Reimplemented in KVDetector.
Definition at line 758 of file KVPosition.cpp.
Definition at line 187 of file KVPosition.h.
|
private |
distance in cm from centre of solid angle element to coordinate system origin (target)
Definition at line 99 of file KVPosition.h.
|
private |
transform world<->detector coordinates
Definition at line 102 of file KVPosition.h.
|
mutableprivate |
azimuthal angle in degrees with respect to 12 o'clock (=0 deg.), corresponds to centre of telescope
Definition at line 94 of file KVPosition.h.
|
private |
azimuthal angle in degrees corresponding to most clockwise edge of telescope
Definition at line 98 of file KVPosition.h.
|
private |
azimuthal angle in degrees corresponding to most anticlockwise edge of telescope
Definition at line 97 of file KVPosition.h.
|
private |
shape of detector volume
Definition at line 103 of file KVPosition.h.
|
mutableprivate |
solid angle = area of entrance window / distance**2
Definition at line 104 of file KVPosition.h.
|
private |
polar angle in degrees with respect to beam axis, corresponds to centre of telescope
Definition at line 93 of file KVPosition.h.
|
private |
polar angle in degrees of the edge furthest from the beam axis
Definition at line 96 of file KVPosition.h.
|
private |
polar angle in degrees corresponding to edge of telescope closest to beam axis
Definition at line 95 of file KVPosition.h.