#include <iostream>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometry)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometry::AliMUONGeometry(Bool_t isOwner)
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometry::AliMUONGeometry(const AliMUONGeometry& right)
- : TObject(right)
-{
-/// Copy constructor (not implemented)
-
- AliFatal("Copy constructor not provided.");
-}
-
//______________________________________________________________________________
AliMUONGeometry::~AliMUONGeometry()
{
delete fTransformer;
}
-//______________________________________________________________________________
-AliMUONGeometry&
-AliMUONGeometry::operator=(const AliMUONGeometry& right)
-{
-/// Assignement operator (not implemented)
-
- // check assignement to self
- if (this == &right) return *this;
-
- AliFatal("Assignement operator not provided.");
-
- return *this;
-}
-
//
// private methods
//
TString AliMUONGeometry::ComposePath(const TString& volName,
Int_t copyNo) const
{
-// Compose path from given volName and copyNo
-// ---
+/// Compose path from given volName and copyNo
TString path(volName);
path += ".";
void AliMUONGeometry::FillData3(const TString& sensVolumePath,
Int_t detElemId)
{
-// Fill the mapping of the sensitive volume path to the detection element.
-// ---
+/// Fill the mapping of the sensitive volume path to the detection element.
// Module Id
Int_t moduleId = AliMUONGeometryStore::GetModuleId(detElemId);
//______________________________________________________________________________
TString AliMUONGeometry::ReadData3(ifstream& in)
{
-// Reads SV maps from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read SV maps from a file.
+/// Return true, if reading finished correctly.
TString key("SV");
while ( key == TString("SV") ) {
//______________________________________________________________________________
void AliMUONGeometry::WriteData3(ofstream& out) const
{
-// Writes association of sensitive volumes and detection elements
-// from the sensitive volume map
-// ---
+/// Write association of sensitive volumes and detection elements
+/// from the sensitive volume map
for (Int_t i=0; i<fModules->GetEntriesFast(); i++) {
AliMUONGeometryModule* geometry
//_____________________________________________________________________________
void AliMUONGeometry::AddModule(AliMUONGeometryModule* module)
{
-/// Add the geometrymodule to the array
+/// Add the geometry module to the array
fModules->Add(module);
Bool_t
AliMUONGeometry::ReadSVMap(const TString& fileName)
{
-// Reads the sensitive volume maps from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read the sensitive volume maps from a file.
+/// Return true, if reading finished correctly.
// No reading
// if builder is not associated with any geometry module
Bool_t
AliMUONGeometry::WriteSVMap(const TString& fileName) const
{
-// Writes sensitive volume map into a file
-// Returns true, if writing finished correctly.
-// ---
+/// Write sensitive volume map into a file.
+/// Return true, if writing finished correctly.
// No writing
// if builder is not associated with any geometry module
const AliMUONGeometryModule*
AliMUONGeometry::GetModuleByDEId(Int_t detElemId, Bool_t warn) const
{
-/// Return the geometry module specified by index
+/// Return the geometry module specified by detElemId
// Get module index
Int_t index = AliMUONGeometryStore::GetModuleId(detElemId);
/// \class AliMUONGeometry
/// \brief Container class for geometry modules
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_H
#define ALI_MUON_GEOMETRY_H
ClassDef(AliMUONGeometry,1) // Geometry parametrisation
};
+/// Return geometry transformer
inline AliMUONGeometryTransformer* AliMUONGeometry::GetTransformer() const
{ return fTransformer; }
const TString AliMUONGeometryBuilder::fgkDefaultSVMapFileName = "svmap.dat";
const TString AliMUONGeometryBuilder::fgkOutFileNameExtension = ".out";
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryBuilder)
+/// \endcond
// static functions
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometryBuilder::AliMUONGeometryBuilder(const AliMUONGeometryBuilder& right)
- : TObject(right)
-{
-/// Copy constructor (not implemented)
-
- AliFatal("Copy constructor not provided.");
-}
-
//______________________________________________________________________________
AliMUONGeometryBuilder::~AliMUONGeometryBuilder()
{
delete fGeometry;
}
-//______________________________________________________________________________
-AliMUONGeometryBuilder&
-AliMUONGeometryBuilder::operator=(const AliMUONGeometryBuilder& right)
-{
-/// Assignement operator (not implemented)
-
- // check assignement to self
- if (this == &right) return *this;
-
- AliFatal("Assignement operator not provided.");
-
- return *this;
-}
-
//
// private functions
//
void AliMUONGeometryBuilder::CreateGeometryWithoutTGeo()
{
/// Construct geometry using geometry builders.
-/// Virtual modules/enevlopes are not placed
+/// Virtual modules/envelopes are not placed
if (fAlign) {
// Read transformations from ASCII data file
//_____________________________________________________________________________
void AliMUONGeometryBuilder::SetAlign(const TString& fileName, Bool_t align)
{
-/// Set the option for alignement
+/// Set the option for alignement and the transformations file name
fTransformFileName = fileName;
fAlign = align;
/// \class AliMUONGeometryBuilder
/// \brief Manager class for geometry construction via geometry builders.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_BUILDER_H
#define ALI_MUON_GEOMETRY_BUILDER_H
// inline functions
+/// Initialize geometry
inline void AliMUONGeometryBuilder::InitGeometry()
{ InitGeometry(fSVMapFileName); }
+/// Write sensitive volume maps
inline void AliMUONGeometryBuilder::WriteSVMaps()
{ WriteSVMaps(fSVMapFileName + fgkOutFileNameExtension); }
+/// Return geometry parametrisation
inline
const AliMUONGeometry* AliMUONGeometryBuilder::GetGeometry() const
{ return fGeometry; }
+/// Return geometry transformer
inline
const AliMUONGeometryTransformer* AliMUONGeometryBuilder::GetTransformer() const
{ return fGeometry->GetTransformer(); }
+/// Return option for reading transformations from a file
inline Bool_t AliMUONGeometryBuilder::GetAlign() const
{ return fAlign; }
#include "AliMUONGeometryConstituent.h"
#include "AliLog.h"
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryConstituent)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
: TNamed(name, name),
fCopyNo(copyNo),
fNpar(npar),
- fParam(0)
+ fParam(0),
+ fTransformation(0)
{
/// Standard constructor for a constituent without translation & rotation
/// Default constructor
}
-
-//______________________________________________________________________________
-AliMUONGeometryConstituent::AliMUONGeometryConstituent(
- const AliMUONGeometryConstituent& rhs)
- : TNamed(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
{
delete fTransformation;
delete [] fParam;
}
-
-//______________________________________________________________________________
-AliMUONGeometryConstituent&
-AliMUONGeometryConstituent::operator = (const AliMUONGeometryConstituent& rhs)
-{
-/// Protected assignment operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
/// \class AliMUONGeometryConstituent
/// \brief Helper class for definititon of an assembly of volumes.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_CONSTITUENT_H
#define ALI_MUON_GEOMETRY_CONSTITUENT_H
protected:
AliMUONGeometryConstituent(const AliMUONGeometryConstituent& rhs);
-
- // operators
AliMUONGeometryConstituent& operator = (const AliMUONGeometryConstituent& rhs);
private:
// inline functions
+/// Return copy number
inline Int_t AliMUONGeometryConstituent::GetCopyNo() const
{ return fCopyNo; }
+/// Return number of shape parameters
inline Int_t AliMUONGeometryConstituent::GetNpar() const
{ return fNpar; }
+/// Return the array of shape parameters
inline Double_t* AliMUONGeometryConstituent::GetParam() const
{ return fParam; }
+/// Return the constituent transformation wrt to the envelope
inline const TGeoCombiTrans* AliMUONGeometryConstituent::GetTransformation() const
{ return fTransformation; }
#include <sstream>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryDetElement)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryDetElement::AliMUONGeometryDetElement(
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometryDetElement::AliMUONGeometryDetElement(
- const AliMUONGeometryDetElement& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryDetElement::~AliMUONGeometryDetElement()
{
delete fGlobalTransformation;
}
-//______________________________________________________________________________
-AliMUONGeometryDetElement&
-AliMUONGeometryDetElement::operator = (const AliMUONGeometryDetElement& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
void AliMUONGeometryDetElement::PrintTransform(
const TGeoHMatrix* transform) const
{
-/// Prints the detection element transformation
+/// Print the detection element transformation
cout << "DetElemId: " << GetUniqueID();
cout << " name: " << fVolumePath << endl;
Float_t xg, Float_t yg, Float_t zg,
Float_t& xl, Float_t& yl, Float_t& zl) const
{
-/// Transforms point from the global reference frame (ALIC)
-/// to the local reference frame of the detection element specified
-/// by detElemId.
+/// Transform point from the global reference frame (ALIC)
+/// to the local reference frame of this detection element.
Double_t dxg = xg;
Double_t dyg = yg;
Double_t xg, Double_t yg, Double_t zg,
Double_t& xl, Double_t& yl, Double_t& zl) const
{
-/// Transforms point from the global reference frame (ALIC)
-/// to the local reference frame of the detection element specified
-/// by detElemId.
+/// Transform point from the global reference frame (ALIC)
+/// to the local reference frame of this detection element
// Check transformation
if (!fGlobalTransformation) {
Float_t xl, Float_t yl, Float_t zl,
Float_t& xg, Float_t& yg, Float_t& zg) const
{
-/// Transforms point from the local reference frame of the detection element
-/// specified by detElemId to the global reference frame (ALIC).
+/// Transform point from the local reference frame of this detection element
+/// to the global reference frame (ALIC).
Double_t dxl = xl;
Double_t dyl = yl;
Double_t xl, Double_t yl, Double_t zl,
Double_t& xg, Double_t& yg, Double_t& zg) const
{
-/// Transforms point from the local reference frame of the detection element
-/// specified by detElemId to the global reference frame (ALIC).
+/// Transform point from the local reference frame of this detection element
+/// to the global reference frame (ALIC).
// Check transformation
if (!fGlobalTransformation) {
void AliMUONGeometryDetElement::SetLocalTransformation(
const TGeoHMatrix& transform)
{
-/// Sets global transformation;
-/// gives warning if the global transformation is already defined.
+/// Set local transformation;
+/// give warning if the global transformation is already defined.
if (fLocalTransformation) {
delete fLocalTransformation;
void AliMUONGeometryDetElement::SetGlobalTransformation(
const TGeoHMatrix& transform)
{
-/// Sets global transformation;
-/// gives warning if the global transformation is already defined.
+/// Set global transformation;
+/// give warning if the global transformation is already defined.
if (fGlobalTransformation) {
delete fGlobalTransformation;
//______________________________________________________________________________
void AliMUONGeometryDetElement::PrintLocalTransform() const
{
-/// Prints detection element relative transformation
+/// Print detection element relative transformation
/// (the transformation wrt module frame)
PrintTransform(fLocalTransformation);
//______________________________________________________________________________
void AliMUONGeometryDetElement::PrintGlobalTransform() const
{
-/// Prints detection element global transformation
+/// Print detection element global transformation
/// (the transformation wrt global frame)
PrintTransform(fGlobalTransformation);
/// \class AliMUONGeometryDetElement
/// \brief Class for storing detection element transformations
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_DET_ELEMENT_H
#define ALI_MUON_GEOMETRY_DET_ELEMENT_H
protected:
AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
-
- // operators
AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
private:
// inline functions
+/// Set the full path of the aligned volume or envelope in geometry
inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
{ fVolumePath = volumePath; }
+/// Return detection element ID
inline Int_t AliMUONGeometryDetElement::GetId() const
{ return GetUniqueID(); }
+/// Return the full path of the aligned volume or envelope in geometry
inline TString AliMUONGeometryDetElement::GetVolumePath() const
{ return fVolumePath; }
+/// Return the detection element transformation wrt module
inline const TGeoHMatrix*
AliMUONGeometryDetElement::GetLocalTransformation() const
{ return fLocalTransformation; }
+/// Return the detection element transformation wrt world
inline const TGeoHMatrix*
AliMUONGeometryDetElement::GetGlobalTransformation() const
{ return fGlobalTransformation; }
enum AliMUONGeometryDirection
{
- kDirX, // direction in x
- kDirY, // direction in y
- kDirUndefined // undefined direction
+ kDirX, ///< direction in x
+ kDirY, ///< direction in y
+ kDirUndefined ///< undefined direction
};
#endif //ALI_MUON_GEOMETRY_DIRECTION_H
#include "AliMUONGeometryConstituent.h"
#include "AliLog.h"
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryEnvelope)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryEnvelope::AliMUONGeometryEnvelope(const TString& name,
/// Default constructor
}
-
-//______________________________________________________________________________
-AliMUONGeometryEnvelope::AliMUONGeometryEnvelope(
- const AliMUONGeometryEnvelope& rhs)
- : TNamed(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryEnvelope::~AliMUONGeometryEnvelope()
{
}
}
-//______________________________________________________________________________
-AliMUONGeometryEnvelope&
-AliMUONGeometryEnvelope::operator = (const AliMUONGeometryEnvelope& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// public methods
//
//______________________________________________________________________________
void AliMUONGeometryEnvelope::SetRotation(const TGeoRotation& rotation)
{
-/// Set the enevlope rotation
+/// Set the envelope rotation
TGeoRotation* rot = new TGeoRotation();
rot->SetMatrix(const_cast<Double_t*>(rotation.GetRotationMatrix()));
//______________________________________________________________________________
void AliMUONGeometryEnvelope::SetTransform(const TGeoCombiTrans& transform)
{
-// Sets the enevlope transformation
-// ---
+/// Set the envelope transformation
fTransformation
->SetTranslation(const_cast<Double_t*>(transform.GetTranslation()));
///
/// Helper class for definititon of an assembly of volumes.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_ENVELOPE_H
#define ALI_MUON_GEOMETRY_ENVELOPE_H
protected:
AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
-
- // operators
AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);
private:
// inline functions
+/// Return true if envelope is virtual
inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
{ return fIsVirtual; }
+/// Return true if envelope is placed with MANY option
inline Bool_t AliMUONGeometryEnvelope::IsMANY() const
{ return fIsMANY; }
+/// Return copy number
inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
{ return fCopyNo; }
+/// Return the envelope transformation wrt to the mother frame
+/// (the chamber position)
inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const
{ return fTransformation; }
+/// Return the array of constituents names and transformations
+/// wrt to the envelope position
inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
{ return fConstituents; }
#include <Riostream.h>
#include <TString.h>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryEnvelopeStore)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryEnvelopeStore::AliMUONGeometryEnvelopeStore(
}
-//______________________________________________________________________________
-AliMUONGeometryEnvelopeStore::AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs)
- : TObject(rhs)
-{
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryEnvelopeStore::~AliMUONGeometryEnvelopeStore()
{
}
}
-//______________________________________________________________________________
-AliMUONGeometryEnvelopeStore&
-AliMUONGeometryEnvelopeStore::operator = (const AliMUONGeometryEnvelopeStore& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
TGeoHMatrix
AliMUONGeometryEnvelopeStore::ConvertDETransform(const TGeoHMatrix& transform) const
{
-// Convert transformation into the reference frame
+/// Convert transformation into the reference frame
if ( fReferenceFrame.IsIdentity() )
return transform;
const TString& envName, Int_t copyNo)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoTranslation& translation)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoRotation& rotation)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
const TGeoCombiTrans& transform)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
Int_t npar, Double_t* param)
{
/// Add the volume with the specified name and transformation
-/// to the list of envelopes.
+/// as a constituent of the envelope envName.
if (fDebug) {
cout << "... Adding parameterised constituent " << name
/// Class for definititon of the temporary volume envelopes
/// used in geometry construction
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
#define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
public:
AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements);
AliMUONGeometryEnvelopeStore();
- AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
virtual ~AliMUONGeometryEnvelopeStore();
- // operators
- AliMUONGeometryEnvelopeStore&
- operator = (const AliMUONGeometryEnvelopeStore& rhs);
-
// methods
// adding virtual envelopes
const TObjArray* GetEnvelopes() const;
Int_t GetNofDetElements() const;
+ protected:
+ AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
+ AliMUONGeometryEnvelopeStore& operator = (const AliMUONGeometryEnvelopeStore& rhs);
+
private:
// methods
TGeoHMatrix ConvertDETransform(const TGeoHMatrix& transform) const;
TObjArray* fEnvelopes; ///< \brief the envelopes names and transformations
/// wrt to the chamber position in mother volume
AliMUONGeometryStore* fDetElements; ///< \brief detection elements
- /// used for alignement of enevelopes
+ /// used for alignement of envelopes
TGeoCombiTrans fReferenceFrame; ///< \brief the transformation from the builder
/// reference frame to that of the transform
/// data files
- Bool_t fDebug; ///< Switch for debugging
+ Bool_t fDebug; ///< Switch for debugging \deprecated - use AliLog instead
Bool_t fAlign; ///< option to read transformations from a file
ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
// inline functions
+/// Set debug option
+/// \deprecated - use AliLog instead
inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
{ fDebug = debug; }
+/// Return align option - if true, transformations are read from a file
inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
{ return fAlign; }
+/// Set align option - if true, transformations are read from a file
inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
{ fAlign = align; }
+/// Return the array of the envelopes names and transformations
+/// wrt to the chamber position in mother volume
inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
{ return fEnvelopes; }
+/// Set the transformation from the builder reference frame to that of the transform
+/// data files
inline void
AliMUONGeometryEnvelopeStore::SetReferenceFrame(const TGeoCombiTrans& referenceFrame)
{ fReferenceFrame = referenceFrame; }
// $Id$
//
-// Class AliMUONGeometryMisAligner
-// ----------------------------
-// Class for misalignment of geometry transformations
-//
-// Authors: Bruce Becker, Javier Castillo
-
//__________________________________________________________________
-//
-/////////////////////////////////////////////////////////////////////
-//This performs the misalignment on an existing muon arm geometry
-// based on the standard definition of the detector elements in
-// $ALICE_ROOT/MUON/data
-//
-// --> User has to specify the magnitude of the alignments, in the Cartesian
-// co-ordiantes (which are used to apply translation misalignments) and in the
-// spherical co-ordinates (which are used to apply angular displacements)
-// --> If the constructor is used with no arguments, user has to set
-// misalignment ranges by hand using the methods :
-// SetApplyMisAlig, SetMaxCartMisAlig, SetMaxAngMisAlig, SetXYAngMisAligFactor
-// (last method takes account of the fact that the misalingment is greatest in
-// the XY plane, since the detection elements are fixed to a support structure
-// in this plane. Misalignments in the XZ and YZ plane will be very small
-// compared to those in the XY plane, which are small already - of the order
-// of microns)
-
-// Note : If the detection elements are allowed to be misaligned in all
-// directions, this has consequences for the alignment algorithm
-// (AliMUONAlignment), which needs to know the number of free parameters.
-// Eric only allowed 3 : x,y,theta_xy, but in principle z and the other
-// two angles are alignable as well.
+/// \class AliMUONGeometryMisAligner
+///
+/// This performs the misalignment on an existing muon arm geometry
+/// based on the standard definition of the detector elements in
+/// $ALICE_ROOT/MUON/data
+///
+/// --> User has to specify the magnitude of the alignments, in the Cartesian
+/// co-ordiantes (which are used to apply translation misalignments) and in the
+/// spherical co-ordinates (which are used to apply angular displacements)
+///
+/// --> If the constructor is used with no arguments, user has to set
+/// misalignment ranges by hand using the methods :
+/// SetApplyMisAlig, SetMaxCartMisAlig, SetMaxAngMisAlig, SetXYAngMisAligFactor
+/// (last method takes account of the fact that the misalingment is greatest in
+/// the XY plane, since the detection elements are fixed to a support structure
+/// in this plane. Misalignments in the XZ and YZ plane will be very small
+/// compared to those in the XY plane, which are small already - of the order
+/// of microns)
+///
+/// Note : If the detection elements are allowed to be misaligned in all
+/// directions, this has consequences for the alignment algorithm
+/// (AliMUONAlignment), which needs to know the number of free parameters.
+/// Eric only allowed 3 : x,y,theta_xy, but in principle z and the other
+/// two angles are alignable as well.
+///
+/// \authors Bruce Becker, Javier Castillo
#include "AliMUONGeometryMisAligner.h"
#include "AliMUONGeometryTransformer.h"
#include <TMath.h>
#include <TRandom.h>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryMisAligner)
+/// \endcond
+
//______________________________________________________________________________
AliMUONGeometryMisAligner::AliMUONGeometryMisAligner(Double_t cartXMisAligM, Double_t cartXMisAligW, Double_t cartYMisAligM, Double_t cartYMisAligW, Double_t angMisAligM, Double_t angMisAligW)
:TObject(), fDisplacementGenerator(0)
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometryMisAligner::
-AliMUONGeometryMisAligner(const AliMUONGeometryMisAligner & right):
-TObject(right)
-{
- /// Copy constructor (not implemented)
-
- AliFatal("Copy constructor not provided.");
-}
-
//______________________________________________________________________________
AliMUONGeometryMisAligner::~AliMUONGeometryMisAligner()
{
delete fDisplacementGenerator;
}
-//______________________________________________________________________________
-AliMUONGeometryMisAligner & AliMUONGeometryMisAligner::
-operator=(const AliMUONGeometryMisAligner & right)
-{
- /// Assignement operator (not implemented)
-
- // check assignement to self
- if (this == &right)
- return *this;
-
- AliFatal("Assignement operator not provided.");
-
- return *this;
-}
-
//_________________________________________________________________________
void
AliMUONGeometryMisAligner::SetXYAngMisAligFactor(Double_t factor)
}
//_________________________________________________________________________
-void AliMUONGeometryMisAligner::GetUniMisAlign(Double_t *cartMisAlig, Double_t *angMisAlig) const
+void AliMUONGeometryMisAligner::GetUniMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const
{
/// Misalign using uniform distribution
- /*
+ /**
misalign the centre of the local transformation
rotation axes :
fAngMisAlig[1,2,3] = [x,y,z]
void AliMUONGeometryMisAligner::GetGausMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const
{
/// Misalign using gaussian distribution
- /*
+ /**
misalign the centre of the local transformation
rotation axes :
fAngMisAlig[1,2,3] = [x,y,z]
AliMUONGeometryMisAligner::MisAlign(const AliMUONGeometryTransformer *
transformer, Bool_t verbose)
{
- /////////////////////////////////////////////////////////////////////
- // Takes the internal geometry module transformers, copies them
- // and gets the Detection Elements from them.
- // Calculates misalignment parameters and applies these
- // to the local transform of the Detection Element
- // Obtains the global transform by multiplying the module transformer
- // transformation with the local transformation
- // Applies the global transform to a new detection element
- // Adds the new detection element to a new module transformer
- // Adds the new module transformer to a new geometry transformer
- // Returns the new geometry transformer
+ /// Takes the internal geometry module transformers, copies them
+ /// and gets the Detection Elements from them.
+ /// Calculates misalignment parameters and applies these
+ /// to the local transform of the Detection Element
+ /// Obtains the global transform by multiplying the module transformer
+ /// transformation with the local transformation
+ /// Applies the global transform to a new detection element
+ /// Adds the new detection element to a new module transformer
+ /// Adds the new module transformer to a new geometry transformer
+ /// Returns the new geometry transformer
AliMUONGeometryTransformer *newGeometryTransformer =
/// \ingroup geometry
/// \class AliMUONGeometryMisAligner
/// \brief Class for misalignment of geometry transformations
-///
-/// Authors: Bruce Becker, Javier Castillo
+//
+// Authors: Bruce Becker, Javier Castillo
#ifndef ALI_MUON_GEOMETRY_MIS_ALIGNER_H
AliMUONGeometryTransformer* MisAlign(const AliMUONGeometryTransformer* transformer,
Bool_t verbose = kFALSE);
+ /// Set cartesian displacement parameters different along x, y
void SetCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth)
{fCartXMisAligM = xmean; fCartXMisAligW = xwidth; fCartYMisAligM = ymean; fCartYMisAligW = ywidth;}
+ /// Set cartesian displacement parameters, the same along x, y
void SetCartMisAlig(Double_t mean, Double_t width)
{fCartXMisAligM = mean; fCartXMisAligW = width; fCartYMisAligM = mean; fCartYMisAligW = width;}
+ /// Set angular displacement
void SetAngMisAlig(Double_t mean, Double_t width)
{fAngMisAligM = mean; fAngMisAligW = width;}
- void SetMaxCartMisAlig(Double_t width) // Kept for backward compatibility
+ /// Set cartesian displacement (Kept for backward compatibility)
+ void SetMaxCartMisAlig(Double_t width)
{fCartXMisAligM = 0.0; fCartXMisAligW = width; fCartYMisAligM = 0.0; fCartYMisAligW = width;}
- void SetMaxAngMisAlig(Double_t width) // Kept for backward compatibility
+ /// Set angular displacement (Kept for backward compatibility)
+ void SetMaxAngMisAlig(Double_t width)
{fAngMisAligM = 0.0; fAngMisAligW = width;}
void SetXYAngMisAligFactor(Double_t factor);
void SetZCartMisAligFactor(Double_t factor);
+ /// Set option for gaussian distribution
void SetUseGaus(Bool_t usegaus)
{fUseGaus=usegaus; fUseUni=!usegaus;}
+ /// Set option for uniform distribution
void SetUseUni(Bool_t useuni)
{fUseGaus=!useuni; fUseUni=useuni;}
#include <TArrayI.h>
#include <Riostream.h>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryModule)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryModule::AliMUONGeometryModule(Int_t moduleId)
/// Default constructor
}
-
-//______________________________________________________________________________
-AliMUONGeometryModule::AliMUONGeometryModule(const AliMUONGeometryModule& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryModule::~AliMUONGeometryModule()
{
delete fTransformer;
}
-//______________________________________________________________________________
-AliMUONGeometryModule&
-AliMUONGeometryModule::operator = (const AliMUONGeometryModule& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
AliMUONGeometryDetElement*
AliMUONGeometryModule::FindBySensitiveVolume(const TString& sensVolume) const
{
-/// Find TGeoCombiTrans for the detector element Id specified by aligned volume
+/// Find detection element which the sensitive volume specified by name belongs to
Int_t detElemId = fSVMap->Get(sensVolume);
/// (the transformations of detection elements, mapping between
/// sensitive volumes and detection elements).
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_MODULE_H
#define ALI_MUON_GEOMETRY_MODULE_H
// inline functions
+/// Set virtuality (true if module is not represented by a real volume)
inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual)
{ fIsVirtual = isVirtual; }
+/// Return true if module is not represented by a real volume
inline Bool_t AliMUONGeometryModule::IsVirtual() const
{ return fIsVirtual; }
+/// Return module ID
inline Int_t AliMUONGeometryModule::GetModuleId() const
{ return fTransformer->GetModuleId(); }
+/// Return the full path of aligned module volume or envelope in geometry
inline TString AliMUONGeometryModule::GetVolumePath() const
{ return fTransformer->GetVolumePath(); }
+/// Return envelopes associated with this module
inline
AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
{ return fEnvelopes; }
+/// Return sensitive volume map
inline
AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const
{ return fSVMap; }
+/// Return transformer
inline
AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
{ return fTransformer; }
#include <TArrayI.h>
#include <Riostream.h>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryModuleTransformer)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryModuleTransformer::AliMUONGeometryModuleTransformer(Int_t moduleId)
}
-//______________________________________________________________________________
-AliMUONGeometryModuleTransformer::AliMUONGeometryModuleTransformer(
- const AliMUONGeometryModuleTransformer& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryModuleTransformer::~AliMUONGeometryModuleTransformer()
{
delete fDetElements;
}
-//______________________________________________________________________________
-AliMUONGeometryModuleTransformer&
-AliMUONGeometryModuleTransformer::operator = (
- const AliMUONGeometryModuleTransformer& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// public methods
//
//______________________________________________________________________________
TString AliMUONGeometryModuleTransformer::GetMotherVolumeName() const
{
-/// Extract volume name from the path
+/// Extract mother volume name from the path
std::string volPath = fVolumePath.Data();
std::string::size_type first = volPath.rfind('/');
AliMUONGeometryModuleTransformer::GetDetElement(Int_t detElemId, Bool_t warn) const
{
/// Return the detection element specified by detElemId.
-/// Give error if detection element is not defined.
+/// Give error if detection element is not defined and warn is true.
// Get detection element
AliMUONGeometryDetElement* detElement
/// \ingroup geometry
/// \class AliMUONGeometryModuleTransformer
-/// \brief Geometry transformationer for detector module
+/// \brief Geometry transformer for a detector module
///
-/// Class for definition of the detector module parameters
-/// (the transformations of detection elements, mapping between
-/// sensitive volumes and detection elements).
+/// Class for definition of the trasformation for adetector module
+/// and its detection elements
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
#define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
protected:
AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
- // operators
AliMUONGeometryModuleTransformer&
operator = (const AliMUONGeometryModuleTransformer& rhs);
TString fVolumePath; ///< \brief the full path of aligned module volume
/// or envelope in geometry
TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top
- /// volume
+ /// volume (world)
AliMUONGeometryStore* fDetElements; ///< detection elements
ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
// inline functions
+/// Set the full path of aligned module volume or envelope in geometry
inline void
AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
{ fVolumePath = volumePath; }
+/// Return module ID
inline Int_t
AliMUONGeometryModuleTransformer::GetModuleId() const
{ return fModuleId; }
+/// Return the full path of aligned module volume or envelope in geometry
inline TString
AliMUONGeometryModuleTransformer::GetVolumePath() const
{ return fVolumePath; }
+/// Return the module transformation wrt to the top volume (world)
inline const TGeoHMatrix*
AliMUONGeometryModuleTransformer::GetTransformation() const
{ return fTransformation; }
+/// Return detection elements associated with this module
inline AliMUONGeometryStore*
AliMUONGeometryModuleTransformer::GetDetElementStore() const
{ return fDetElements; }
const Float_t AliMUONGeometrySegmentation::fgkMaxDistance = 1.0e6;
+/// \cond CLASSIMP
ClassImp(AliMUONGeometrySegmentation)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometrySegmentation::AliMUONGeometrySegmentation(
AliDebug(1, Form("default (empty) ctor this = %p", this));
}
-//______________________________________________________________________________
-AliMUONGeometrySegmentation::AliMUONGeometrySegmentation(
- const AliMUONGeometrySegmentation& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
-#include <Riostream.h>
//______________________________________________________________________________
AliMUONGeometrySegmentation::~AliMUONGeometrySegmentation()
{
delete fDENames;
}
-//
-// operators
-//
-
-//______________________________________________________________________________
-AliMUONGeometrySegmentation&
-AliMUONGeometrySegmentation::operator=(const AliMUONGeometrySegmentation& rhs)
-{
-/// Protected assignment operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
AliMUONGeometryDirection
AliMUONGeometrySegmentation::GetDirection(Int_t detElemId) const
{
-/// Return direction with a constant pad size
+/// Return direction with a constant pad size.
/// (Direction or coordinate where the resolution is the best)
if (!OwnNotify(detElemId)) return kDirUndefined;
//______________________________________________________________________________
void AliMUONGeometrySegmentation::Print(Option_t* opt) const
{
-// Print DE segmentations
+/// Print DE segmentations
std::cout << "fDESegmentations (class "
<< fDESegmentations->Class()->GetName() << ") entries="
Bool_t
AliMUONGeometrySegmentation::HasPad(Int_t detElemId, Int_t ix, Int_t iy)
{
-// Tells if a given pad exists in a given detector element
+/// Tell if a given pad exists in a given detector element
if (!OwnNotify(detElemId)) return false;
AliMUONGeometrySegmentation::HasPad(Int_t detElemId,
Float_t& xg, Float_t& yg, Float_t& zg)
{
-// Tells if a given pad exists in a given detector element
+/// Tell if a given pad exists in a given detector element
if (!OwnNotify(detElemId)) return false;
//______________________________________________________________________________
Float_t AliMUONGeometrySegmentation::Dpy(Int_t detElemId, Int_t isector) const
{
-/// Pad size in x, y by Sector
+/// Pad size in y by Sector
if (!OwnNotify(detElemId)) return 0.;
void AliMUONGeometrySegmentation::SetHit(Int_t detElemId,
Float_t xghit, Float_t yghit, Float_t zghit)
{
-/// Set hit position
+/// Set hit position.
/// Sets virtual hit position, needed for evaluating pad response
/// outside the tracking program
/// From AliMUONGeometrySegmentationV01.
//______________________________________________________________________________
Int_t AliMUONGeometrySegmentation::Sector(Int_t detElemId, Int_t ix, Int_t iy)
{
-/// Calculate sector from pad coordinates
+/// Calculate sector from pad indices
if (!OwnNotify(detElemId)) return 0;
/// composed of the segmentations of detection elements.
/// Applies transformations defined in geometry.
///
-/// Author:Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H
#define ALI_MUON_GEOMETRY_SEGMENTATION_H
protected:
AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
-
- // operators
AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
private:
// inline functions
+/// Return associated geometry transformer
inline
const AliMUONGeometryModuleTransformer*
AliMUONGeometrySegmentation::GetTransformer() const
const Int_t AliMUONGeometryStore::fgkInitSize = 100;
const Int_t AliMUONGeometryStore::fgkCoefficient = 100;
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryStore)
+/// \endcond
//
// static methods
//______________________________________________________________________________
Int_t AliMUONGeometryStore::GetModuleId(Int_t detElemId)
{
-// Get module Id from detection element Id
-// ---
+/// Get module Id from detection element Id
return detElemId/fgkCoefficient - 1;
}
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometryStore::AliMUONGeometryStore(const AliMUONGeometryStore& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONGeometryStore::~AliMUONGeometryStore()
{
}
-//______________________________________________________________________________
-AliMUONGeometryStore&
-AliMUONGeometryStore::operator = (const AliMUONGeometryStore& rhs)
-{
-/// Protected assignment operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
//______________________________________________________________________________
Int_t AliMUONGeometryStore::GetDEIndex(Int_t detElemId) const
{
-/// Returns the index of detector element specified by detElemId
+/// Return the index of detector element specified by detElemId
return detElemId - detElemId/fgkCoefficient*fgkCoefficient;
}
TObject*
AliMUONGeometryStore::Get(Int_t objectId, Bool_t warn) const
{
-/// Returns the object for the specified detector element Id
+/// Return the object for the specified detector element Id
Int_t index = GetDEIndex(objectId);
//______________________________________________________________________________
Int_t AliMUONGeometryStore::GetNofEntries() const
{
-/// Return number of entries
-/// Add check if the array is already filled
+/// Return number of entries.
+/// \todo Add check if the array is already filled
return fObjects.GetEntriesFast();
}
AliMUONGeometryStore::GetEntry(Int_t index) const
{
/// Return entry at specified index.
-/// Add check if the array is already filled
+/// \todo Add check if the array is already filled
return (TObject*) fObjects.At(index);
}
/// which are sorted using the AliMUONVGeometryDEIndexing class.
/// The class provides fast access to detection element via detElemId.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_STORE_H
#define ALI_MUON_GEOMETRY_STORE_H
protected:
AliMUONGeometryStore(const AliMUONGeometryStore& rhs);
-
- // operators
AliMUONGeometryStore& operator = (const AliMUONGeometryStore& rhs);
private:
#include <sstream>
+/// \cond CLASSIMP
ClassImp(AliMUONGeometryTransformer)
+/// \endcond
//______________________________________________________________________________
AliMUONGeometryTransformer::AliMUONGeometryTransformer(Bool_t isOwner)
/// Default constructor
}
-//______________________________________________________________________________
-AliMUONGeometryTransformer::AliMUONGeometryTransformer(
- const AliMUONGeometryTransformer& right)
- : TObject(right)
-{
-/// Copy constructor (not implemented)
-
- AliFatal("Copy constructor not provided.");
-}
-
//______________________________________________________________________________
AliMUONGeometryTransformer::~AliMUONGeometryTransformer()
{
delete fMisAlignArray;
}
-//______________________________________________________________________________
-AliMUONGeometryTransformer&
-AliMUONGeometryTransformer::operator=(const AliMUONGeometryTransformer& right)
-{
-/// Assignement operator (not implemented)
-
- // check assignement to self
- if (this == &right) return *this;
-
- AliFatal("Assignement operator not provided.");
-
- return *this;
-}
-
//
// private methods
//
Double_t a1, Double_t a2, Double_t a3,
Double_t a4, Double_t a5, Double_t a6) const
{
-// Builds the transformation from the given parameters
-// ---
+/// Build the transformation from the given parameters
// Compose transform
return TGeoCombiTrans(TGeoTranslation(x, y, z),
void AliMUONGeometryTransformer::FillModuleVolPath(Int_t moduleId,
const TString& volPath)
{
-// Create module with the given moduleId and volPath
-// ---
+/// Create module with the given moduleId and volPath
// Get/Create geometry module transformer
AliMUONGeometryModuleTransformer* moduleTransformer
void AliMUONGeometryTransformer::FillDetElemVolPath(Int_t detElemId,
const TString& volPath)
{
-// Create detection element with the given detElemId and volPath
+/// Create detection element with the given detElemId and volPath
// Module Id
Int_t moduleId = AliMUONGeometryStore::GetModuleId(detElemId);
Double_t a1, Double_t a2, Double_t a3,
Double_t a4, Double_t a5, Double_t a6)
{
-// Fill the transformation of the module.
-// ---
+/// Fill the transformation of the module.
// Get/Create geometry module transformer
moduleId--;
Double_t a1, Double_t a2, Double_t a3,
Double_t a4, Double_t a5, Double_t a6)
{
-// Fill the transformation of the detection element.
-// ---
+/// Fill the transformation of the detection element.
// Module Id
Int_t moduleId = AliMUONGeometryStore::GetModuleId(detElemId);
Bool_t
AliMUONGeometryTransformer::ReadVolPaths(ifstream& in)
{
-// Reads modules and detection element volume paths from stream
-// ---
+/// Read modules and detection element volume paths from stream
Int_t id;
TString key, volumePath;
//______________________________________________________________________________
TString AliMUONGeometryTransformer::ReadModuleTransforms(ifstream& in)
{
-// Reads and fills modules transformations from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read and fill modules transformations from the stream.
+/// Return true, if reading finished correctly.
TString key("CH");
while ( key == TString("CH") ) {
//______________________________________________________________________________
TString AliMUONGeometryTransformer::ReadDetElemTransforms(ifstream& in)
{
-// Reads detection elements transformations from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read detection elements transformations from the stream.
+/// Return true, if reading finished correctly.
TString key("DE");
while ( key == TString("DE") ) {
Bool_t
AliMUONGeometryTransformer::LoadTransforms(TGeoManager* tgeoManager)
{
-/// Loads transformations for defined modules and detection elements
+/// Load transformations for defined modules and detection elements
/// from the root file
if ( !tgeoManager) {
Bool_t
AliMUONGeometryTransformer::ReadVolPaths(const TString& fileName)
{
-// Reads detection element volume paths from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read detection element volume paths from a file.
+/// Return true, if reading finished correctly.
// File path
TString filePath = gSystem->Getenv("ALICE_ROOT");
Bool_t
AliMUONGeometryTransformer::ReadTransformations(const TString& fileName)
{
-// Reads transformations from a file
-// Returns true, if reading finished correctly.
-// ---
+/// Read transformations from a file.
+/// Return true, if reading finished correctly.
// File path
TString filePath = gSystem->Getenv("ALICE_ROOT");
Bool_t
AliMUONGeometryTransformer::ReadTransformations2(const TString& fileName)
{
-// Reads transformations from root geometry file
-// Returns true, if reading finished correctly.
-// ---
+/// Read transformations from root geometry file.
+/// Return true, if reading finished correctly.
// File path
TString filePath = gSystem->Getenv("ALICE_ROOT");
void AliMUONGeometryTransformer::WriteTransform(ofstream& out,
const TGeoMatrix* transform) const
{
-// Writes the transformations
-// ---
+/// Write given transformation
out << " pos: ";
const Double_t* xyz = transform->GetTranslation();
//______________________________________________________________________________
void AliMUONGeometryTransformer::WriteModuleVolPaths(ofstream& out) const
{
-// Write modules volume paths
+/// Write module volume paths for all module transformers
for (Int_t i=0; i<fModuleTransformers->GetEntriesFast(); i++) {
AliMUONGeometryModuleTransformer* moduleTransformer
//______________________________________________________________________________
void AliMUONGeometryTransformer::WriteDetElemVolPaths(ofstream& out) const
{
-// Write detection elements volume paths
+/// Write detection element volume paths for all detection elements in all
+/// module transformers
for (Int_t i=0; i<fModuleTransformers->GetEntriesFast(); i++) {
AliMUONGeometryModuleTransformer* moduleTransformer
//______________________________________________________________________________
void AliMUONGeometryTransformer::WriteModuleTransforms(ofstream& out) const
{
-// Write modules transformations
+/// Write module transformations for all module transformers
for (Int_t i=0; i<fModuleTransformers->GetEntriesFast(); i++) {
AliMUONGeometryModuleTransformer* moduleTransformer
//______________________________________________________________________________
void AliMUONGeometryTransformer::WriteDetElemTransforms(ofstream& out) const
{
-// Writes detection elements transformations
-// ---
+/// Write detection element transformations for all detection elements in all
+/// module transformers
for (Int_t i=0; i<fModuleTransformers->GetEntriesFast(); i++) {
AliMUONGeometryModuleTransformer* moduleTransformer
TGeoManager* tgeoManager)
{
/// Load geometry data from root geometry using defined
-/// voluem paths from file
+/// volume paths from file
Bool_t result1 = ReadVolPaths(volPathFileName);
Bool_t
AliMUONGeometryTransformer::WriteVolumePaths(const TString& fileName) const
{
-// Writes volume paths for modules and detection element volumes into a file
-// Returns true, if writing finished correctly.
-// ---
+/// Write volume paths for modules and detection element volumes into a file.
+/// Return true, if writing finished correctly.
// No writing
// if builder is not associated with any geometry module
Bool_t
AliMUONGeometryTransformer::WriteTransformations(const TString& fileName) const
{
-// Writes transformations into a file
-// Returns true, if writing finished correctly.
-// ---
+/// Write transformations into a file.
+/// Return true, if writing finished correctly.
// No writing
// if builder is not associated with any geometry module
Bool_t
AliMUONGeometryTransformer::WriteMisAlignmentData(const TString& fileName) const
{
-// Writes misalignment data into a file
-// Returns true, if writing finished correctly.
-// ---
+/// Write misalignment data into a file
+/// Return true, if writing finished correctly.
// No writing
// if builder is not associated with any geometry module
void AliMUONGeometryTransformer::AddModuleTransformer(
AliMUONGeometryModuleTransformer* moduleTransformer)
{
-/// Add the geometrymodule to the array
+/// Add the module transformer to the array
fModuleTransformers->AddAt(moduleTransformer,
moduleTransformer->GetModuleId());
void AliMUONGeometryTransformer::AddMisAlignModule(Int_t moduleId,
const TGeoHMatrix& matrix)
{
-/// Build AliAlignObjMatrix with module ID, its volumePaths
+/// Build AliAlignObjMatrix with module ID, its volumePath
/// and the given delta transformation matrix
if ( ! fMisAlignArray )
void AliMUONGeometryTransformer::AddMisAlignDetElement(Int_t detElemId,
const TGeoHMatrix& matrix)
{
-/// Build AliAlignObjMatrix with detection element ID, its volumePaths
+/// Build AliAlignObjMatrix with detection element ID, its volumePath
/// and the given delta transformation matrix
if ( ! fMisAlignArray )
const AliMUONGeometryModuleTransformer*
AliMUONGeometryTransformer::GetModuleTransformer(Int_t index, Bool_t warn) const
{
-/// Return the geometry module specified by index
+/// Return the geometry module transformer specified by index
return GetModuleTransformerNonConst(index, warn);
}
AliMUONGeometryTransformer::GetModuleTransformerByDEId(Int_t detElemId,
Bool_t warn) const
{
-/// Return the geometry module specified by index
+/// Return the geometry module transformer specified by detection element ID
// Get module index
Int_t index = AliMUONGeometryStore::GetModuleId(detElemId);
const AliMUONGeometryDetElement*
AliMUONGeometryTransformer::GetDetElement(Int_t detElemId, Bool_t warn) const
{
-/// Return detection ellemnt with given detElemId
+/// Return detection element with given detElemId
const AliMUONGeometryModuleTransformer* kTransformer
= GetModuleTransformerByDEId(detElemId, warn);
/// If geometry is loaded from a file, the list of aligned volume paths
/// has to be read first from volpaths.dat file.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_GEOMETRY_TRANSFORMER_H
#define ALI_MUON_GEOMETRY_TRANSFORMER_H
};
// inline methods
+
+/// Return the number of contained module transformers
inline Int_t AliMUONGeometryTransformer::GetNofModuleTransformers() const
{ return fModuleTransformers->GetEntriesFast(); }
+/// Return the array of misalignment data
inline const TClonesArray* AliMUONGeometryTransformer::GetMisAlignmentData() const
{ return fMisAlignArray; }
#include "AliLog.h"
-
+/// \cond CLASSIMP
ClassImp(AliMUONSegmentation)
+/// \endcond
//______________________________________________________________________________
AliMUONSegmentation::AliMUONSegmentation(Int_t nofModules)
AliDebug(1, Form("default (empty) ctor this = %p", this));
}
-//______________________________________________________________________________
-AliMUONSegmentation::AliMUONSegmentation(const AliMUONSegmentation& right)
- : TObject(right)
-{
-/// Protected copy constructor (not implemented)
-
- AliFatal("Copy constructor not provided.");
-}
-
//______________________________________________________________________________
AliMUONSegmentation::~AliMUONSegmentation()
{
delete fModuleSegmentations[1];
}
-//______________________________________________________________________________
-AliMUONSegmentation&
-AliMUONSegmentation::operator=(const AliMUONSegmentation& right)
-{
-/// Protected assignement operator (not implemented)
-
- // check assignement to self
- if (this == &right) return *this;
-
- AliFatal("Assignement operator not provided.");
-
- return *this;
-}
-
//
// public functions
//
AliMUONSegmentation::GetModuleSegmentation(
Int_t moduleId, Int_t cathod, Bool_t warn) const
{
-/// Return the geometry module specified by moduleId
+/// Return the geometry module segmentation specified by moduleId
if (cathod < 0 || cathod >= 2) {
if (warn) {
Bool_t
AliMUONSegmentation::HasDE(Int_t detElemId, Int_t cathod) const
{
- // Get DE segmentation
+/// Return true if segmentation for detElemId and cathod is defined.
+
const AliMUONVGeometryDESegmentation* kdeSegmentation
= GetDESegmentation(detElemId, cathod, false);
TString
AliMUONSegmentation::GetDEName(Int_t detElemId, Int_t cathod) const
{
+/// Get detection element name
- // Get geometry segmentation
AliMUONGeometrySegmentation* moduleSegmentation
= GetModuleSegmentationByDEId(detElemId, cathod, true);
/// - mapping segmentation
/// - DE segmentation (operating in local DE reference frame)
/// - module segmentation (operating in global reference frame)
-/// As some detection element are sharing the same objects
+///
+/// As some detection elements are sharing the same objects
/// (AliMpVSegmentation, AliMUONVGeometryDESegmentation),
/// all segmentations objects have to be always deleted
/// altogether via deleting this container object.
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_SEGMENTATION_H
#define ALI_MUON_SEGMENTATION_H
/** Mapping segmentations access by cathode number.
cathod can be 0 or 1. Note that there's no trivial relationship
- between the cathode number and whether the corresponding plane
+ between the cathod number and whether the corresponding plane
is a Bending or NonBending one.
**/
const AliMpVSegmentation* GetMpSegmentation(
#include "AliMUONStringIntMap.h"
#include "AliLog.h"
+/// \cond CLASSIMP
ClassImp(AliMUONStringIntMap)
+/// \endcond
//______________________________________________________________________________
AliMUONStringIntMap::AliMUONStringIntMap()
fFirstArray.SetOwner(true);
}
-//______________________________________________________________________________
-AliMUONStringIntMap::AliMUONStringIntMap(const AliMUONStringIntMap& rhs)
- : TObject(rhs)
-{
-/// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
-
//______________________________________________________________________________
AliMUONStringIntMap::~AliMUONStringIntMap()
{
fFirstArray.Delete();
}
-//______________________________________________________________________________
-AliMUONStringIntMap&
-AliMUONStringIntMap::operator = (const AliMUONStringIntMap& rhs)
-{
-/// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
-
//
// public methods
//
//______________________________________________________________________________
void AliMUONStringIntMap::Print(const TString& key, ofstream& out) const
{
-// Prints the map elements
+/// Print the map elements preceded by a key word
for (Int_t i=0; i<fNofItems; i++) {
out << key << " "
/// \class AliMUONStringIntMap
/// \brief Substitutes map <string, int> which ALICE does not allow to use
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_STRING_INT_MAP_H
#define ALI_MUON_STRING_INT_MAP_H
protected:
AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
-
- // operators
AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
private:
#include "AliMUONStringIntMap.h"
#include "AliLog.h"
+/// \cond CLASSIMP
ClassImp(AliMUONVGeometryBuilder)
+/// \endcond
//______________________________________________________________________________
AliMUONVGeometryBuilder::AliMUONVGeometryBuilder(
fGeometryModules(0),
fReferenceFrame()
{
-// Standard constructor
+/// Standard constructor
// Create the module geometries array
fGeometryModules = new TObjArray();
fGeometryModules(0),
fReferenceFrame()
{
-// Default constructor
+/// Default constructor
}
-
//______________________________________________________________________________
-AliMUONVGeometryBuilder::AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs)
- : TObject(rhs)
+AliMUONVGeometryBuilder::~AliMUONVGeometryBuilder()
{
-// Protected copy constructor
-
- AliFatal("Copy constructor is not implemented.");
-}
+/// Destructor
-//______________________________________________________________________________
-AliMUONVGeometryBuilder::~AliMUONVGeometryBuilder() {
-//
if (fGeometryModules) {
fGeometryModules->Clear(); // Sets pointers to 0 since it is not the owner
delete fGeometryModules;
}
}
-//______________________________________________________________________________
-AliMUONVGeometryBuilder&
-AliMUONVGeometryBuilder::operator = (const AliMUONVGeometryBuilder& rhs)
-{
-// Protected assignement operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
-
//
// private methods
//
TGeoHMatrix
AliMUONVGeometryBuilder::ConvertTransform(const TGeoHMatrix& transform) const
{
-// Convert transformation into the reference frame
+/// Convert transformation into the reference frame
if ( fReferenceFrame.IsIdentity() )
return transform;
TGeoHMatrix
AliMUONVGeometryBuilder::ConvertDETransform(const TGeoHMatrix& transform) const
{
-// Convert transformation into the reference frame
+/// Convert DE transformation into the reference frame
if ( fReferenceFrame.IsIdentity() )
return transform;
TString AliMUONVGeometryBuilder::ComposePath(const TString& volName,
Int_t copyNo) const
{
-// Compose path from given volName and copyNo
-// ---
+/// Compose path from given volName and copyNo
TString path = "/";
path += volName;
void AliMUONVGeometryBuilder::MapSV(const TString& path0,
const TString& volName, Int_t detElemId) const
{
-// Update the path with all daughters volumes recursively
-// and map it to the detection element Id if it is a sensitive volume
-// ---
+/// Update the path with all daughters volumes recursively
+/// and map it to the detection element Id if it is a sensitive volume
// Get module sensitive volumes map
Int_t moduleId = AliMUONGeometryStore::GetModuleId(detElemId);
AliMUONGeometryModule*
AliMUONVGeometryBuilder::GetGeometry(Int_t moduleId) const
{
-// Returns the module geometry specified by moduleId
-// ---
+/// Return the module geometry specified by moduleId
for (Int_t i=0; i<fGeometryModules->GetEntriesFast(); i++) {
AliMUONGeometryEnvelopeStore*
AliMUONVGeometryBuilder::GetEnvelopes(Int_t moduleId) const
{
-// Returns the envelope store of the module geometry specified by moduleId
-// ---
+/// Return the envelope store of the module geometry specified by moduleId
AliMUONGeometryModule* geometry = GetGeometry(moduleId);
AliMUONStringIntMap*
AliMUONVGeometryBuilder::GetSVMap(Int_t moduleId) const
{
-// Returns the transformation store of the module geometry specified by moduleId
-// ---
+/// Return the transformation store of the module geometry specified by moduleId
AliMUONGeometryModule* geometry = GetGeometry(moduleId);
void AliMUONVGeometryBuilder::SetTranslation(Int_t moduleId,
const TGeoTranslation& translation)
{
-// Sets the translation to the geometry module given by moduleId,
-// applies reference frame transformation
-// ---
+/// Set the translation to the geometry module given by moduleId,
+/// apply reference frame transformation
AliMUONGeometryModule* geometry = GetGeometry(moduleId);
const TGeoTranslation& translation,
const TGeoRotation& rotation)
{
-// Sets the translation to the geometry module given by moduleId,
-// applies reference frame transformation
-// ---
+/// Set the transformation to the geometry module given by moduleId,
+/// apply reference frame transformation
AliMUONGeometryModule* geometry = GetGeometry(moduleId);
//______________________________________________________________________________
void AliMUONVGeometryBuilder::CreateDetElements() const
{
-/// Create detection element and fill their global and
+/// Create detection elements and fill their global and
/// local transformations from geometry.
for (Int_t i=0; i<fGeometryModules->GetEntriesFast(); i++) {
//_____ _________________________________________________________________________
void AliMUONVGeometryBuilder::RebuildSVMaps(Bool_t withEnvelopes) const
{
-// Clear the SV maps in memory and fill them from defined geometry.
-// ---
+/// Clear the SV maps in memory and fill them from defined geometry.
for (Int_t i=0; i<fGeometryModules->GetEntriesFast(); i++) {
AliMUONGeometryModule* geometry
/// \class AliMUONVGeometryBuilder
/// \brief Abstract base class for geometry construction per module(s)
///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_V_GEOMETRY_BUILDER_H
#define ALI_MUON_V_GEOMETRY_BUILDER_H
void RebuildSVMaps(Bool_t withEnvelopes = true) const;
void CreateDetElements() const;
+ /// Function to be overriden in a concrete chamber/station
+ /// geometry builder class.
+ /// Only materials that are not defined in the common
+ /// functions should be defined here.
virtual void CreateMaterials() {} // make = 0; ?
- // Function to be overriden in a concrete chamber/station
- // geometry builder class.
- // Only materials that are not defined in the common
- // functions should be defined here.
+ /// Function to be overriden in a concrete chamber/station
+ /// geometry builder class. \n
+ /// The geometry built there should not be placed
+ /// in ALIC; but all volumes going to ALIC
+ /// have to be added as envelopes to the chamber
+ /// geometries
+ /// (They will be then placed automatically
+ /// usind the provided transformation.
virtual void CreateGeometry() = 0;
- // Function to be overriden in a concrete chamber/station
- // geometry builder class.
- // The geometry built there should not be placed
- // in ALIC; but all volumes going to ALIC
- // have to be added as envelopes to the chamber
- // geometries
- // (They will be then placed automatically
- // usind the provided transformation.
+ /// Function to be overriden in a concrete chamber/station
+ /// geometry class. \n
+ /// The transformation of each chamber(s) wrt ALICE
+ /// should be defined and set to its geometry class.
virtual void SetTransformations() = 0;
- // Function to be overriden in a concrete chamber/station
- // geometry class.
- // The transformation of each chamber(s) wrt ALICE
- // should be defined and set to its geometry class.
+ /// Function to be overriden in a concrete chamber/station
+ /// geometry class. \n
+ /// The sensitive volumes Ids for each chamber
+ /// should be defined and set to its geometry class.
virtual void SetSensitiveVolumes() = 0;
- // Function to be overriden in a concrete chamber/station
- // geometry class.
- // The sensitive volumes Ids for each chamber
- // should be defined and set to its geometry class.
+ /// Function to be overriden (and return false)
+ /// in the concrete geometry builder classes
+ /// which are already defined in the new ALICE
+ /// coordinate frame
virtual bool ApplyGlobalTransformation() { return true; }
- // Function to be overriden (and return false)
- // in the concrete geometry builder classes
- // which are already defined in the new ALICE
- // coordinate frame
// access to module geometries
Int_t NofGeometries() const;
protected:
AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs);
-
- // operators
AliMUONVGeometryBuilder& operator = (const AliMUONVGeometryBuilder& rhs);
// methods
// inline functions
+/// Return the number of geometry modules
inline Int_t AliMUONVGeometryBuilder::NofGeometries() const
{ return fGeometryModules->GetEntriesFast(); }
+/// Return the \a i th geometry module
inline AliMUONGeometryModule* AliMUONVGeometryBuilder::Geometry(Int_t i) const
{ return (AliMUONGeometryModule*)fGeometryModules->At(i); }
#include "AliMUONVGeometryDESegmentation.h"
+/// \cond CLASSIMP
ClassImp(AliMUONVGeometryDESegmentation)
+/// \endcond
//______________________________________________________________________________
AliMUONVGeometryDESegmentation::AliMUONVGeometryDESegmentation()
: AliSegmentation()
{
-// Normal/default constructor
+/// Normal/default constructor
}
//______________________________________________________________________________
-AliMUONVGeometryDESegmentation::AliMUONVGeometryDESegmentation(
- const AliMUONVGeometryDESegmentation& rhs)
- : AliSegmentation(rhs)
+AliMUONVGeometryDESegmentation::~AliMUONVGeometryDESegmentation()
{
-// Copy constructor
-}
-
-//______________________________________________________________________________
-AliMUONVGeometryDESegmentation::~AliMUONVGeometryDESegmentation() {
-// Destructor
+/// Destructor
}
-
-//
-// operators
-//
-
-//______________________________________________________________________________
-AliMUONVGeometryDESegmentation&
-AliMUONVGeometryDESegmentation::operator=(const AliMUONVGeometryDESegmentation& rhs)
-{
-// Copy operator
-
- // check assignement to self
- if (this == &rhs) return *this;
-
- AliFatal("Assignment operator is not implemented.");
-
- return *this;
-}
/// \class AliMUONVGeometryDESegmentation
/// \brief Extension for AliSegmentation interface for detection elements
///
-/// Extension for AliSegmentation interface,
-/// added functions: \n
-/// Bool_t HasPad(Float_t x, Float_t y, Float_t z); \n
-/// Bool_t HasPad(Int_t ix, Int_t iy); \n
+/// \deprecated - To be removed with passing to maping segmentation interface
///
-/// Author:Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
#ifndef ALI_MUON_V_GEOMETRY_DE_SEGMENTATION_H
#define ALI_MUON_V_GEOMETRY_DE_SEGMENTATION_H
virtual ~AliMUONVGeometryDESegmentation();
// methods
+ /// Return true if a pad exists in the given position
virtual Bool_t HasPad(Float_t x, Float_t y, Float_t z) = 0;
- // Returns true if a pad exists in the given position
+ /// Return true if a pad with given indices exists
virtual Bool_t HasPad(Int_t ix, Int_t iy) = 0;
- // Returns true if a pad with given indices exists
+ /// Return the direction with a constant pad size
+ /// (Direction or coordinate where the spatial resolution
+ /// is the best) \n
+ /// Normally kDirY will correspond with cathode segmentation
+ /// for the bending plane and kDirX with cathode segmentation
+ /// for the non bending plane
virtual AliMUONGeometryDirection GetDirection() = 0;
- // Returns the direction with a constant pad size
- // (Direction or coordinate where the spatial resolution
- // is the best)
- // Normally kDirY will correspond with cathode segmentation
- // for the bending plane and kDirX with cathode segmentation
- // for the non bending plane
+ /// Access to mapping
virtual const AliMpVSegmentation* GetMpSegmentation() const = 0;
- // Access to mapping
protected:
AliMUONVGeometryDESegmentation(const AliMUONVGeometryDESegmentation& rhs);
-
- // operators
AliMUONVGeometryDESegmentation& operator=(
- const AliMUONVGeometryDESegmentation & rhs);
+ const AliMUONVGeometryDESegmentation& rhs);
ClassDef(AliMUONVGeometryDESegmentation,1) // Det element segmentation interface
};