+ Float_t rx, Float_t ry, Float_t rz) {
+ SetByAngles(GetModuleIndex(lay,lad,det),rx,ry,rz);}
+ //
+ // Sets the rotation angles and matrix for a give module index
+ // via the Double precision array a[6] [degree]. The angles are those
+ // defined by GEANT 3.12.
+ void SetByGeantAngles(Int_t index,const Double_t *ang){
+ GetGeomMatrix(index)->MatrixFromSixAngles(ang);}
+ // Sets the rotation angles and matrix for a give layer, ladder
+ // and detector, in the array id[3] via the Double precision array
+ // a[6] [degree]. The angles are those defined by GEANT 3.12.
+ void SetByGeantAngles(const Int_t *id,const Double_t *ang){
+ SetByGeantAngles(GetModuleIndex(id),ang);}
+ // Sets the rotation angles and matrix for a give layer, ladder
+ // and detector, via the Double precision array a[6] [degree]. The
+ // angles are those defined by GEANT 3.12.
+ void SetByGeantAngles(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *ang){
+ SetByGeantAngles(GetModuleIndex(lay,lad,det),ang);}
+ //
+ // This function sets a new translation vector, given by the
+ // array x[3], for the Cartesian coordinate transformation
+ // for a give module index.
+ void SetTrans(Int_t index,Double_t x[]){
+ GetGeomMatrix(index)->SetTranslation(x);}
+ // This function sets a new translation vector, given by the three
+ // variables x, y, and z, for the Cartesian coordinate transformation
+ // for the detector defined by layer, ladder and detector.
+ void SetTrans(Int_t lay,Int_t lad,Int_t det,
+ Float_t x,Float_t y,Float_t z){Double_t t[3];
+ t[0] = x;t[1] = y;t[2] = z;
+ SetTrans(GetModuleIndex(lay,lad,det),t);}
+ //
+ // This function adds one more shape element to the TObjArray
+ // fShape. It is primarily used in the constructor functions of the
+ // AliITSgeom class. The pointer *shape can be the pointer to any
+ // class that is derived from TObject (this is true for nearly every
+ // ROOT class). This does not appear to be working properly at this time.
+ void AddShape(TObject *shp){fShape.AddLast(shp);}
+ // This function deletes an existing shape element, of type TObject,
+ // and replaces it with the one specified. This is primarily used to
+ // changes the parameters to the geom class for a particular
+ // type of detector.
+ void ReSetShape(Int_t dtype,TObject *shp){
+ delete (fShape.At(dtype));fShape.AddAt(shp,dtype);}
+ //
+ // transformations
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // defined by the layer, ladder, and detector numbers. The
+ // global and local coordinate are given in two floating point
+ // arrays g[3], and l[3].
+ void GtoL(Int_t lay,Int_t lad,Int_t det,
+ const Float_t *g,Float_t *l)const{
+ GtoL(GetModuleIndex(lay,lad,det),g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // defined by the id[0], id[1], and id[2] numbers. The
+ // global and local coordinate are given in two floating point
+ // arrays g[3], and l[3].
+ void GtoL(const Int_t *id,const Float_t *g,Float_t *l)const{
+ GtoL(GetModuleIndex(id),g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // module index number. The global and local coordinate are
+ // given in two floating point arrays g[3], and l[3].
+ void GtoL(Int_t index,const Float_t *g,Float_t *l)const{
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
+ GetGeomMatrix(index)->GtoLPosition(dg,dl);
+ for(i=0;i<3;i++) l[i] =dl[i];}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // defined by the layer, ladder, and detector numbers. The
+ // global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void GtoL(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *g,Double_t *l)const{
+ GtoL(GetModuleIndex(lay,lad,det),g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // defined by the id[0], id[1], and id[2] numbers. The
+ // global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void GtoL(const Int_t *id,const Double_t *g,Double_t *l)const{
+ GtoL(GetModuleIndex(id),g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system for the detector
+ // module index number. The global and local coordinate are
+ // given in two Double point arrays g[3], and l[3].
+ void GtoL(Int_t index,const Double_t g[3],Double_t l[3])const{
+ GetGeomMatrix(index)->GtoLPosition(g,l);}
+ //
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system (used for ITS tracking)
+ // for the detector module index number. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void GtoLtracking(Int_t index,const Double_t *g,Double_t *l)const{
+ if(IsGeantToTracking()) GtoL(index,g,l);
+ else GetGeomMatrix(index)->GtoLPositionTracking(g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system (used for ITS tracking)
+ // for the detector id[3]. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void GtoLtracking(const Int_t *id,const Double_t *g,Double_t *l)const{
+ GtoLtracking(GetModuleIndex(id),g,l);}
+ // Transforms from the ALICE Global coordinate system
+ // to the detector local coordinate system (used for ITS tracking)
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two Double point arrays g[3],
+ // and l[3].
+ void GtoLtracking(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *g,Double_t *l)const{
+ GtoLtracking(GetModuleIndex(lay,lad,det),g,l);}
+ //
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two float point arrays g[3],
+ // and l[3].
+ void GtoLMomentum(Int_t lay,Int_t lad,Int_t det,
+ const Float_t *g,Float_t *l)const{
+ GtoLMomentum(GetModuleIndex(lay,lad,det),g,l);}
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // for the detector module index number. The global and local
+ // coordinate are given in two float point arrays g[3], and l[3].
+ void GtoLMomentum(Int_t index,const Float_t *g,Float_t *l)const{
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
+ GetGeomMatrix(index)->GtoLMomentum(dg,dl);
+ for(i=0;i<3;i++) l[i] =dl[i];}
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two Double point arrays g[3],
+ // and l[3].
+ void GtoLMomentum(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *g,Double_t *l)const{
+ GtoLMomentum(GetModuleIndex(lay,lad,det),g,l);}
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // for the detector module index number. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void GtoLMomentum(Int_t index,const Double_t *g,Double_t *l)const{
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
+ GetGeomMatrix(index)->GtoLMomentum(dg,dl);
+ for(i=0;i<3;i++) l[i] =dl[i];}
+ //
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // (used for ITS tracking) for the detector module index number.
+ // The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void GtoLMomentumTracking(Int_t index,const Double_t *g,Double_t *l)const{
+ if(IsGeantToTracking()) GtoLMomentum(index,g,l);
+ else GetGeomMatrix(index)->GtoLMomentumTracking(g,l);}
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // (used for ITS tracking) for the detector id[3].
+ // The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void GtoLMomentumTracking(const Int_t *id,
+ const Double_t *g,Double_t *l)const{
+ GtoLMomentumTracking(GetModuleIndex(id),g,l);}
+ // Transforms of momentum types of quantities from the ALICE
+ // Global coordinate system to the detector local coordinate system
+ // (used for ITS tracking) for the detector layer ladder and detector
+ // numbers. The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void GtoLMomentumTracking(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *g,Double_t *l)const{
+ GtoLMomentumTracking(GetModuleIndex(lay,lad,det),g,l);}
+ //
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // defined by the layer, ladder, and detector numbers. The
+ // global and local coordinate are given in two floating point
+ // arrays g[3], and l[3].
+ void LtoG(Int_t lay,Int_t lad,Int_t det,
+ const Float_t *l,Float_t *g)const{
+ LtoG(GetModuleIndex(lay,lad,det),l,g);}
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // defined by the id[0], id[1], and id[2] numbers. The
+ // global and local coordinate are given in two floating point
+ // arrays g[3], and l[3].
+ void LtoG(const Int_t *id,const Float_t *l,Float_t *g)const{
+ LtoG(GetModuleIndex(id),l,g);}
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // module index number. The global and local coordinate are
+ // given in two floating point arrays g[3], and l[3].
+ void LtoG(Int_t index,const Float_t *l,Float_t *g)const{
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dl[i] = l[i];
+ GetGeomMatrix(index)->LtoGPosition(dl,dg);
+ for(i=0;i<3;i++) g[i] =dg[i];}
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // defined by the layer, ladder, and detector numbers. The
+ // global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void LtoG(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *l,Double_t *g)const{
+ LtoG(GetModuleIndex(lay,lad,det),l,g);}
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // defined by the id[0], id[1], and id[2] numbers. The
+ // global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void LtoG(const Int_t *id,const Double_t *l,Double_t *g)const{
+ LtoG(GetModuleIndex(id),l,g);}
+ // Transforms from the detector local coordinate system
+ // to the ALICE Global coordinate system for the detector
+ // module index number. The global and local coordinate are
+ // given in two Double point arrays g[3], and l[3].
+ void LtoG(Int_t index,const Double_t *l,Double_t *g)const{
+ GetGeomMatrix(index)->LtoGPosition(l,g);}
+ //
+ // Transforms from the detector local coordinate system (used
+ // for ITS tracking) to the ALICE Global coordinate system
+ // for the detector module index number. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void LtoGtracking(Int_t index,const Double_t *l,Double_t *g)const{
+ if(IsGeantToTracking()) LtoG(index,l,g);
+ else GetGeomMatrix(index)->LtoGPositionTracking(l,g);}
+ // Transforms from the detector local coordinate system (used
+ // for ITS tracking) to the ALICE Global coordinate system
+ // for the detector id[3]. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void LtoGtracking(const Int_t *id,const Double_t *l,Double_t *g)const{
+ LtoGtracking(GetModuleIndex(id),l,g);}
+ // Transforms from the detector local coordinate system (used
+ // for ITS tracking) to the detector local coordinate system
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two Double point arrays g[3],
+ // and l[3].
+ void LtoGtracking(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *l,Double_t *g)const{
+ LtoGtracking(GetModuleIndex(lay,lad,det),l,g);}
+ //
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system to the ALICE Global coordinate system
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two float point arrays g[3],
+ // and l[3].
+ void LtoGMomentum(Int_t lay,Int_t lad,Int_t det,
+ const Float_t *l,Float_t *g)const{
+ LtoGMomentum(GetModuleIndex(lay,lad,det),l,g);}
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system to the ALICE Global coordinate system
+ // for the detector module index number. The global and local
+ // coordinate are given in two float point arrays g[3], and l[3].
+ void LtoGMomentum(Int_t index,const Float_t *l,Float_t *g)const{
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dl[i] = l[i];
+ GetGeomMatrix(index)->LtoGMomentum(dl,dg);
+ for(i=0;i<3;i++) g[i] =dg[i];}
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system to the ALICE Global coordinate system
+ // for the detector layer ladder and detector numbers. The global
+ // and local coordinate are given in two Double point arrays g[3],
+ // and l[3].
+ void LtoGMomentum(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *l,Double_t *g)const{
+ LtoGMomentum(GetModuleIndex(lay,lad,det),l,g);}
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system to the ALICE Global coordinate system
+ // for the detector module index number. The global and local
+ // coordinate are given in two Double point arrays g[3], and l[3].
+ void LtoGMomentum(Int_t index,const Double_t *l,Double_t *g)const{
+ GetGeomMatrix(index)->LtoGMomentum(l,g);}
+ //
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system (used for ITS tracking) to the detector
+ // system ALICE Global for the detector module index number.
+ // The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void LtoGMomentumTracking(Int_t index,const Double_t *l,Double_t *g)const{
+ if(IsGeantToTracking()) LtoGMomentum(index,l,g);
+ else GetGeomMatrix(index)->LtoGMomentumTracking(l,g);}
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system (used for ITS tracking) to the ALICE
+ // Global coordinate system for the detector id[3].
+ // The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void LtoGMomentumTracking(const Int_t *id,const Double_t *l,Double_t *g)
+ const{LtoGMomentumTracking(GetModuleIndex(id),l,g);}
+ // Transforms of momentum types of quantities from the detector
+ // local coordinate system (used for ITS tracking) to the ALICE
+ // Global coordinate system for the detector layer ladder and detector
+ // numbers. The global and local coordinate are given in two Double point
+ // arrays g[3], and l[3].
+ void LtoGMomentumTracking(Int_t lay,Int_t lad,Int_t det,
+ const Double_t *l,Double_t *g)const{
+ LtoGMomentumTracking(GetModuleIndex(lay,lad,det),l,g);}
+ //
+ // Transforms from one detector local coordinate system
+ // to another detector local coordinate system for the detector
+ // module index1 number to the detector module index2 number. The
+ // local coordinates are given in two Double point arrays l1[3],
+ // and l2[3].
+ void LtoL(Int_t index1,Int_t index2,Double_t *l1,Double_t *l2)const{
+ Double_t g[3]; LtoG(index1,l1,g);GtoL(index2,g,l2);}
+ // Transforms from one detector local coordinate system
+ // to another detector local coordinate system for the detector
+ // id1[3] to the detector id2[3]. The local coordinates are given
+ // in two Double point arrays l1[3], and l2[3].
+ void LtoL(const Int_t *id1,const Int_t *id2,Double_t *l1,Double_t *l2)
+ const{LtoL(GetModuleIndex(id1[0],id1[1],id1[2]),
+ GetModuleIndex(id2[0],id2[1],id2[2]),l1,l2);}
+ //
+ // Transforms from one detector local coordinate system (used for
+ // ITS tracking) to another detector local coordinate system (used
+ // for ITS tracking) for the detector module index1 number to the
+ // detector module index2 number. The local coordinates are given
+ // in two Double point arrays l1[3], and l2[3].
+ void LtoLtracking(Int_t index1,Int_t index2,
+ Double_t *l1,Double_t *l2)const{
+ Double_t g[3]; LtoGtracking(index1,l1,g);GtoLtracking(index2,g,l2);}
+ // Transforms from one detector local coordinate system (used for
+ // ITS tracking) to another detector local coordinate system (used
+ // for ITS tracking) for the detector id1[3] to the detector id2[3].
+ // The local coordinates are given in two Double point arrays l1[3],
+ // and l2[3].
+ void LtoLtracking(const Int_t *id1,const Int_t *id2,
+ Double_t *l1,Double_t *l2)const{
+ LtoLtracking(GetModuleIndex(id1[0],id1[1],id1[2]),
+ GetModuleIndex(id2[0],id2[1],id2[2]),l1,l2);}
+ //
+ // Transforms of momentum types of quantities from one detector
+ // local coordinate system to another detector local coordinate
+ // system for the detector module index1 number to the detector
+ // module index2 number. The local coordinates are given in two
+ // Double point arrays l1[3], and l2[3].
+ void LtoLMomentum(Int_t index1,Int_t index2,
+ const Double_t *l1,Double_t *l2)const{
+ Double_t g[3]; LtoGMomentum(index1,l1,g);GtoLMomentum(index2,g,l2);}
+ // Transforms of momentum types of quantities from one detector
+ // local coordinate system to another detector local coordinate
+ // system for the detector id1[3] to the detector id2[3]. The local
+ // coordinates are given in two Double point arrays l1[3], and l2[3].
+ void LtoLMomentum(const Int_t *id1,const Int_t *id2,
+ const Double_t *l1,Double_t *l2)const{
+ LtoLMomentum(GetModuleIndex(id1[0],id1[1],id1[2]),
+ GetModuleIndex(id2[0],id2[1],id2[2]),l1,l2);}
+ //
+ // Transforms of momentum types of quantities from one detector
+ // local coordinate system (used by ITS tracking) to another detector
+ // local coordinate system (used by ITS tracking) for the detector
+ // module index1 number to the detector module index2 number. The
+ // local coordinates are given in two Double point arrays l1[3],
+ // and l2[3].
+ void LtoLMomentumTracking(Int_t index1,Int_t index2,
+ Double_t *l1,Double_t *l2)const{
+ Double_t g[3]; LtoGMomentumTracking(index1,l1,g);
+ GtoLMomentumTracking(index2,g,l2);}
+ // Transforms of momentum types of quantities from one detector
+ // local coordinate system (used by ITS tracking) to another detector
+ // local coordinate system (used by ITS tracking) for the detector
+ // id1[3] to the detector id2[3]. The local coordinates are given in
+ // two Double point arrays l1[3], and l2[3].
+ void LtoLMomentumTracking(const Int_t *id1,const Int_t *id2,
+ Double_t *l1,Double_t *l2)const{
+ LtoLMomentumTracking(GetModuleIndex(id1[0],id1[1],id1[2]),
+ GetModuleIndex(id2[0],id2[1],id2[2]),l1,l2);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the ALICE Global coordinate system to a detector local coordinate
+ // system. The specific detector is determined by the module index
+ // number.
+ void GtoLErrorMatrix(Int_t index,const Double_t **g,Double_t **l)const{
+ GetGeomMatrix(index)->GtoLPositionError(
+ (Double_t (*)[3])g,(Double_t (*)[3])l);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the ALICE Global coordinate system to a detector local coordinate
+ // system (used by ITS tracking). The specific detector is determined
+ // by the module index number.
+ void GtoLErrorMatrixTracking(Int_t index,const Double_t **g,
+ Double_t **l)const{
+ if(IsGeantToTracking()) GetGeomMatrix(index)->GtoLPositionError((
+ Double_t (*)[3])g,(Double_t (*)[3])l);
+ else GetGeomMatrix(index)->GtoLPositionErrorTracking(
+ (Double_t (*)[3])g,(Double_t (*)[3])l);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the detector local coordinate system to a ALICE Global coordinate
+ // system. The specific detector is determined by the module index
+ // number.
+ void LtoGErrorMatrix(Int_t index,const Double_t **l,Double_t **g)const{
+ GetGeomMatrix(index)->LtoGPositionError(
+ (Double_t (*)[3])l,(Double_t (*)[3])g);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the detector local coordinate system to a ALICE Global coordinate
+ // system. The specific detector is determined by the module index
+ // number.
+ void LtoGErrorMatrix(Int_t index,const Double_t l[3][3],Double_t g[3][3])
+ const{
+ GetGeomMatrix(index)->LtoGPositionError(
+ (Double_t (*)[3])l,(Double_t (*)[3])g);}
+
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the detector local coordinate system (used by ITS tracking) to a
+ // ALICE Global coordinate system. The specific detector is determined
+ // by the module index number.
+ void LtoGErrorMatrixTracking(Int_t index,const Double_t **l,
+ Double_t **g)const{
+ if(IsGeantToTracking()) GetGeomMatrix(index)->LtoGPositionError(
+ (Double_t (*)[3])g,(Double_t (*)[3])l);
+ else GetGeomMatrix(index)->LtoGPositionErrorTracking(
+ (Double_t (*)[3])l,(Double_t (*)[3])g);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // the detector local coordinate system (used by ITS tracking) to a
+ // ALICE Global coordinate system. The specific detector is determined
+ // by the module index number.
+ void LtoGErrorMatrixTracking(Int_t index,const Double_t l[3][3],
+ Double_t g[3][3])const{
+ if(IsGeantToTracking()) GetGeomMatrix(index)->LtoGPositionError(
+ (Double_t (*)[3])g,(Double_t (*)[3])l);
+ else GetGeomMatrix(index)->LtoGPositionErrorTracking(
+ (Double_t (*)[3])l,(Double_t (*)[3])g);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // one detector local coordinate system to another detector local
+ // coordinate system. The specific detector is determined by the
+ // two module index number index1 and index2.
+ void LtoLErrorMatrix(Int_t index1,Int_t index2,
+ const Double_t **l1,Double_t **l2)const{
+ Double_t g[3][3];
+ LtoGErrorMatrix(index1,l1,(Double_t **)g);
+ GtoLErrorMatrix(index2,(const Double_t **)g,l2);}
+ //
+ // Transforms a matrix, like an Uncertainty or Error matrix from
+ // one detector local coordinate system (used by ITS tracking) to
+ // another detector local coordinate system (used by ITS tracking).
+ // The specific detector is determined by the two module index number
+ // index1 and index2.
+ void LtoLErrorMatrixTraking(Int_t index1,Int_t index2,
+ const Double_t **l1,Double_t **l2)const{
+ Double_t g[3][3];
+ LtoGErrorMatrixTracking(index1,l1,(Double_t **)g);
+ GtoLErrorMatrixTracking(index2,(const Double_t **)g,l2);}
+ // Find Specific Modules
+ // Locate the nearest module to the point g, in ALICE global Cartesian
+ // coordinates [cm] in a give layer. If layer = 0 then it search in
+ // all layers.
+ Int_t GetNearest(const Double_t g[3],Int_t lay=0)const;
+ // Locates the nearest 27 modules, in nearest order, to the point g, in
+ // ALICE global Cartesian coordinates [cm] in a give layer. If layer = 0
+ // then it searches in all layers. (there are 27 elements in a 3x3x3
+ // cube.
+ void GetNearest27(const Double_t g[3],Int_t n[27],Int_t lay=0)const;
+ // Returns the distance [cm] between the point g[3] and the center of
+ // the detector/module specified by the the module index number.
+ Double_t Distance(Int_t index,const Double_t g[3])const{
+ return TMath::Sqrt(GetGeomMatrix(index)->Distance2(g));}
+ // loops over modules and computes the average cylindrical
+ // radius to a given layer and the range.
+ Double_t GetAverageRadiusOfLayer(Int_t layer,Double_t &range)const;
+ // Geometry manipulation
+ // This function performs a Cartesian translation and rotation of
+ // the full ITS from its default position by an amount determined by
+ // the three element arrays tran and rot.
+ void GlobalChange(const Float_t *tran,const Float_t *rot);
+ // This function performs a Cylindrical translation and rotation of
+ // the full ITS from its default position by an amount determined by
+ // the three element arrays tran and rot.
+ void GlobalCylindericalChange(const Float_t *tran,const Float_t *rot);
+ // This function performs a Gaussian random displacement and/or
+ // rotation about the present global position of each active
+ // volume/detector of the ITS with variances given by stran and srot.
+ void RandomChange(const Float_t *stran,const Float_t *srot);
+ // This function performs a Gaussian random displacement and/or
+ // rotation about the present global position of each active
+ // volume/detector of the ITS with variances given by stran and srot.
+ // But in Cylindrical coordinates.
+ void RandomCylindericalChange(const Float_t *stran,const Float_t *srot);
+ // This function converts these transformations from Alice global and
+ // local to Tracking global and local.
+ //
+ // This converts the geometry
+ void GeantToTracking(const AliITSgeom &source);
+ // Other routines.
+ // This routine prints, to a file, the difference between this class
+ // and "other".
+ void PrintComparison(FILE *fp,AliITSgeom *other)const;
+ // This routine prints, to a file, the contents of this class.
+ void PrintData(FILE *fp,Int_t lay,Int_t lad,Int_t det)const;
+ // This function prints out this class in a single stream. This steam
+ // can be read by ReadGeom.
+ void PrintGeom(ostream *out)const;
+ // This function reads in that single steam printed out by PrintGeom.
+ void ReadGeom(istream *in);
+
+ //Conversion from det. local coordinates to local ("V2") coordinates
+ //used for tracking
+
+ void DetLToTrackingV2(Int_t md,Float_t xin,Float_t zin,
+ Float_t &yout, Float_t &zout);
+
+ void TrackingV2ToDetL(Int_t md,Float_t yin,Float_t zin,
+ Float_t &xout,Float_t &zout);
+
+ private:
+ TString fVersion; // Transformation version.
+ Int_t fTrans; // Flag to keep track of which transformation
+ Int_t fNmodules;// The total number of modules
+ Int_t fNlayers; // The number of layers.
+ TArrayI fNlad; // Array of the number of ladders/layer(layer)
+ TArrayI fNdet; // Array of the number of detector/ladder(layer)
+ TObjArray fGm; // Structure of translation. and rotation.
+ TObjArray fShape; // Array of shapes and detector information.