Changeset 9212 for trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
- Timestamp:
- 01/06/09 13:07:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
r8795 r9212 18 18 ! Author(s): Markus Gaug 09/2004 <mailto:markus@ifae.es> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2002-200 720 ! Copyright: MAGIC Software Development, 2002-2008 21 21 ! 22 22 ! … … 47 47 // (Note that the variables fDer are not real first derivative coefficients.) 48 48 // 49 // Note, this spline is not optimized to be evaluated many many times, but 50 // it is optimized to be initialized very fast with new values again and 51 // again. 52 // 49 53 ////////////////////////////////////////////////////////////////////////////// 50 54 #include "MExtralgoSpline.h" … … 179 183 // at x, until x==0. If y is not found -2 is returned. 180 184 // 181 Double_t MExtralgoSpline::SearchY (Float_t x, Float_t y) const185 Double_t MExtralgoSpline::SearchYdn(Float_t x, Float_t y) const 182 186 { 183 187 if (x>=fNum-1) … … 185 189 186 190 Int_t i = TMath::FloorNint(x); 191 if (i<0) 192 return -2; 193 187 194 Double_t rc = FindY(i, kTRUE, y, 0, x-i); 188 195 while (--i>=0 && rc<0) … … 198 205 199 206 Int_t i = TMath::FloorNint(x); 207 if (i>fNum-2) 208 return -2; 209 200 210 Double_t rc = FindY(i, kFALSE, y, x-i, 1.); 201 while ( i++<fNum-1 && rc<0)211 while (++i<fNum-1 && rc<0) 202 212 rc = FindY(i, kFALSE, y); 203 213 … … 287 297 // Search downwards for fHeight/2 288 298 // By doing also a search upwards we could extract the pulse width 289 fTime = SearchY (maxpos, h);299 fTime = SearchYdn(maxpos, h); 290 300 fTimeDev = 0; 291 301 if (width)
Note:
See TracChangeset
for help on using the changeset viewer.