Added possibility to invert the sign of the parametization
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Apr 2010 20:03:30 +0000 (20:03 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Apr 2010 20:03:30 +0000 (20:03 +0000)
STEER/AliCheb3D.cxx
STEER/AliCheb3D.h

index 03d1a69..ab9f281 100644 (file)
@@ -657,6 +657,21 @@ void AliCheb3D::SaveData(FILE* stream) const
 }
 #endif
 
+//__________________________________________________________________________________________
+#ifdef _INC_CREATION_ALICHEB3D_
+void AliCheb3D::InvertSign()
+{
+  // invert the sign of all parameterizations
+  for (int i=fDimOut;i--;) {
+    AliCheb3DCalc* par =  GetChebCalc(i);
+    int ncf = par->GetNCoefs();
+    float *coefs = par->GetCoefs();
+    for (int j=ncf;j--;) coefs[j] = -coefs[j];
+  }
+}
+#endif
+
+
 //_______________________________________________
 void AliCheb3D::LoadData(const char* inpFile)
 {
index 65fb19b..02c6760 100644 (file)
@@ -124,6 +124,7 @@ class AliCheb3D: public TNamed
   void         LoadData(FILE* stream);
   //
 #ifdef _INC_CREATION_ALICHEB3D_
+  void         InvertSign();
   int*         GetNCNeeded(float xyz[3],int DimVar, float mn,float mx, float prec, Int_t npCheck=30);
   void         EstimateNPoints(float Prec, int gridBC[3][3],Int_t npd1=30,Int_t npd2=30,Int_t npd3=30);
   void         SaveData(const char* outfile,Bool_t append=kFALSE)        const;