Changeset 8619 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 06/29/07 12:47:48 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc
r8613 r8619 18 18 ! Author(s): Thomas Bretz, 03/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2007 21 21 ! 22 22 ! … … 38 38 // dist = MHillasSrc.fDist*fMm2Deg 39 39 // m3long = MHillasExt.fM3Long*sign(MHillasSrc.fCosDeltaAlpha)*fMm2Deg 40 // slope = MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)*fMm2Deg 40 41 // 41 42 // antialpha = MHillasSrcAnti.fAlpha 42 43 // antidist = MHillasSrcAnti.fDist*fMm2Deg 43 44 // antim3long = MHillasExt.fM3Long*sign(MHillasSrcAnti.fCosDeltaAlpha)*fMm2Deg 45 // antislope = MHillasExt.fSlopeLong*sign(MHillasSrcAnti.fCosDeltaAlpha)*fMm2Deg 44 46 // 45 47 // had = Hadronness.fVal … … 48 50 // ------------------ 49 51 // 50 // c[0], c[5], c[6], c[7]:52 // c[0], c[5], c[6], c[7], c[8], c[9]: 51 53 // xi = c[0]+c[6]*pow(leakage1, c[7]); 52 54 // p = xi*(1-width/length); 53 // disp = TMath::Sign(disp, m3long-c[5]) 54 // antidisp = TMath::Sign(disp, antim3long-c[5]) 55 // sign1 = m3long-c[5] 56 // sign2 = (dist-c[9])*c[8]-slope 57 // disp = sign1<0 ||sign2<0 ? -disp : disp 58 // antisign1 = antim3long-c[5] 59 // antisign2 = (antidist-c[9])*c[8]-antislope 60 // antidisp = antisign1<0 || antisign2<0 ? -antidisp : antidisp 55 61 // thetasq = disp^2 + dist^2 - 2*disp*dist*alpha 56 62 // antithetasq = antidisp^2 + antidist^2 - 2*antidisp*antidist*antialpha … … 65 71 // 66 72 // HadronnessCut: 67 // c[ 8], c[9]:68 // had <= c[ 8]69 // 10^lgsize >= c[ 9]73 // c[10], c[11]: 74 // had <= c[10] 75 // 10^lgsize >= c[11] 70 76 // 71 77 // … … 150 156 AddToBranchList("MHillasSrcAnti.fCosDeltaAlpha"); 151 157 AddToBranchList("MHillasExt.fM3Long"); 158 AddToBranchList("MHillasExt.fSlopeLong"); 152 159 AddToBranchList("MNewImagePar.fLeakage1"); 153 160 AddToBranchList("Hadronness.fVal"); … … 277 284 fMatrix = mat; 278 285 286 // fMap[kELength] = fMatrix->AddColumn("MHillas.fLength*MGeomCam.fConvMm2Deg"); 287 // fMap[kEWidth] = fMatrix->AddColumn("MHillas.fWidth*MGeomCam.fConvMm2Deg"); 288 279 289 fMap[kEWdivL] = fMatrix->AddColumn("MHillas.fWidth/MHillas.fLength"); 280 290 fMap[kESize] = fMatrix->AddColumn("log10(MHillas.fSize)"); … … 289 299 fMap[kESrcSign] = fMatrix->AddColumn("sign(MHillasSrc.fCosDeltaAlpha)"); 290 300 301 fMap[kESlope] = fMatrix->AddColumn("MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg"); 302 291 303 if (fThetaCut&kOff) 292 304 { … … 294 306 fMap[kEDistAnti] = fMatrix->AddColumn("MHillasSrcAnti.fDist*MGeomCam.fConvMm2Deg"); 295 307 fMap[kEM3LongAnti] = fMatrix->AddColumn("MHillasExt.fM3Long*sign(MHillasSrcAnti.fCosDeltaAlpha)*MGeomCam.fConvMm2Deg"); 308 fMap[kESlopeAnti] = fMatrix->AddColumn("MHillasExt.fSlopeLong*sign(MHillasSrcAnti.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg"); 296 309 } 297 310 … … 351 364 const Double_t dist = fMatrix ? GetVal(kEDist) : fHilSrc->GetDist()*fMm2Deg; 352 365 const Double_t alpha = fMatrix ? GetVal(kEAlpha) : fHilSrc->GetAlpha(); 366 const Double_t sign = fMatrix ? GetVal(kESrcSign) : MMath::Sgn(fHilSrc->GetCosDeltaAlpha()); 353 367 const Double_t m3long = fMatrix ? GetVal(kEM3Long) : fHilExt->GetM3Long()*TMath::Sign(fMm2Deg, fHilSrc->GetCosDeltaAlpha()); 354 const Double_t sign = fMatrix ? GetVal(kESrcSign) : MMath::Sgn(fHilSrc->GetCosDeltaAlpha()); 368 const Double_t slope = fMatrix ? GetVal(kESlope) : fHilExt->GetSlopeLong()/TMath::Sign(fMm2Deg, fHilSrc->GetCosDeltaAlpha()); 369 370 // Do Ghostbusting with slope and m3l 371 const Double_t sign1 = (dist-c[9])*c[8]-slope; 372 const Double_t sign2 = m3long-c[5]; 373 const Double_t p = sign1<0 || sign2<0 ? -disp : disp; 355 374 356 375 // Align disp along source direction depending on third moment 357 const Double_t p = TMath::Sign(disp, m3long-c[5]);376 //const Double_t p = TMath::Sign(disp, m3long-c[5]); 358 377 359 378 // Align sign of disp along shower axis like m3long … … 384 403 { 385 404 const Double_t had = fMatrix ? GetVal(kEHadronness) : fHadronness->GetVal(); 386 if (had>c[ 8])405 if (had>c[10]) 387 406 return kTRUE; 388 407 389 if (TMath::Power(10, lgsize)<c[ 9])408 if (TMath::Power(10, lgsize)<c[11]) 390 409 return kTRUE; 391 410 } … … 399 418 const Double_t alphaanti = fMatrix ? GetVal(kEAlphaAnti) : fHilAnti->GetAlpha(); 400 419 const Double_t m3lanti = fMatrix ? GetVal(kEM3LongAnti) : fHilExt->GetM3Long()*TMath::Sign(fMm2Deg, fHilAnti->GetCosDeltaAlpha()); 401 402 const Double_t panti = TMath::Sign(disp, m3lanti-c[5]); 420 const Double_t slopeanti = fMatrix ? GetVal(kESlopeAnti) : fHilExt->GetSlopeLong()/TMath::Sign(fMm2Deg, fHilAnti->GetCosDeltaAlpha()); 421 422 // Do Ghostbusting with slope and m3l 423 const Double_t sign3 = (distanti-c[9])*c[8]-slopeanti; 424 const Double_t sign4 = m3lanti-c[5]; 425 const Double_t panti = sign3<0 || sign4<0 ? -disp : disp; 426 427 // Align disp along source direction depending on third moment 428 //const Double_t panti = TMath::Sign(disp, m3lanti-c[5]); 403 429 const Double_t thetasqanti = GetThetaSq(panti, wdivl, distanti, alphaanti); 404 430 -
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h
r7979 r8619 43 43 enum { 44 44 kESize, kEAlpha, kEAlphaAnti, kEArea, kEDist, kEDistAnti, 45 kEM3Long, kEM3LongAnti, kEWdivL, kELeakage, kESrcSign, kEHadronness, 45 kEM3Long, kEM3LongAnti, kEWdivL, kELeakage, kESrcSign, 46 kESlope, kESlopeAnti, kEHadronness, 46 47 kLastElement 47 48 };
Note:
See TracChangeset
for help on using the changeset viewer.