AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONGeometryTransformer Class Reference

Top container class for geometry transformations. More...

#include <AliMUONGeometryTransformer.h>

Inheritance diagram for AliMUONGeometryTransformer:

Public Member Functions

 AliMUONGeometryTransformer ()
 
 AliMUONGeometryTransformer (TRootIOCtor *)
 
virtual ~AliMUONGeometryTransformer ()
 
void AddModuleTransformer (AliMUONGeometryModuleTransformer *transformer)
 
void AddMisAlignModule (Int_t moduleId, const TGeoHMatrix &matrix, Bool_t bGlobal=kTRUE)
 
void AddMisAlignDetElement (Int_t detElemId, const TGeoHMatrix &matrix, Bool_t bGlobal=kTRUE)
 
void CreateModules ()
 
void AddAlignableVolumes () const
 
TClonesArray * CreateZeroAlignmentData () const
 
void ClearMisAlignmentData ()
 
Bool_t LoadTransformations ()
 
Bool_t LoadGeometryData (const TString &fileName)
 
Bool_t LoadGeometryData ()
 
Bool_t WriteTransformations (const TString &fileName) const
 
Bool_t WriteMisAlignmentData (const TString &fileName) const
 
void Global2Local (Int_t detElemId, Float_t xg, Float_t yg, Float_t zg, Float_t &xl, Float_t &yl, Float_t &zl) const
 
void Global2Local (Int_t detElemId, Double_t xg, Double_t yg, Double_t zg, Double_t &xl, Double_t &yl, Double_t &zl) const
 
void Local2Global (Int_t detElemId, Float_t xl, Float_t yl, Float_t zl, Float_t &xg, Float_t &yg, Float_t &zg) const
 
void Local2Global (Int_t detElemId, Double_t xl, Double_t yl, Double_t zl, Double_t &xg, Double_t &yg, Double_t &zg) const
 
void SetDetName (const TString &detName)
 Set detector name. More...
 
void SetOwner (Bool_t isOwner)
 Set ownership of array module transformers. More...
 
Int_t GetNofModuleTransformers () const
 Return the number of contained module transformers. More...
 
const
AliMUONGeometryModuleTransformer
GetModuleTransformer (Int_t index, Bool_t warn=true) const
 
const
AliMUONGeometryModuleTransformer
GetModuleTransformerByDEId (Int_t detElemId, Bool_t warn=true) const
 
const AliMUONGeometryDetElementGetDetElement (Int_t detElemId, Bool_t warn=true) const
 
const TClonesArray * GetMisAlignmentData () const
 Return the array of misalignment data. More...
 
Bool_t HasDE (Int_t detElemId) const
 
AliMpAreaGetDEArea (Int_t detElemId) const
 

Protected Member Functions

 AliMUONGeometryTransformer (const AliMUONGeometryTransformer &right)
 Not implemented. More...
 
AliMUONGeometryTransformeroperator= (const AliMUONGeometryTransformer &right)
 Not implemented. More...
 

Private Member Functions

void CreateDEAreas () const
 
Bool_t LoadMapping () const
 
AliMUONGeometryModuleTransformerGetModuleTransformerNonConst (Int_t index, Bool_t warn=true) const
 
TGeoHMatrix GetTransform (Double_t x, Double_t y, Double_t z, Double_t a1, Double_t a2, Double_t a3, Double_t a4, Double_t a5, Double_t a6) const
 
void FillModuleTransform (Int_t moduleId, Double_t x, Double_t y, Double_t z, Double_t a1, Double_t a2, Double_t a3, Double_t a4, Double_t a5, Double_t a6)
 
void FillDetElemTransform (Int_t id, Double_t x, Double_t y, Double_t z, Double_t a1, Double_t a2, Double_t a3, Double_t a4, Double_t a5, Double_t a6)
 
TString ReadModuleTransforms (ifstream &in)
 
TString ReadDetElemTransforms (ifstream &in)
 
Bool_t ReadTransformations (const TString &fileName)
 
void WriteTransform (ofstream &out, const TGeoMatrix *transform) const
 
void WriteModuleTransforms (ofstream &out) const
 
void WriteDetElemTransforms (ofstream &out) const
 
TString GetModuleSymName (Int_t moduleId) const
 
TString GetDESymName (Int_t detElemId) const
 

Static Private Member Functions

static const TString & GetDefaultDetectorName ()
 

Private Attributes

TString fDetectorName
 Detector name. More...
 
TObjArrayfModuleTransformers
 array of module transformers More...
 
TClonesArray * fMisAlignArray
 array of misalignment data More...
 
AliMpExMapfDEAreas
 areas of detection elements in global coordinates More...
 

Detailed Description

Top container class for geometry transformations.

Geometry transformations can be filled in these ways:

  • by geometry builder when geometry is built via builders (this way is used when running simulation and building geometry via VirtualMC)
  • from Root geometry file (*.root) or ASCII file (*.dat) using the method LoadGeometryData(const TString& fileName)
  • from geometry loaded in AliGeomManager using the method LoadGeometryData() without arguments
Author
Ivana Hrivnacova, IPN Orsay

Definition at line 39 of file AliMUONGeometryTransformer.h.

Constructor & Destructor Documentation

AliMUONGeometryTransformer::AliMUONGeometryTransformer ( )

Standard constructor

Definition at line 83 of file AliMUONGeometryTransformer.cxx.

AliMUONGeometryTransformer::AliMUONGeometryTransformer ( TRootIOCtor *  )

Default constructor

Definition at line 99 of file AliMUONGeometryTransformer.cxx.

AliMUONGeometryTransformer::~AliMUONGeometryTransformer ( )
virtual

Destructor

Definition at line 110 of file AliMUONGeometryTransformer.cxx.

AliMUONGeometryTransformer::AliMUONGeometryTransformer ( const AliMUONGeometryTransformer right)
protected

Not implemented.

Member Function Documentation

void AliMUONGeometryTransformer::AddAlignableVolumes ( ) const

Set symbolic names and matrices to alignable objects to TGeo

Definition at line 818 of file AliMUONGeometryTransformer.cxx.

Referenced by AliMUONv1::AddAlignableVolumes().

void AliMUONGeometryTransformer::AddMisAlignDetElement ( Int_t  detElemId,
const TGeoHMatrix &  matrix,
Bool_t  bGlobal = kTRUE 
)

Build AliAlignObjMatrix with detection element ID, its volumePath and the given delta transformation matrix

Definition at line 750 of file AliMUONGeometryTransformer.cxx.

Referenced by AliMUONGeometryMisAligner::MisAlign(), AliMUONSurveyUtil::ReAlign(), ReAlign(), and AliMUONAlignmentTask::SaveMisAlignmentData().

void AliMUONGeometryTransformer::AddMisAlignModule ( Int_t  moduleId,
const TGeoHMatrix &  matrix,
Bool_t  bGlobal = kTRUE 
)

Build AliAlignObjMatrix with module ID, its volumePath and the given delta transformation matrix

Definition at line 723 of file AliMUONGeometryTransformer.cxx.

Referenced by AliMUONGeometryMisAligner::MisAlign(), AliMUONGMSSubprocessor::ProcessFile(), AliMUONSurveyUtil::ReAlign(), ReAlign(), and AliMUONAlignmentTask::SaveMisAlignmentData().

void AliMUONGeometryTransformer::AddModuleTransformer ( AliMUONGeometryModuleTransformer transformer)
void AliMUONGeometryTransformer::ClearMisAlignmentData ( )

Clear the array of misalignment data

Definition at line 929 of file AliMUONGeometryTransformer.cxx.

Referenced by AliMUONGMSSubprocessor::ProcessFile(), and AliMUONAlignmentTask::SaveMisAlignmentData().

void AliMUONGeometryTransformer::CreateDEAreas ( ) const
private

Create DE areas

Generate the DE areas in global coordinates

Definition at line 138 of file AliMUONGeometryTransformer.cxx.

Referenced by GetDEArea().

void AliMUONGeometryTransformer::CreateModules ( )

Create modules and their detection elements using info from mapping; but do not fill matrices

Definition at line 778 of file AliMUONGeometryTransformer.cxx.

Referenced by AliMUONGMSSubprocessor::Initialize(), and LoadGeometryData().

TClonesArray * AliMUONGeometryTransformer::CreateZeroAlignmentData ( ) const

Create array with zero alignment data

Definition at line 876 of file AliMUONGeometryTransformer.cxx.

Referenced by MakeMUONZeroMisAlignment().

void AliMUONGeometryTransformer::FillDetElemTransform ( Int_t  id,
Double_t  x,
Double_t  y,
Double_t  z,
Double_t  a1,
Double_t  a2,
Double_t  a3,
Double_t  a4,
Double_t  a5,
Double_t  a6 
)
private

Fill the transformation of the detection element.

Definition at line 286 of file AliMUONGeometryTransformer.cxx.

Referenced by ReadDetElemTransforms().

void AliMUONGeometryTransformer::FillModuleTransform ( Int_t  moduleId,
Double_t  x,
Double_t  y,
Double_t  z,
Double_t  a1,
Double_t  a2,
Double_t  a3,
Double_t  a4,
Double_t  a5,
Double_t  a6 
)
private

Fill the transformation of the module.

Definition at line 262 of file AliMUONGeometryTransformer.cxx.

Referenced by ReadModuleTransforms().

AliMpArea * AliMUONGeometryTransformer::GetDEArea ( Int_t  detElemId) const
const TString & AliMUONGeometryTransformer::GetDefaultDetectorName ( )
staticprivate

Default detector name

Definition at line 71 of file AliMUONGeometryTransformer.cxx.

TString AliMUONGeometryTransformer::GetDESymName ( Int_t  detElemId) const
private

Return the detection element symbolic name (used for alignment)

Definition at line 534 of file AliMUONGeometryTransformer.cxx.

Referenced by AddAlignableVolumes(), AddMisAlignDetElement(), CreateZeroAlignmentData(), and LoadTransformations().

const AliMUONGeometryDetElement * AliMUONGeometryTransformer::GetDetElement ( Int_t  detElemId,
Bool_t  warn = true 
) const
TString AliMUONGeometryTransformer::GetModuleSymName ( Int_t  moduleId) const
private

Return the module symbolic name (use for alignment)

Definition at line 525 of file AliMUONGeometryTransformer.cxx.

Referenced by AddAlignableVolumes(), AddMisAlignModule(), CreateZeroAlignmentData(), GetDESymName(), and LoadTransformations().

const AliMUONGeometryModuleTransformer * AliMUONGeometryTransformer::GetModuleTransformer ( Int_t  index,
Bool_t  warn = true 
) const
const AliMUONGeometryModuleTransformer * AliMUONGeometryTransformer::GetModuleTransformerByDEId ( Int_t  detElemId,
Bool_t  warn = true 
) const

Return the geometry module transformer specified by detection element ID

Definition at line 1011 of file AliMUONGeometryTransformer.cxx.

Referenced by GetDetElement(), Global2Local(), HasDE(), Local2Global(), MUONSurveyCh1(), MUONSurveyCh2(), MUONSurveyCh3(), MUONSurveyCh4(), and MUONSurveyCh5().

AliMUONGeometryModuleTransformer * AliMUONGeometryTransformer::GetModuleTransformerNonConst ( Int_t  index,
Bool_t  warn = true 
) const
private

Return the geometry module specified by index

Definition at line 231 of file AliMUONGeometryTransformer.cxx.

Referenced by FillModuleTransform(), and GetModuleTransformer().

Int_t AliMUONGeometryTransformer::GetNofModuleTransformers ( ) const
inline

Return the number of contained module transformers.

Definition at line 158 of file AliMUONGeometryTransformer.h.

Referenced by AliMUONGeometryMisAligner::MisAlign(), AliMUONSurveyUtil::ReAlign(), AliMUONAlignment::ReAlign(), and ReAlign().

TGeoHMatrix AliMUONGeometryTransformer::GetTransform ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  a1,
Double_t  a2,
Double_t  a3,
Double_t  a4,
Double_t  a5,
Double_t  a6 
) const
private

Build the transformation from the given parameters

Definition at line 248 of file AliMUONGeometryTransformer.cxx.

Referenced by FillDetElemTransform(), and FillModuleTransform().

void AliMUONGeometryTransformer::Global2Local ( Int_t  detElemId,
Float_t  xg,
Float_t  yg,
Float_t  zg,
Float_t &  xl,
Float_t &  yl,
Float_t &  zl 
) const
void AliMUONGeometryTransformer::Global2Local ( Int_t  detElemId,
Double_t  xg,
Double_t  yg,
Double_t  zg,
Double_t &  xl,
Double_t &  yl,
Double_t &  zl 
) const

Transform point from the global reference frame (ALIC) to the local reference frame of the detection element specified by detElemId.

Definition at line 955 of file AliMUONGeometryTransformer.cxx.

Bool_t AliMUONGeometryTransformer::HasDE ( Int_t  detElemId) const

Return true if detection element with given detElemId is defined

Definition at line 1037 of file AliMUONGeometryTransformer.cxx.

Referenced by CreateDEAreas().

Bool_t AliMUONGeometryTransformer::LoadGeometryData ( )

Load geometry data from already loaded Root geometry using AliGeomManager

Definition at line 628 of file AliMUONGeometryTransformer.cxx.

Bool_t AliMUONGeometryTransformer::LoadMapping ( ) const
private

Load mapping from CDB

Definition at line 216 of file AliMUONGeometryTransformer.cxx.

Referenced by CreateModules().

Bool_t AliMUONGeometryTransformer::LoadTransformations ( )

Load transformations for defined modules and detection elements using AliGeomManager

Definition at line 551 of file AliMUONGeometryTransformer.cxx.

Referenced by LoadGeometryData(), and AliMUONGeometryBuilder::UpdateInternalGeometry().

void AliMUONGeometryTransformer::Local2Global ( Int_t  detElemId,
Double_t  xl,
Double_t  yl,
Double_t  zl,
Double_t &  xg,
Double_t &  yg,
Double_t &  zg 
) const

Transform point from the local reference frame of the detection element specified by detElemId to the global reference frame (ALIC).

Definition at line 986 of file AliMUONGeometryTransformer.cxx.

AliMUONGeometryTransformer& AliMUONGeometryTransformer::operator= ( const AliMUONGeometryTransformer right)
protected

Not implemented.

TString AliMUONGeometryTransformer::ReadDetElemTransforms ( ifstream &  in)
private

Read detection elements transformations from the stream. Return true, if reading finished correctly.

Definition at line 371 of file AliMUONGeometryTransformer.cxx.

Referenced by ReadTransformations().

TString AliMUONGeometryTransformer::ReadModuleTransforms ( ifstream &  in)
private

Read and fill modules transformations from the stream. Return true, if reading finished correctly.

Definition at line 329 of file AliMUONGeometryTransformer.cxx.

Referenced by ReadTransformations().

Bool_t AliMUONGeometryTransformer::ReadTransformations ( const TString &  fileName)
private

Read transformations from a file. Return true, if reading finished correctly.

Definition at line 416 of file AliMUONGeometryTransformer.cxx.

Referenced by LoadGeometryData().

void AliMUONGeometryTransformer::SetDetName ( const TString &  detName)
inline

Set detector name.

Definition at line 166 of file AliMUONGeometryTransformer.h.

void AliMUONGeometryTransformer::SetOwner ( Bool_t  isOwner)
inline

Set ownership of array module transformers.

Definition at line 170 of file AliMUONGeometryTransformer.h.

void AliMUONGeometryTransformer::WriteDetElemTransforms ( ofstream &  out) const
private

Write detection element transformations for all detection elements in all module transformers

Definition at line 498 of file AliMUONGeometryTransformer.cxx.

Referenced by WriteTransformations().

Bool_t AliMUONGeometryTransformer::WriteMisAlignmentData ( const TString &  fileName) const

Write misalignment data into a file Return true, if writing finished correctly.

Definition at line 676 of file AliMUONGeometryTransformer.cxx.

Referenced by MUONCheckMisAligner().

void AliMUONGeometryTransformer::WriteModuleTransforms ( ofstream &  out) const
private

Write module transformations for all module transformers

Definition at line 478 of file AliMUONGeometryTransformer.cxx.

Referenced by WriteTransformations().

void AliMUONGeometryTransformer::WriteTransform ( ofstream &  out,
const TGeoMatrix *  transform 
) const
private

Write given transformation

Definition at line 451 of file AliMUONGeometryTransformer.cxx.

Referenced by WriteDetElemTransforms(), and WriteModuleTransforms().

Bool_t AliMUONGeometryTransformer::WriteTransformations ( const TString &  fileName) const

Write transformations into a file. Return true, if writing finished correctly.

Definition at line 644 of file AliMUONGeometryTransformer.cxx.

Referenced by MUONCheckMisAligner(), MUONGenerateGeometryData(), MUONSurveyCh1(), MUONSurveyCh2(), MUONSurveyCh3(), MUONSurveyCh4(), MUONSurveyCh5(), and MUONSurveyCh8L().

Member Data Documentation

AliMpExMap* AliMUONGeometryTransformer::fDEAreas
mutableprivate

areas of detection elements in global coordinates

Definition at line 150 of file AliMUONGeometryTransformer.h.

Referenced by CreateDEAreas(), GetDEArea(), and ~AliMUONGeometryTransformer().

TString AliMUONGeometryTransformer::fDetectorName
private

Detector name.

Definition at line 147 of file AliMUONGeometryTransformer.h.

Referenced by GetModuleSymName(), and SetDetName().

TClonesArray* AliMUONGeometryTransformer::fMisAlignArray
private

The documentation for this class was generated from the following files: