]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTransformation.cxx
There was a problem when the destructor was called, and some problem
[u/mrichter/AliRoot.git] / TPC / AliTPCTransformation.cxx
index 1676edfb4d69dfbe06df858f4e75300b0b5ee4d3..ba192319c96bc471c6b4e485b2b80d2297bc8ad4 100644 (file)
@@ -197,6 +197,9 @@ AliTPCTransformation::AliTPCTransformation(const AliTPCTransformation&trafo):
   fFormulaY(0),       // y formula - pointer to the function
   fFormulaZ(0)       // z formula - pointer to the function
 {
+  //
+  // comment are above
+  //
   if (trafo.fNameX) fNameX = new TString(*(trafo.fNameX)); 
   if (trafo.fNameY) fNameY = new TString(*(trafo.fNameY)); 
   if (trafo.fNameZ) fNameZ = new TString(*(trafo.fNameZ)); 
@@ -213,7 +216,7 @@ AliTPCTransformation::~AliTPCTransformation(){
   delete fBitMask;
   delete fFixedParam;
 }
-void AliTPCTransformation::SetParams(Double_t param, Double_t sigma, Double_t sigma2Time, TVectorD* fixedParams){
+void AliTPCTransformation::SetParams(Double_t param, Double_t sigma, Double_t sigma2Time, const TVectorD *const fixedParams){
   //
   // Set parameters of transformation
   //
@@ -250,6 +253,8 @@ Bool_t AliTPCTransformation::Init(){
 
 
 TBits * AliTPCTransformation::BitsSide(Bool_t aside){
+  //
+  // Set bits for given side
   //
   TBits * bits = new TBits(72);
   for (Int_t i=0; i<72;i++){
@@ -263,7 +268,7 @@ TBits * AliTPCTransformation::BitsSide(Bool_t aside){
 
 TBits * AliTPCTransformation::BitsAll(){
   //
-  //
+  // Set all bits to kTRUE
   //
   TBits * bits = new TBits(72);
   for (Int_t i=0; i<72;i++){
@@ -349,9 +354,9 @@ Double_t AliTPCTransformation::GetDeltaXYZ(Int_t coord, Int_t volID, Double_t pa
     Double_t rrphiz[3]={0,0,0};
     if (fFormulaX) rrphiz[0] = fFormulaX(xyz,fFixedParam->GetMatrixArray());
     if (fFormulaY) rrphiz[1] = fFormulaY(xyz,fFixedParam->GetMatrixArray());
-    Double_t alpha = TMath::ATan2(y,x);
-    Double_t ca    = TMath::Cos(alpha);
-    Double_t sa    = TMath::Sin(alpha);
+    alpha = TMath::ATan2(y,x);
+    ca    = TMath::Cos(alpha);
+    sa    = TMath::Sin(alpha);
     if (coord==0) return ca*rrphiz[0]-sa*rrphiz[1];
     if (coord==1) return sa*rrphiz[0]+ca*rrphiz[1];
     if (coord==3) return rrphiz[0];
@@ -362,7 +367,7 @@ Double_t AliTPCTransformation::GetDeltaXYZ(Int_t coord, Int_t volID, Double_t pa
 
 
 
-Double_t  AliTPCTransformation::TPCscalingRPol(Double_t *xyz, Double_t * param){
+Double_t  AliTPCTransformation::TPCscalingRPol(Double_t *xyz, const Double_t * const param){
   //
   // Scaling and shift of TPC radius
   // xyz[0..2] - global xyz of point 
@@ -382,7 +387,7 @@ Double_t  AliTPCTransformation::TPCscalingRPol(Double_t *xyz, Double_t * param){
 }
 
 
-Double_t  AliTPCTransformation::TPCscalingZDrift(Double_t *xyz, Double_t * param){
+Double_t  AliTPCTransformation::TPCscalingZDrift(Double_t *xyz, const Double_t * const param){
   //
   //
   // Scaling and shift of TPC radius
@@ -394,7 +399,7 @@ Double_t  AliTPCTransformation::TPCscalingZDrift(Double_t *xyz, Double_t * param
   return deltaZ*xyz[3];
 }
 
-Double_t  AliTPCTransformation::TPCscalingZDriftT0(Double_t *xyz, Double_t * /*param*/){
+Double_t  AliTPCTransformation::TPCscalingZDriftT0(Double_t *xyz, const Double_t * const /*param*/){
   //
   //
   // Z shift because time 0 offset
@@ -408,7 +413,7 @@ Double_t  AliTPCTransformation::TPCscalingZDriftT0(Double_t *xyz, Double_t * /*p
 }
 
 
-Double_t  AliTPCTransformation::TPCscalingZDriftGy(Double_t *xyz, Double_t * param){
+Double_t  AliTPCTransformation::TPCscalingZDriftGy(Double_t *xyz, const Double_t * const param){
   //
   //
   // Scaling and shift of TPC radius
@@ -423,7 +428,7 @@ Double_t  AliTPCTransformation::TPCscalingZDriftGy(Double_t *xyz, Double_t * par
 
 
 
-Double_t  AliTPCTransformation::TPCscalingPhiLocal(Double_t *xyz, Double_t * param){
+Double_t  AliTPCTransformation::TPCscalingPhiLocal(Double_t *xyz, const Double_t * const param){
   //
   //
   // Scaling if the local y -phi
@@ -439,7 +444,7 @@ Double_t  AliTPCTransformation::TPCscalingPhiLocal(Double_t *xyz, Double_t * par
   return deltaAlpha*xyz[3];
 }
 
-Double_t  AliTPCTransformation::TPClocalRPhiEdge(Double_t *xyz, Double_t * param){
+Double_t  AliTPCTransformation::TPClocalRPhiEdge(Double_t *xyz, const Double_t *const param){
   //
   //
   // Scaling if the local y -phi
@@ -458,7 +463,7 @@ Double_t  AliTPCTransformation::TPClocalRPhiEdge(Double_t *xyz, Double_t * param
 }
 
 
-Double_t       AliTPCTransformation::TPCscalingRIFC(Double_t *xyz, Double_t * param){
+Double_t       AliTPCTransformation::TPCscalingRIFC(Double_t *xyz, const Double_t * const param){
   //
   // inner field cage r distorion - proportinal to 1 over distance to the IFC
   // param[0] - drift polynom order
@@ -472,7 +477,7 @@ Double_t       AliTPCTransformation::TPCscalingRIFC(Double_t *xyz, Double_t * pa
   return xyz[3]*value;
 }
 
-Double_t       AliTPCTransformation::TPCscalingROFC(Double_t *xyz, Double_t * param){
+Double_t       AliTPCTransformation::TPCscalingROFC(Double_t *xyz, const Double_t * const param){
   //
   // outer field cage r distorion - proportinal to 1 over distance to the OFC
   // param[0] - drift polynom order
@@ -488,7 +493,7 @@ Double_t       AliTPCTransformation::TPCscalingROFC(Double_t *xyz, Double_t * pa
 }
 
 
-Double_t       AliTPCTransformation::TPCdeltaFCROC(Double_t *xyz, Double_t * param){
+Double_t       AliTPCTransformation::TPCdeltaFCROC(Double_t *xyz, const Double_t *const param){
   // 
   // delta R(Z) ROC induced
   // param[0] - switch  0 - use distance to IFC - 1 - distance to IFC
@@ -515,7 +520,7 @@ Double_t       AliTPCTransformation::TPCdeltaFCROC(Double_t *xyz, Double_t * par
 }
 
 
-Double_t       AliTPCTransformation::TPCdeltaFCCE(Double_t *xyz, Double_t * param){
+Double_t       AliTPCTransformation::TPCdeltaFCCE(Double_t *xyz, const Double_t *const param){
   // 
   // delta R(Z) CE (central electrode) induced
   // param[0] - switch  0 - use distance to IFC - 1 - distance to IFC
@@ -551,7 +556,7 @@ Double_t       AliTPCTransformation::TPCdeltaFCCE(Double_t *xyz, Double_t * para
 //
 //
 //
-Double_t AliTPCTransformation:: TPClocaldLxdGX(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation:: TPClocaldLxdGX(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter
@@ -573,7 +578,7 @@ Double_t AliTPCTransformation:: TPClocaldLxdGX(Double_t *xyz, Double_t * param){
   return ca*factor;    
 }
 
-Double_t AliTPCTransformation::TPClocaldLxdGY(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation::TPClocaldLxdGY(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter
@@ -595,7 +600,7 @@ Double_t AliTPCTransformation::TPClocaldLxdGY(Double_t *xyz, Double_t * param){
   return   sa*factor;  
 }
 
-Double_t AliTPCTransformation:: TPClocaldLydGX(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation:: TPClocaldLydGX(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter
@@ -617,7 +622,7 @@ Double_t AliTPCTransformation:: TPClocaldLydGX(Double_t *xyz, Double_t * param){
   return            -sa*factor;  
 }
 
-Double_t AliTPCTransformation::TPClocaldLydGY(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation::TPClocaldLydGY(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter
@@ -640,7 +645,7 @@ Double_t AliTPCTransformation::TPClocaldLydGY(Double_t *xyz, Double_t * param){
 }
 
 
-Double_t AliTPCTransformation::TPClocaldRzdGX(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation::TPClocaldRzdGX(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter - rotation angle in mrad
@@ -671,7 +676,7 @@ Double_t AliTPCTransformation::TPClocaldRzdGX(Double_t *xyz, Double_t * param){
   return  dgxR;            
 }
 
-Double_t AliTPCTransformation::TPClocaldRzdGY(Double_t *xyz, Double_t * param){
+Double_t AliTPCTransformation::TPClocaldRzdGY(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //       [3]    - scale parameter - rotation angle in mrad
@@ -724,7 +729,7 @@ Double_t        AliTPCTransformation::TPCDeltaZMediumLong(Double_t *xyz, Double_
   return xyz[3]*sign*signZ;
 }
 
-Double_t        AliTPCTransformation::TPCDeltaZ(Double_t *xyz, Double_t * param){
+Double_t        AliTPCTransformation::TPCDeltaZ(Double_t *xyz, const Double_t *const param){
   //
   // xyz - [0..2] - position 
   //        [3]    - scale parameter
@@ -746,7 +751,7 @@ Double_t        AliTPCTransformation::TPCDeltaZ(Double_t *xyz, Double_t * param)
 }
 
 
-Double_t       AliTPCTransformation::TPCTiltingZ(Double_t *xyz, Double_t * param){
+Double_t       AliTPCTransformation::TPCTiltingZ(Double_t *xyz, const Double_t *const param){
   // xyz - [0..2] - position 
   //        [3]    - scale parameter
   //        [4]    - volID