]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTransformation.cxx
undo accidental commit of CMake and LinkDef file without PhiCorrelation Task
[u/mrichter/AliRoot.git] / TPC / AliTPCTransformation.cxx
index 3635a7f586275ef2a603221ffddf6febc2210194..979060eecc63995d7a12831c3ab7fc289ec30171 100644 (file)
@@ -70,6 +70,9 @@ Int_t  AliTPCTransformation::BuildBasicFormulas(){
   RegisterFormula("TPCscalingRIFC",(GenFuncG)(AliTPCTransformation::TPCscalingRIFC));
   RegisterFormula("TPCscalingROFC",(GenFuncG)(AliTPCTransformation::TPCscalingROFC));
   //
+  RegisterFormula("TPCdeltaFCROC",(GenFuncG)(AliTPCTransformation::TPCdeltaFCROC));
+  RegisterFormula("TPCdeltaFCCE",(GenFuncG)(AliTPCTransformation::TPCdeltaFCCE));
+  //
   RegisterFormula("TPCscalingZDr",(GenFuncG)(AliTPCTransformation::TPCscalingZDrift));
   RegisterFormula("TPCscalingZDrGy",(GenFuncG)(AliTPCTransformation::TPCscalingZDriftGy));
   RegisterFormula("TPCscalingZDriftT0",(GenFuncG)(AliTPCTransformation::TPCscalingZDriftT0));
@@ -210,7 +213,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
   //
@@ -346,9 +349,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];
@@ -436,7 +439,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
@@ -485,12 +488,70 @@ Double_t       AliTPCTransformation::TPCscalingROFC(Double_t *xyz, Double_t * pa
 }
 
 
+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
+  // param[1] - kFC scaling factor  (multiplication factor  of (OFC-IFC))
+  // param[2] - kROC scaling factor 
+  // parameters [1] and [2] should be obtained from the electric field
+  //            simulation
+  //
+  Double_t rInner=78.8;
+  Double_t rFirst=85.2; 
+  Double_t rLast=245.8;
+  Double_t rOuter=258.0;  
+
+  Double_t radius  = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
+  //calculate distance to the FC - inner or outer 
+  Double_t deltaFC = (param[0]<0.5)? TMath::Abs(radius-rFirst) : TMath::Abs(radius-rLast);
+  deltaFC/=(rOuter-rInner);
+  Double_t scalingFC = 1./(1.+deltaFC/(param[1]));
+  //
+  Double_t drift = 1.-TMath::Abs(xyz[2]/250.);  // normalized drift length
+  Double_t scalingROC = (1.-1./(1.+drift/param[2]));
+  //
+  return xyz[3]*scalingFC*scalingROC;
+}
+
+
+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
+  // param[1] - kFC scaling factor  (multiplication factor  of (OFC-IFC))
+  // param[2] - kCE scaling factor 
+  // parameters [1] and [2] should be obtained from the electric field
+  //            simulation
+  Double_t rInner=78.8;
+  Double_t rFirst=85.2; 
+  Double_t rLast =245.8;
+  Double_t rOuter=258.0;  
+
+  Double_t radius  = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
+  //calculate distance to the FC - inner or outer 
+  Double_t deltaFC = (param[0]<0.5)? TMath::Abs(radius-rFirst) : TMath::Abs(radius-rLast);
+  deltaFC/=(rOuter-rInner);
+  Double_t scalingFC = 1./(1.+deltaFC/(param[1]));
+  //
+  Double_t drift     = 1.-TMath::Abs(xyz[2]/250.);  // normalized drift length
+  Double_t scalingCE = 1/(1.+(1.-drift)/param[2]);  // 
+  //
+  return xyz[3]*scalingFC*scalingCE;
+}
+
+
+
+
+
+
+
 //
 // TPC sector local misalignment 
 //
 //
 //
-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
@@ -512,7 +573,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
@@ -534,7 +595,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
@@ -556,7 +617,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
@@ -579,7 +640,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
@@ -610,7 +671,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
@@ -663,7 +724,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
@@ -685,7 +746,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