// module index number. The global and local coordinate are
// given in two floating point arrays g[3], and l[3].
void GtoL(const Int_t index,const Float_t *g,Float_t *l){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dg[i] = g[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
fGm[index]->GtoLPosition(dg,dl);
- for(Int_t i=0;i<3;i++) l[i] =dl[i];}
+ 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
// module index number. The global and local coordinate are
// given in two Double point arrays g[3], and l[3].
void GtoL(const Int_t index,const Double_t *g,Double_t *l){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dg[i] = g[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
fGm[index]->GtoLPosition(dg,dl);
- for(Int_t i=0;i<3;i++) l[i] =dl[i];}
+ for(i=0;i<3;i++) l[i] =dl[i];}
//
// 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 float point arrays g[3], and l[3].
void GtoLMomentum(const Int_t index,const Float_t *g,Float_t *l){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dg[i] = g[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
fGm[index]->GtoLMomentum(dg,dl);
- for(Int_t i=0;i<3;i++) l[i] =dl[i];}
+ 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
// 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(const Int_t index,const Double_t *g,Double_t *l){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dg[i] = g[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dg[i] = g[i];
fGm[index]->GtoLMomentum(dg,dl);
- for(Int_t i=0;i<3;i++) l[i] =dl[i];}
+ 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
// module index number. The global and local coordinate are
// given in two floating point arrays g[3], and l[3].
void LtoG(const Int_t index,const Float_t *l,Float_t *g){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dl[i] = l[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dl[i] = l[i];
fGm[index]->LtoGPosition(dl,dg);
- for(Int_t i=0;i<3;i++) g[i] =dg[i];}
+ 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
// module index number. The global and local coordinate are
// given in two Double point arrays g[3], and l[3].
void LtoG(const Int_t index,const Double_t *l,Double_t *g){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dl[i] = l[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dl[i] = l[i];
fGm[index]->LtoGPosition(dl,dg);
- for(Int_t i=0;i<3;i++) g[i] =dg[i];}
+ for(i=0;i<3;i++) g[i] =dg[i];}
//
// 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 float point arrays g[3], and l[3].
void LtoGMomentum(const Int_t index,const Float_t *l,Float_t *g){
- Double_t dg[3],dl[3];for(Int_t i=0;i<3;i++) dl[i] = l[i];
+ Double_t dg[3],dl[3];Int_t i;for(i=0;i<3;i++) dl[i] = l[i];
fGm[index]->LtoGMomentum(dl,dg);
- for(Int_t i=0;i<3;i++) g[i] =dg[i];}
+ 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
// system. The specific detector is determined by the module index
// number.
void GtoLErrorMatrix(const Int_t index,const Double_t **g,Double_t **l){
- fGm[index]->GtoLPositionError((Double_t[3][3])g,(Double_t[3][3])l);}
+ fGm[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
void GtoLErrorMatrixTracking(const Int_t index,const Double_t **g,
Double_t **l){
if(IsGeantToTracking()) fGm[index]->GtoLPositionError((
- Double_t[3][3])g,(Double_t[3][3])l);
+ Double_t (*)[3])g,(Double_t (*)[3])l);
else fGm[index]->GtoLPositionErrorTracking(
- (Double_t[3][3])g,(Double_t[3][3])l);}
+ (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(const Int_t index,const Double_t **l,Double_t **g){
- fGm[index]->LtoGPositionError((Double_t[3][3])l,(Double_t[3][3])g);}
+ fGm[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
void LtoGErrorMatrixTracking(const Int_t index,const Double_t **l,
Double_t **g){
if(IsGeantToTracking()) fGm[index]->LtoGPositionError((
- Double_t[3][3])g,(Double_t[3][3])l);
- else fGm[index]->LtoGPositionErrorTracking((Double_t[3][3])l,
- (Double_t[3][3])g);}
+ Double_t (*)[3])g,(Double_t (*)[3])l);
+ else fGm[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
/*
$Log$
+Revision 1.2 2000/08/29 20:16:50 nilsen
+New class for ITS coordiante transformations used by AliITSgeom nearly
+exclusively.
+
Revision 1.1.2.1 2000/06/04 16:32:31 Nilsen
A new class to hold the matrix information needed by AliITSgeom.
}
//----------------------------------------------------------------------
AliITSgeomMatrix::AliITSgeomMatrix(const Int_t idt, const Int_t id[3],
- const Double_t matrix[3][3],
+ Double_t matrix[3][3],
const Double_t tran[3]){
////////////////////////////////////////////////////////////////////////
// This is a constructor for the AliITSgeomMatrix class. The rotation matrix
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::GtoLPositionError(const Double_t g[3][3],
+void AliITSgeomMatrix::GtoLPositionError(Double_t g[3][3],
Double_t l[3][3]){
////////////////////////////////////////////////////////////////////////
// Given an Uncertainty matrix in Global coordinates it is rotated so that
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::LtoGPositionError(const Double_t l[3][3],
+void AliITSgeomMatrix::LtoGPositionError(Double_t l[3][3],
Double_t g[3][3]){
////////////////////////////////////////////////////////////////////////
// Given an Uncertainty matrix in Local coordinates it is rotated so that
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::GtoLPositionErrorTracking(const Double_t g[3][3],
+void AliITSgeomMatrix::GtoLPositionErrorTracking(Double_t g[3][3],
Double_t l[3][3]){
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
return;
}
//----------------------------------------------------------------------
-void AliITSgeomMatrix::LtoGPositionErrorTracking(const Double_t l[3][3],
+void AliITSgeomMatrix::LtoGPositionErrorTracking(Double_t l[3][3],
Double_t g[3][3]){
////////////////////////////////////////////////////////////////////////
// A slightly different coordinate system is used when tracking.
AliITSgeomMatrix(const Int_t idt,const Int_t id[3],
const Double_t rot[3],const Double_t tran[3]);
AliITSgeomMatrix(const Int_t idt,const Int_t id[3],
- const Double_t matrix[3][3],const Double_t tran[3]);
+ Double_t matrix[3][3],const Double_t tran[3]);
AliITSgeomMatrix(const Double_t rotd[6]/*degrees Geant angles*/,
const Int_t idt,const Int_t id[3],
const Double_t tran[3]);
for(Int_t i=0;i<3;i++)frot[i] = rot[i];this->MatrixFromAngle();}
void SetTranslation(const Double_t tran[3]){
for(Int_t i=0;i<3;i++) ftran[i] = tran[i];}
- void SetMatrix(const Double_t matrix[3][3]){ for(Int_t i=0;i<3;i++)
+ void SetMatrix(Double_t matrix[3][3]){ for(Int_t i=0;i<3;i++)
for(Int_t j=0;j<3;j++) fm[i][j]=matrix[i][j];this->AngleFromMatrix();}
void SetDetectorIndex(const Int_t idt) {fDetectorIndex = idt;}
void SetIndex(const Int_t id[3]){
void LtoGPosition(const Double_t l[3],Double_t g[3]);
void GtoLMomentum(const Double_t g[3],Double_t l[3]);
void LtoGMomentum(const Double_t l[3],Double_t g[3]);
- void GtoLPositionError(const Double_t g[3][3],Double_t l[3][3]);
- void LtoGPositionError(const Double_t l[3][3],Double_t g[3][3]);
+ void GtoLPositionError(Double_t g[3][3],Double_t l[3][3]);
+ void LtoGPositionError(Double_t l[3][3],Double_t g[3][3]);
// Tracking Related Routines
void GtoLPositionTracking(const Double_t g[3],Double_t l[3]);
void LtoGPositionTracking(const Double_t l[3],Double_t g[3]);
void GtoLMomentumTracking(const Double_t g[3],Double_t l[3]);
void LtoGMomentumTracking(const Double_t l[3],Double_t g[3]);
- void GtoLPositionErrorTracking(const Double_t g[3][3],
+ void GtoLPositionErrorTracking(Double_t g[3][3],
Double_t l[3][3]);
- void LtoGPositionErrorTracking(const Double_t l[3][3],
+ void LtoGPositionErrorTracking(Double_t l[3][3],
Double_t g[3][3]);
Double_t Distance2(const Double_t t[3]){Double_t d=0.0,q;
for(Int_t i=0;i<3;i++){q = t[i]-ftran[i]; d += q*q;}