o fix names
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 17:25:21 +0000 (17:25 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 17:25:21 +0000 (17:25 +0000)
o add distortions in reveser order, since MakeInverseIterator is called in AliTPCComposedCorrection::GetDistortion

TPC/Upgrade/macros/AnaDelta.C
TPC/Upgrade/macros/GetComposedResidualDistortion.C

index 3085924fba10a6e947a51fa606753b394fd7d309..d11e26b33d82ac4c88663c5effd709b636d76dfa 100644 (file)
@@ -322,8 +322,8 @@ void DumpHn(THn *hn, TTreeSRedirector &stream)
         Double_t cr   = ar->GetBinCenter(ir+1);
         Double_t cphi = aphi->GetBinCenter(iphi+1);
         Double_t cz   = az->GetBinCenter(iz+1);
-        hProj->SetNameTitle(Form("h_%02d_%02d_%d02",iz+1, iphi+1, ir+1),
-                            Form("z,phi,r: %02d,%02d,%d02 (%.2f, %.2f, %.2f)",iz+1,iphi+1,ir+1, cr, cphi, cz )
+        hProj->SetNameTitle(Form("h_%02d_%02d_%02d",iz+1, iphi+1, ir+1),
+                            Form("z,phi,r: %02d,%02d,%02d (%.2f, %.2f, %.2f)",iz+1,iphi+1,ir+1, cz, cphi, cr )
         );
         hProj->Fit(&fg,"QR");
         arrFits.Add(hProj);
index a5c640bea82f5f84c86bb6af7725bc06edb6afcb..9bd5c92fb777c92cb5c43f2adcfbfeaa2a52f38a 100644 (file)
@@ -25,19 +25,22 @@ AliTPCComposedCorrection* GetComposedResidualDistortion(TString fluctuationMap,
   fAverage.Close();
 
   TObjArray *arrMaps = new TObjArray(2);
-  arrMaps->Add(corrFluct);   // distortion with the fluctuation Map
+  // !!!!! In AliTPCComposedCorrection::GetDistortion MakeInverseIterator is called !!!!
+  // for this reason we have to add the maps in the wrong order
+  
   arrMaps->Add(corrAverage); // correction with the average Map
+  arrMaps->Add(corrFluct);   // distortion with the fluctuation Map
 
   // create the composed correction
   // if the weight are set to +1 and -1, the first map will be responsible for the distortions
   // The second map for the corrections
   AliTPCComposedCorrection *residualDistortion = new AliTPCComposedCorrection(arrMaps, AliTPCComposedCorrection::kQueueResidual);
   TVectorD weights(2);
-  weights(0)=+1.;
-  weights(1)=-1.;
+  weights(1)=+1.;
+  weights(0)=-1.;
   if (rescale) {
     Float_t dummy=0;
-    weights(1)=-AliToyMCEventGenerator::GetSCScalingFactor(corrFluct, corrAverage,dummy);
+    weights(0)=-AliToyMCEventGenerator::GetSCScalingFactor(corrFluct, corrAverage,dummy);
   }
   residualDistortion->SetWeights(&weights);