ATO-98 - forgotten commit - Getter for regstered correction - to enable change of...
authormivanov <marian.ivanov@cern.ch>
Sat, 8 Nov 2014 03:40:34 +0000 (04:40 +0100)
committermivanov <marian.ivanov@cern.ch>
Sat, 8 Nov 2014 03:40:34 +0000 (04:40 +0100)
TPC/Base/AliTPCCorrection.cxx
TPC/Base/AliTPCCorrection.h
TPC/CalibMacros/RegisterCorrection.C

index 0df4ef1..20059bf 100644 (file)
@@ -1502,7 +1502,7 @@ void AliTPCCorrection::PoissonRelaxation3D( TMatrixD**arrayofArrayV, TMatrixD**a
            Double_t *arrayVMfastI = &(arrayVMfast[i*columns]);
            Double_t *sumChargeDensityFastI=&(sumChargeDensityFast[i*columns]);
            for ( Int_t j = jone ; j < columns-1 ; j+=jone ) {
-             Double_t resSlow,resFast;
+             Double_t /*resSlow*/resFast;
 //           resSlow  = (   coef2[i]          *   arrayV(i-ione,j)
 //                             + tempratioZ        * ( arrayV(i,j-jone)  +  arrayV(i,j+jone) )
 //                             - overRelaxcoef5[i] *   arrayV(i,j) 
@@ -3072,6 +3072,13 @@ void AliTPCCorrection::AddVisualCorrection(AliTPCCorrection* corr, Int_t positio
   fgVisualCorrection->AddAt(corr, position);
 }
 
+AliTPCCorrection* AliTPCCorrection::GetVisualCorrection(Int_t position) { 
+  //
+  // Get visula correction registered at index=position
+  //
+  return fgVisualCorrection? (AliTPCCorrection*)fgVisualCorrection->At(position):0;
+}
+
 
 
 Double_t AliTPCCorrection::GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType){
index 5380e76..db1a245 100644 (file)
@@ -86,6 +86,7 @@ public:
   void FastSimDistortedVertex(Double_t orgVertex[3], Int_t nTracks, AliESDVertex &aV, AliESDVertex &avOrg, AliESDVertex &cV, AliESDVertex &cvOrg, TTreeSRedirector * const pcstream, Double_t etaCuts);
 
   static void AddVisualCorrection(AliTPCCorrection* corr, Int_t position);
+  static AliTPCCorrection*  GetVisualCorrection(Int_t position);
   static Double_t GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0);
   static Double_t GetCorrXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0);
   //
index a619587..0287bef 100644 (file)
@@ -35,7 +35,8 @@
 
  .L $ALICE_ROOT/TPC/CalibMacros/RegisterCorrection.C+
  RegisterCorrection(0);
- See example usage of correction primitive/derivatives in file
+
+ //See example usage of correction primitive/derivatives in file
 
 
 */
@@ -369,9 +370,9 @@ void RegisterAliTPCFCVoltError3D(){
   AliTPCCorrection::AddVisualCorrection(rodIFCSin,7); 
   AliTPCCorrection::AddVisualCorrection(rodIFCCos,8); 
   //
-  AliTPCCorrection::AddVisualCorrection(rodIFCShift,9); 
-  AliTPCCorrection::AddVisualCorrection(rodIFCSin,10); 
-  AliTPCCorrection::AddVisualCorrection(rodIFCCos,11); 
+  AliTPCCorrection::AddVisualCorrection(rodOFCShift,9); 
+  AliTPCCorrection::AddVisualCorrection(rodOFCSin,10); 
+  AliTPCCorrection::AddVisualCorrection(rodOFCCos,11); 
 }
 
 
@@ -1432,12 +1433,11 @@ AliTPCComposedCorrection * GetCorrectionFromFile(){
   return cc;
 }
 
-
-void TestDrawExample(){
+void TestParExample(){
   //
   // dz shift example: AliTPCCorrection::AddVisualCorrection(rocDzIROCA,705); 
-  //
-  AliTPCCorrection* corr = AliTPCCorrection::GetVisualCorrection(705); 
+  // => parabolic fit not appropriate - helix fit differnt results
+  AliTPCCorrection* corr = AliTPCCorrection::GetVisualCorrection(705);  
   corr->SetOmegaTauT1T2(0.33,1,1);
   TF1 f705Par("f705","AliTPCCorrectionFit::EvalAtPar(0,0,x,0.1,705,0,20)",0,360);
   f705Par.SetLineColor(2);f705Par.SetNpx(500);
@@ -1445,5 +1445,6 @@ void TestDrawExample(){
   f705Helix.SetLineColor(4);f705Helix.SetNpx(500);
   f705Helix.Draw();
   f705Par.Draw("same");
-
 }
+
+