]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
29-mar-2006 NvE Modified numerical evaluation of pandel value in IcePandel to extend...
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Mar 2006 09:43:18 +0000 (09:43 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Mar 2006 09:43:18 +0000 (09:43 +0000)
                range (by George and Dipo).
                Also new memberfunction SetPenalty() introduced in IcePandel.

RALICE/icepack/IcePandel.cxx
RALICE/icepack/IcePandel.h
RALICE/icepack/history.txt

index f392ed043ceef6ec175c9d1ee395c143360450d4..19f53cee58053ab79a03fb3436d06ace87ff0140 100644 (file)
 // can be selected via the memberfunction SetPrintLevel.
 // By default all printout is suppressed (i.e. level=-2).
 //
 // can be selected via the memberfunction SetPrintLevel.
 // By default all printout is suppressed (i.e. level=-2).
 //
+// In case of bad parameter values as input for the minimiser, the
+// value of the Pandel sometimes cannot be evaluated.
+// In such a case a penalty value will be added.
+// By default this penalty value amounts to 3 dB, but the user can
+// modify this penalty value via the memberfunction SetPenalty.
+// This allows investigation/tuning of the sensitivity to hits with
+// bad time residuals.
+// 
 // An example of how to invoke this processor after Xtalk, hit cleaning
 // and a direct walk first guess estimate can be found in the ROOT example
 // macro icepandel.cc which resides in the /macros subdirectory.
 // An example of how to invoke this processor after Xtalk, hit cleaning
 // and a direct walk first guess estimate can be found in the ROOT example
 // macro icepandel.cc which resides in the /macros subdirectory.
@@ -131,6 +139,7 @@ IcePandel::IcePandel(const char* name,const char* title) : TTask(name,title)
  fFitter=0;
  fTrackname="IcePandel";
  fCharge=0;
  fFitter=0;
  fTrackname="IcePandel";
  fCharge=0;
+ fPenalty=3;
 
  // Set the global pointer to this instance
  gIcePandel=this;
 
  // Set the global pointer to this instance
  gIcePandel=this;
@@ -192,6 +201,7 @@ void IcePandel::Exec(Option_t* opt)
    cout << " Maximally " << ntkmax << " track(s) per event for procedure : " << str.Data() << endl;
   }
   cout << " *IcePandel* Hit selection mode : " << fSelhits << endl;
    cout << " Maximally " << ntkmax << " track(s) per event for procedure : " << str.Data() << endl;
   }
   cout << " *IcePandel* Hit selection mode : " << fSelhits << endl;
+  cout << " *IcePandel* Penalty value for minimiser : " << fPenalty << " dB." << endl;
   cout << endl;
   fFirst=0;
  }
   cout << endl;
   fFirst=0;
  }
@@ -478,6 +488,15 @@ void IcePandel::SetCharge(Float_t charge)
  fCharge=charge;
 }
 ///////////////////////////////////////////////////////////////////////////
  fCharge=charge;
 }
 ///////////////////////////////////////////////////////////////////////////
+void IcePandel::SetPenalty(Float_t val)
+{
+// Set user defined penalty value in dB for the minimiser outside the range.
+// This allows investigation/tuning of the sensitivity to hits with bad
+// time residuals.
+// By default the penalty val=3 dB is set in the constructor of this class.
+ fPenalty=val;
+}
+///////////////////////////////////////////////////////////////////////////
 void IcePandel::FitFCN(Int_t&,Double_t*,Double_t& f,Double_t* x,Int_t)
 {
 // The Pandel function used for the minimisation process.
 void IcePandel::FitFCN(Int_t&,Double_t*,Double_t& f,Double_t* x,Int_t)
 {
 // The Pandel function used for the minimisation process.
@@ -490,6 +509,7 @@ void IcePandel::FitFCN(Int_t&,Double_t*,Double_t& f,Double_t* x,Int_t)
  const Float_t cice=c/nice;          // Light speed in ice in meters per ns
  const Float_t tau=557;
  const Double_t rho=((1./tau)+(cice/labs));
  const Float_t cice=c/nice;          // Light speed in ice in meters per ns
  const Float_t tau=557;
  const Double_t rho=((1./tau)+(cice/labs));
+ const Double_t e=exp(1.);
 
  f=0;
 
 
  f=0;
 
@@ -535,20 +555,19 @@ void IcePandel::FitFCN(Int_t&,Double_t*,Double_t& f,Double_t* x,Int_t)
   thit=sx->GetSignal("LE",7);
   tres=thit-tgeo;
 
   thit=sx->GetSignal("LE",7);
   tres=thit-tgeo;
 
-  // The Pandel function evaluation
+  // LLH optimisation based on a decibel scaled Pandel function
   // Avoid minimiser problem for infinite derivative on Pandel surface
   // This problem will be absent when using a smooth convoluted Pandel
   // Avoid minimiser problem for infinite derivative on Pandel surface
   // This problem will be absent when using a smooth convoluted Pandel
-  if (tres>0 && zeta>=1)
+  // Use -10*log10(p) expression to obtain intuitive decibel scale for return value "f"
+  if (tres>=0.001 && tres<=10000 && zeta>=0.001 && zeta<=10000)
   {
   {
-   pandel=pow(rho,zeta)*pow(tres,(zeta-1.))*exp(-rho*tres)/TMath::Gamma(zeta);
+   pandel=-10.*((zeta*log10(rho))+((zeta-1.)*log10(tres))-(rho*tres*log10(e))-log10(TMath::Gamma(zeta)));
+   f+=pandel;
   }
   else
   {
   }
   else
   {
-   pandel=1.e-6;
+   f+=fPenalty; // Penalty in case tres and/or zeta outside range
   }
   }
-
-  // Use 10*log10 expression to obtain intuitive decibel scale
-  f-=10.*log10(pandel);
  }
 }
 ///////////////////////////////////////////////////////////////////////////
  }
 }
 ///////////////////////////////////////////////////////////////////////////
index 6f114a8a7d5f782c363aa2e527fb330f17d20952..314a79f31988384a93047765315ae1e6c4ee86a9 100644 (file)
@@ -27,6 +27,7 @@ class IcePandel : public TTask
   void SelectHits(Int_t mode=1);                       // Specify which hits to be used
   void SetTrackName(TString s);  // Set (alternative) name for the produced tracks
   void SetCharge(Float_t charge);// Set user defined charge for the produced tracks
   void SelectHits(Int_t mode=1);                       // Specify which hits to be used
   void SetTrackName(TString s);  // Set (alternative) name for the produced tracks
   void SetCharge(Float_t charge);// Set user defined charge for the produced tracks
+  void SetPenalty(Float_t val);  // Set penalty value in dB for the minimiser outside the allowed range
   void FitFCN(Int_t&,Double_t*,Double_t&,Double_t*,Int_t); // The minimisation FCN
 
  protected :
   void FitFCN(Int_t&,Double_t*,Double_t&,Double_t*,Int_t); // The minimisation FCN
 
  protected :
@@ -41,7 +42,8 @@ class IcePandel : public TTask
   TFitter* fFitter;     // Pointer to the minimisation processor
   TString fTrackname;   // The name identifier for the produced tracks
   Float_t fCharge;      // User defined charge of the produced tracks
   TFitter* fFitter;     // Pointer to the minimisation processor
   TString fTrackname;   // The name identifier for the produced tracks
   Float_t fCharge;      // User defined charge of the produced tracks
+  Float_t fPenalty;     // User defined penalty value in dB for the minimiser outside the allowed range
 
 
- ClassDef(IcePandel,3) // TTask derived class to perform Pandel fitting
+ ClassDef(IcePandel,4) // TTask derived class to perform Pandel fitting
 };
 #endif
 };
 #endif
index 0ef01bba2bcc9b7fd4d41ff1a48db870051b3497..e7786be9eaa4511b08ff645a41dcf0b781b95a14 100644 (file)
@@ -60,3 +60,6 @@
                 be processed introduced in IceDwalk. 
                 New class IceLinefit introduced.  
 14-mar-2006 NvE User defined track charge setting introduced in IceDwalk, IceLinefit and IcePandel.
                 be processed introduced in IceDwalk. 
                 New class IceLinefit introduced.  
 14-mar-2006 NvE User defined track charge setting introduced in IceDwalk, IceLinefit and IcePandel.
+29-mar-2006 NvE Modified numerical evaluation of pandel value in IcePandel to extend validity
+                range (by George and Dipo).
+                Also new memberfunction SetPenalty() introduced in IcePandel.