KaliVeda
1.12/06
Heavy-Ion Analysis Toolkit
|
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 90 of file 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... | |
#include <KVPosition.h>
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.
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 612 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 496 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 544 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 167 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 463 of file KVPosition.cpp.
Reimplemented in KVDetector.
Definition at line 189 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 777 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 1014 of file KVPosition.cpp.
|
inlineprivate |
Definition at line 109 of file KVPosition.h.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 171 of file KVPosition.h.
|
inline |
Definition at line 145 of file KVPosition.h.
|
inline |
Definition at line 141 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 665 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 813 of file KVPosition.cpp.
|
inlineprivate |
Definition at line 105 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 790 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 163 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 KVRing, and KVDetector.
Definition at line 567 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 974 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 886 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 945 of file KVPosition.cpp.
|
inlinevirtual |
Reimplemented in KVDetector.
Definition at line 159 of file KVPosition.h.
|
inline |
Definition at line 153 of file KVPosition.h.
|
inline |
Definition at line 149 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 915 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 639 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 395 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 446 of file KVPosition.cpp.
kTRUE if given angle phi is within the azimuthal range of this solid angle element
Definition at line 336 of file KVPosition.cpp.
kTRUE if given angle theta is within the polar range of this solid angle element
Definition at line 362 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 408 of file KVPosition.cpp.
Bool_t KVPosition::IsSmallerThan | ( | KVPosition * | pos | ) |
kTRUE if "this" is entirely contained within "pos"
Definition at line 379 of file KVPosition.cpp.
Bool_t KVPosition::ROOTGeo | ( | ) | const |
Returns kTRUE if ROOT geometry is used, kFALSE if not.
Definition at line 598 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.
Reimplemented in KVTelescope.
Definition at line 117 of file KVPosition.cpp.
Set min and max azimuthal angles and calculate (mean) phi.
Reimplemented in KVTelescope.
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
Reimplemented in KVTelescope.
Definition at line 189 of file KVPosition.cpp.
Definition at line 185 of file KVPosition.h.
|
virtual |
Reimplemented in KVDetector.
Definition at line 702 of file KVPosition.cpp.
Definition at line 181 of file KVPosition.h.
Definition at line 125 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.
Reimplemented in KVTelescope.
Definition at line 96 of file KVPosition.cpp.
Set min and max polar angles and calculate (mean) theta.
Reimplemented in KVTelescope.
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
Reimplemented in KVTelescope.
Definition at line 147 of file KVPosition.cpp.
Reimplemented in KVDetector.
Definition at line 743 of file KVPosition.cpp.
Definition at line 177 of file KVPosition.h.
|
private |
distance in cm from centre of solid angle element to coordinate system origin (target)
Definition at line 98 of file KVPosition.h.
|
private |
transform world<->detector coordinates
Definition at line 101 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 93 of file KVPosition.h.
|
private |
azimuthal angle in degrees corresponding to most clockwise edge of telescope
Definition at line 97 of file KVPosition.h.
|
private |
azimuthal angle in degrees corresponding to most anticlockwise edge of telescope
Definition at line 96 of file KVPosition.h.
|
private |
shape of detector volume
Definition at line 102 of file KVPosition.h.
|
mutableprivate |
solid angle = area of entrance window / distance**2
Definition at line 103 of file KVPosition.h.
|
private |
polar angle in degrees with respect to beam axis, corresponds to centre of telescope
Definition at line 92 of file KVPosition.h.
|
private |
polar angle in degrees of the edge furthest from the beam axis
Definition at line 95 of file KVPosition.h.
|
private |
polar angle in degrees corresponding to edge of telescope closest to beam axis
Definition at line 94 of file KVPosition.h.