Changeset 3682 for trunk/MagicSoft/Mars/mimage/MHillasExt.cc
- Timestamp:
- 04/08/04 19:52:13 (22 years ago)
- File:
-
- 1 edited
-
trunk/MagicSoft/Mars/mimage/MHillasExt.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHillasExt.cc
r3666 r3682 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@ uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Rudolf Bock 10/2001 <mailto:Rudolf.Bock@cern.ch> 20 20 ! Author(s): Wolfgang Wittek 06/2002 <mailto:wittek@mppmu.mpg.de> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2000-200 222 ! Copyright: MAGIC Software Development, 2000-2004 23 23 ! 24 24 ! … … 101 101 fM3Trans = 0; 102 102 103 fMaxDist = -1;103 fMaxDist = 0; 104 104 } 105 105 … … 170 170 const Double_t dy = gpix.GetY() - hil.GetMeanY(); // [mm] 171 171 172 const Double_t dist = dx*dx+dy*dy;173 if (dist>maxdist)174 maxdist=dist; // [mm^2]175 176 172 Double_t nphot = pix.GetNumPhotons(); // [1] 177 173 178 174 const Double_t dzx = hil.GetCosDelta()*dx + hil.GetSinDelta()*dy; // [mm] 179 175 const Double_t dzy = -hil.GetSinDelta()*dx + hil.GetCosDelta()*dy; // [mm] 176 177 const Double_t dist = dx*dx+dy*dy; 178 if (TMath::Abs(dist)>TMath::Abs(maxdist)) 179 maxdist = dzx<0 ? -dist : dist; // [mm^2] 180 180 181 181 m3x += nphot * dzx*dzx*dzx; // [mm^3] … … 210 210 fM3Trans = m3y<0 ? -pow(-m3y, 1./3) : pow(m3y, 1./3); // [mm] 211 211 212 fMaxDist = TMath::Sqrt(maxdist); // [mm] 212 const Double_t md = TMath::Sqrt(TMath::Abs(maxdist)); 213 fMaxDist = maxdist<0 ? -md : md; // [mm] 213 214 214 215 SetReadyToSave(); … … 224 225 void MHillasExt::Set(const TArrayF &arr) 225 226 { 226 if (arr.GetSize() != 3)227 if (arr.GetSize() != 4) 227 228 return; 228 229 229 fAsym = arr.At(0); // [mm] fDist minus dist: center of ellipse, highest pixel 230 fM3Long = arr.At(1); // [mm] 3rd moment (e-weighted) along major axis 231 fM3Trans = arr.At(2); // [mm] 3rd moment (e-weighted) along minor axis 232 } 230 fAsym = arr.At(0); 231 fM3Long = arr.At(1); 232 fM3Trans = arr.At(2); 233 fMaxDist = arr.At(3); 234 }
Note:
See TracChangeset
for help on using the changeset viewer.
