| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DetDesc Namespace Reference

DetDesc.h "DetDesc/DetDesc.h". More...


Classes

class  IGeometryErrorSvc
class  IntersectionErrors
class  Services
 This class is a container for accessors to different usefull services, namely the service locator, message service and the detector data provider. More...

Functions

const Gaudi::Transform3D localToGlobalTransformation (const std::vector< double > &translationParams, const std::vector< double > &rotationParams, const std::vector< double > &pivotParams)
 Build the local to global transformation matrix given.
void getZYXTransformParameters (const Gaudi::Transform3D &CDM, std::vector< double > &translationParams, std::vector< double > &rotationParams, const std::vector< double > &pivotParams=std::vector< double >(3, 0.))
 Get the three rotation angles and three translation coordinates from a 3D transformation about a pivot point.
template<class ROT>
void getZYXRotationParameters (const ROT &rotation, double &rotX, double &rotY, double &rotZ)
 Starting from any MathCore supported 3D rotation, obtain the equivalent Euler 321 rotation parameters.
int compare (const double x1, const double x2, const double eps)
 Compare double/floating numbers.
int compare (const double x1, const double x2)
 Compare double/floating numbers.
const std::string print (const double value, const char *format="%9.3g")
 print double value using format
const std::string print (const long value, const char *format="%d")
 print long value using format
Servicesservices ()
 Gets an instance of Services.
const Gaudi::Transform3D localDeltaMatrix (const IDetectorElement *DE, const Gaudi::Transform3D &globalDelta)
 Obtain the 3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.
const Gaudi::Transform3D localDeltaMatrix (const IGeometryInfo *GI, const Gaudi::Transform3D &globalDelta)
 Obtain the 3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.
void localDeltaParameters (const IDetectorElement *DE, std::vector< double > &trans, std::vector< double > &rot, std::vector< double > &pivot)
 Transform the nine 3D transformation parameters from the global frame into the local one.
void localDeltaParameters (const IGeometryInfo *GI, std::vector< double > &trans, std::vector< double > &rot, std::vector< double > &pivot)
 Transform the nine 3D transformation parameters from the global frame into the local one.
const Gaudi::Transform3D localDeltaFromGlobalTransform (const IDetectorElement *DE, const Gaudi::Transform3D &globalTransform)
 Obtain the local delta transformation starting from a global position transformation.
const Gaudi::Transform3D localDeltaFromGlobalTransform (const IGeometryInfo *GI, const Gaudi::Transform3D &globalTransform)
 Obtain the local delta transformation starting from a global position transformation.
const Gaudi::Transform3D localDeltaFromParentTransform (const IDetectorElement *parentDE, const IDetectorElement *DE, const Gaudi::Transform3D &parentTransform)
 Obtain the local delta transformation starting from a position transformation from an arbitrary parent.
const Gaudi::Transform3D localDeltaFromParentTransform (const IGeometryInfo *parentGI, const IGeometryInfo *GI, const Gaudi::Transform3D &parentTransform)
 Obtain the local delta transformation starting from a position transformation from an arbitrary parent.
const Gaudi::Transform3D localDeltaFromAnyFrame (const Gaudi::Transform3D &frame, const IDetectorElement *DE, const Gaudi::Transform3D &toGlobalInFrame)
 Obtain the local delta transformation starting from a position transformation from an arbitrary frame.
const Gaudi::Transform3D localDeltaFromAnyFrame (const Gaudi::Transform3D &frame, const IGeometryInfo *GI, const Gaudi::Transform3D &toGlobalInFrame)
 Obtain the local delta transformation starting from a position transformation from an arbitrary frame.
const Gaudi::Transform3D localDeltaFromAnyFrameDelta (const Gaudi::Transform3D &frame, const IDetectorElement *DE, const Gaudi::Transform3D &deltaInFrame)
 Obtain the local delta transformation starting from an off-nominal transformation from an arbitrary frame.
const Gaudi::Transform3D localDeltaFromAnyFrameDelta (const Gaudi::Transform3D &frame, const IGeometryInfo *GI, const Gaudi::Transform3D &deltaInFrame)
 Obtain the local delta transformation starting from an off-nominal transformation from an arbitrary frame.
const Gaudi::Transform3D globalDeltaFromLocalDeltaPrime (const IDetectorElement *DE, const Gaudi::Transform3D &deltaPrime)
 Obtain a global off-nominal correction D_global on top of the current total transformation of detector element DE, T_global, starting from a correction D' calculated at the local level of DE such that.
const Gaudi::Transform3D globalDeltaFromLocalDeltaPrime (const IGeometryInfo *GI, const Gaudi::Transform3D &deltaPrime)
 Obtain a global off-nominal correction D_global on top of the current total transformation of GeometryInfo GI, T_global, starting from a correction D' calculated at the local level of GI such that.
const Gaudi::Transform3D globalDelta (const IDetectorElement *DE)
 Obtain the global "delta" transformation corresponding to detector element DE's local "delta" such that.
const Gaudi::Transform3D globalDelta (const IGeometryInfo *GI)
 Obtain the global "delta" transformation corresponding to IGeometryInfo GI's local "delta" such that.
const Gaudi::Transform3D relativeTransformation (const IDetectorElement *referenceDE, const IDetectorElement *DE)
 Obtain the 3D transformation, T_relative, representing the placement of DetectorElement DE in the frame of DetectorElement referenceDE.
const Gaudi::Transform3D LHCb2SU ()
 Get the LHCb -> SU 3D transformation.
const Gaudi::Transform3D SU2LHCb ()
 Get the SU -> LHCb 3D transformation.
template<typename Point>
const Point LHCb2SU (const Point &point)
 Helper to transform any type of MathCore point.
template<typename Point>
const Point SU2LHCb (const Point &point)
 Helper to transform any type of MathCore point.

Variables

const double s_tolerance = 2.e-8
 the relative tolerance of tick/intersection comparison

Detailed Description

DetDesc.h "DetDesc/DetDesc.h".

single access point to several usefull methods and accessor. The main goal here is to cache references to very usefull services to avoid a call to Service::service from each small component or object.

Author:
Vanya Belyaev Ivan.Belyaev@itep.ru

Sebastien Ponce


Function Documentation

const Gaudi::Transform3D DetDesc::localToGlobalTransformation ( const std::vector< double > &  translationParams,
const std::vector< double > &  rotationParams,
const std::vector< double > &  pivotParams 
)

Build the local to global transformation matrix given.

Author:
Juan Palacios
Date:
2007-06-13
Parameters:
translationParams vector containing the X,Y,Z coordinates of the translation part of the transformation
rotationParams vector containing the rotation angles about the X,Y,Z axes. The rotation is applied in the following order: Z-Y'-X"
pivotParams vector containing the X,Y,Z coordinates of a pivot point for the rotation part of the transformation.
Returns:
The full 3D transformation object.
Author:
Juan Palacios juan.palacios@nikhef.nl

void DetDesc::getZYXTransformParameters ( const Gaudi::Transform3D CDM,
std::vector< double > &  translationParams,
std::vector< double > &  rotationParams,
const std::vector< double > &  pivotParams = std::vector< double >(3, 0.) 
)

Get the three rotation angles and three translation coordinates from a 3D transformation about a pivot point.

Author:
Juan Palacios juan.palacios@nikhef.nl
Parameters:
CDM 3D transformation object AKA cosine direction matrix
translationParams vector containing X,Y and Z of translation transformation.
rotationParams vector containing the rotations about the X,Y,Z axes. The rotations are applied in the following order: Z-Y'-X"
pivotParams pivot point about which the 3D transformation is to be decomposed.

template<class ROT>
void DetDesc::getZYXRotationParameters ( const ROT &  rotation,
double &  rotX,
double &  rotY,
double &  rotZ 
)

Starting from any MathCore supported 3D rotation, obtain the equivalent Euler 321 rotation parameters.

Euler 321: Rotation about Z, Y', X" (co-moving axes)

Parameters:
rotation Any Mathcore-supported 3D rotation
rotX rotation angle about X" axis
rotY rotation angle about Y' axis
rotZ rotation angle about Z axis
Author:
Juan Palacios juan.palacios@nikhef.nl
Date:
2008-01-14

Definition at line 68 of file 3DTransformationFunctions.h.

00072   {
00073     ROOT::Math::RotationZYX euler321 = ROOT::Math::RotationZYX(rotation);
00074     euler321.GetComponents(rotZ, rotY, rotX); 
00075   }

int DetDesc::compare ( const double  x1,
const double  x2,
const double  eps 
) [inline]

Compare double/floating numbers.

See also:
gsl_fcmp
Parameters:
x1 the first value to be compared
x2 the second valeu to be compared
eps the RELATIVE precision
Returns:
-1 if x1 < x2 , 0 if x1 == x2 and +1 if x1 > x2
Warning:
it is not a right method to compare with ZERO!
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-12-13

Definition at line 33 of file Compare.h.

00035                        { return gsl_fcmp ( x1 , x2 , eps ) ; }

int DetDesc::compare ( const double  x1,
const double  x2 
) [inline]

Compare double/floating numbers.

See also:
gsl_fcmp
Parameters:
x1 the first value to be compared
x2 the second valeu to be compared
Returns:
-1 if x1 < x2 , 0 if x1 == x2 and +1 if x1 > x2
Warning:
it is not a right method to compare with ZERO!
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-12-13

Definition at line 47 of file Compare.h.

00049   { return DetDesc::compare ( x1 , x2 , s_tolerance ) ; }

const std::string DetDesc::print ( const double  value,
const char *  format = "%9.3g" 
)

print double value using format

Parameters:
value value to be printed
format desirable format representation of the "value"

const std::string DetDesc::print ( const long  value,
const char *  format = "%d" 
)

print long value using format

Parameters:
value value to be printed
format desirable format representation of the "value"

Services* DetDesc::services (  ) 

Gets an instance of Services.

const Gaudi::Transform3D DetDesc::localDeltaMatrix ( const IDetectorElement DE,
const Gaudi::Transform3D globalDelta 
)

Obtain the 3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.

Parameters:
DE detector element in question.
globalDelta 3D transformation that takes global nominal position matrix and applies misalignment: Misaligned position matrix = globalDelta*M_nominal_global
Returns:
3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-05-31
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::localDeltaMatrix ( const IGeometryInfo GI,
const Gaudi::Transform3D globalDelta 
)

Obtain the 3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.

Parameters:
GI IGeometryInfo from detector element in question.
globalDelta 3D transformation that takes global nominal position matrix and applies misalignment: Misaligned position matrix = globalDelta*M_nominal_global
Returns:
3D transformation that applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-05-31
Author:
Juan Palacios juan.palacios@nikhef.nl

void DetDesc::localDeltaParameters ( const IDetectorElement DE,
std::vector< double > &  trans,
std::vector< double > &  rot,
std::vector< double > &  pivot 
)

Transform the nine 3D transformation parameters from the global frame into the local one.

Author:
Juan Palacios juan.palacios@nikhef.nl
Date:
2007-06-07
Parameters:
DE Pointer to the IDetectorElement of the "local" detector element.
trans global 3D translation parameters. Gets filled with local parameters.
rot global 3D ZYX rotation parameters. Gets filled with local parameters.
pivot global 3D pivot parameters. Gets filled with local pivot parameters. These are constant and get taken directly from the conditions database.

void DetDesc::localDeltaParameters ( const IGeometryInfo GI,
std::vector< double > &  trans,
std::vector< double > &  rot,
std::vector< double > &  pivot 
)

Transform the nine 3D transformation parameters from the global frame into the local one.

Author:
Juan Palacios juan.palacios@nikhef.nl
Date:
2007-06-07
Parameters:
GI Pointer to the IGeometryInfo of the "local" detector element.
trans global 3D translation parameters. Gets filled with local parameters.
rot global 3D ZYX rotation parameters. Gets filled with local parameters.
pivot global 3D pivot parameters. Gets filled with local pivot parameters. These are constant and get taken directly from the conditions database.

const Gaudi::Transform3D DetDesc::localDeltaFromGlobalTransform ( const IDetectorElement DE,
const Gaudi::Transform3D globalTransform 
)

Obtain the local delta transformation starting from a global position transformation.

Parameters:
DE detector element in question.
globalTransform 3D transformation that describes the total "misaligned" global matrix T' Misaligned position matrix T' = T * globalDelta^-1 * globalDelta'
Returns:
3D transformation that globalDelta' applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::localDeltaFromGlobalTransform ( const IGeometryInfo GI,
const Gaudi::Transform3D globalTransform 
)

Obtain the local delta transformation starting from a global position transformation.

Parameters:
GI the IGeometryInfo of the detector element in question
globalTransform 3D transformation that describes the total "misaligned" global matrix T' Misaligned position matrix T' = T * globalDelta^-1 * globalDelta'
Returns:
3D transformation that globalDelta' applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::localDeltaFromParentTransform ( const IDetectorElement parentDE,
const IDetectorElement DE,
const Gaudi::Transform3D parentTransform 
)

Obtain the local delta transformation starting from a position transformation from an arbitrary parent.

Parameters:
parentDE the IDetectorElement of the parent with respect to which the position is taken
DE detector element in question.
parentTransform 3D transformation that describes the total "misaligned" global matrix T_k' in the frame of parentDE Misaligned position matrix T_k' = T_k * globalDelta^-1 * globalDelta'
Returns:
3D transformation that globalDelta' applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentDE really being a parent of DE

const Gaudi::Transform3D DetDesc::localDeltaFromParentTransform ( const IGeometryInfo parentGI,
const IGeometryInfo GI,
const Gaudi::Transform3D parentTransform 
)

Obtain the local delta transformation starting from a position transformation from an arbitrary parent.

Parameters:
parentGI the IGeometryInfo of the parent with respect to which the position is taken
GI the IGeometryInfo of the detector element in question
parentTransform 3D transformation that describes the total "misaligned" global matrix T' in the frame of parentGI Misaligned position matrix T_k' = T_k * globalDelta^-1 * globalDelta'
Returns:
3D transformation that globalDelta' applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentGI really being a parent of GI

const Gaudi::Transform3D DetDesc::localDeltaFromAnyFrame ( const Gaudi::Transform3D frame,
const IDetectorElement DE,
const Gaudi::Transform3D toGlobalInFrame 
)

Obtain the local delta transformation starting from a position transformation from an arbitrary frame.

Parameters:
frame the Transform3D of the frame with respect to which the position is taken
DE the detector element in question
toGlobalInFrame 3D transformation that describes the total "misaligned" global matrix T' in the frame of parentGI Misaligned position matrix T_k' = T_k * globalDelta^-1 * globalDelta'
Returns:
3D transformation that globalDelta' applies misalignment from nominal position in the frame of the detector element's parent.
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentGI really being a parent of GI

const Gaudi::Transform3D DetDesc::localDeltaFromAnyFrame ( const Gaudi::Transform3D frame,
const IGeometryInfo GI,
const Gaudi::Transform3D toGlobalInFrame 
)

Obtain the local delta transformation starting from a position transformation from an arbitrary frame.

Parameters:
frame the Transform3D of the frame with respect to which the position is taken
GI the IGeometryInfo of the detector element in question
toGlobalInFrame 3D transformation that describes the total "misaligned" global matrix T' in frame
Returns:
3D transformation representing the local off-nominal matrix for GI, including the previously existing one. That is, should replace, not increment, what was there before
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentGI really being a parent of GI

const Gaudi::Transform3D DetDesc::localDeltaFromAnyFrameDelta ( const Gaudi::Transform3D frame,
const IDetectorElement DE,
const Gaudi::Transform3D deltaInFrame 
)

Obtain the local delta transformation starting from an off-nominal transformation from an arbitrary frame.

Parameters:
frame the Transform3D of the frame with respect to which the position is taken
DE the detector element in question
deltaInFrame 3D transformation that describes the "misalignement" correction transformation D_frame' in frame
Returns:
3D transformation representing the local off-nominal matrix for GI, including the previously existing one. That is, should replace, not increment, what was there before
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentGI really being a parent of GI

const Gaudi::Transform3D DetDesc::localDeltaFromAnyFrameDelta ( const Gaudi::Transform3D frame,
const IGeometryInfo GI,
const Gaudi::Transform3D deltaInFrame 
)

Obtain the local delta transformation starting from an off-nominal transformation from an arbitrary frame.

Parameters:
frame the Transform3D of the frame with respect to which the position is taken
GI the IGeometryInfo of the detector element in question
deltaInFrame 3D transformation that describes the "misalignement" correction transformation D_frame' in frame
Returns:
3D transformation representing the local off-nominal matrix for GI, including the previously existing one. That is, should replace, not increment, what was there before
Date:
2007-07-11
Author:
Juan Palacios juan.palacios@nikhef.nl
Todo:
Add check for parentGI really being a parent of GI

const Gaudi::Transform3D DetDesc::globalDeltaFromLocalDeltaPrime ( const IDetectorElement DE,
const Gaudi::Transform3D deltaPrime 
)

Obtain a global off-nominal correction D_global on top of the current total transformation of detector element DE, T_global, starting from a correction D' calculated at the local level of DE such that.

D_global * T_global = T_global * D'

D_global = T_global * D' * T_global^-1

Parameters:
DE the DetectorElement in question
deltaPrime the Transform3D representing the correction on the current total transformation of DE
Returns:
Transform3D D_global = T_global * D' * T_global^-1
Date:
2008-01-10
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::globalDeltaFromLocalDeltaPrime ( const IGeometryInfo GI,
const Gaudi::Transform3D deltaPrime 
)

Obtain a global off-nominal correction D_global on top of the current total transformation of GeometryInfo GI, T_global, starting from a correction D' calculated at the local level of GI such that.

D_global * T_global = T_global * D'

D_global = T_global * D' * T_global^-1

Parameters:
GI the IGeometryInfo of the DetectorElement in question
deltaPrime the Transform3D representing the correction on the current total transformation of DE
Returns:
Transform3D D_global = T_global * D' * T_global^-1
Date:
2008-01-10
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::globalDelta ( const IDetectorElement DE  ) 

Obtain the global "delta" transformation corresponding to detector element DE's local "delta" such that.

T_global = D_global * T_global * D_local^-1

D_global = T_global * D_local * T_global^-1

Parameters:
DE the DetectorElement in question
Returns:
Transform3D D_global = T_global * D_local * T_global^-1
Date:
2008-01-10
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::globalDelta ( const IGeometryInfo GI  ) 

Obtain the global "delta" transformation corresponding to IGeometryInfo GI's local "delta" such that.

T_global = D_global * T_global * D_local^-1

D_global = T_global * D_local * T_global^-1

Parameters:
GI the IGeometryInfo of the DetectorElement in question
Returns:
Transform3D D_global = T_global * D_local * T_global^-1
Date:
2008-01-10
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::relativeTransformation ( const IDetectorElement referenceDE,
const IDetectorElement DE 
)

Obtain the 3D transformation, T_relative, representing the placement of DetectorElement DE in the frame of DetectorElement referenceDE.

Date:
2008-01-10
Author:
Juan Palacios juan.palacios@nikhef.nl

const Gaudi::Transform3D DetDesc::LHCb2SU (  ) 

Get the LHCb -> SU 3D transformation.

Returns:
LHCb -> SU 3D transformation
Author:
Juan PALACIOS
Date:
2006-08-08

Definition at line 32 of file SU2LHCb.h.

00033   {
00034     return Gaudi::Transform3D( Gaudi::RotationY( -0.5*Gaudi::Units::pi) *
00035                                Gaudi::RotationZ( -0.5*Gaudi::Units::pi) *
00036                                Gaudi::RotationX( -3.601*Gaudi::Units::mrad) );
00037 
00038                                
00039   }

const Gaudi::Transform3D DetDesc::SU2LHCb (  ) 

Get the SU -> LHCb 3D transformation.

Returns:
SU -> LHCb 3D transformation
Author:
Juan PALACIOS
Date:
2006-08-08

Definition at line 50 of file SU2LHCb.h.

00051   {
00052     return Gaudi::Transform3D( Gaudi::RotationX( 3.601*Gaudi::Units::mrad) *
00053                                Gaudi::RotationZ( 0.5*Gaudi::Units::pi) *
00054                                Gaudi::RotationY( 0.5*Gaudi::Units::pi) );
00055   }

template<typename Point>
const Point DetDesc::LHCb2SU ( const Point &  point  ) 

Helper to transform any type of MathCore point.

  Gaudi::XYZPoint pLHCb( 0.0, 0.0, 9450);
  Gaudi::XYZPoint pSU = DetDesc::LHCb2SU( pLHCb );
Parameters:
point 3D point in LCHb reference frame
Returns:
3D point transformed into SU frame
Author:
Juan PALACIOS
Date:
2006-08-08

Definition at line 71 of file SU2LHCb.h.

00072   {
00073     return LHCb2SU()*point;
00074   }

template<typename Point>
const Point DetDesc::SU2LHCb ( const Point &  point  ) 

Helper to transform any type of MathCore point.

  Gaudi::XYZPoint pSU( 0.0, 0.0, 9450);
  Gaudi::XYZPoint pLHCb = DetDesc::SU2LHCb( pSU );
Parameters:
point 3D point in SU reference frame
Returns:
3D point transformed into LHCb frame
Author:
Juan PALACIOS
Date:
2006-08-08

Definition at line 90 of file SU2LHCb.h.

00091   {
00092     return SU2LHCb()*point;
00093   }


Variable Documentation

DetDesc::s_tolerance = 2.e-8

the relative tolerance of tick/intersection comparison

Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-12-13

Definition at line 20 of file Compare.h.

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:00:22 2011 for DetDesc by doxygen 1.4.7