- Timestamp:
- 09/28/06 09:45:39 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7977 r7978 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2006/09/28 Thomas Bretz 22 23 * mfilter/MFMagicCuts.[h,cc]: 24 - implemented a hadronness cut as an option 25 - updated class reference 26 27 20 28 21 29 2006/09/27 Daniela Dorner -
trunk/MagicSoft/Mars/NEWS
r7931 r7978 114 114 with the colz draw-option 115 115 116 - ganymed: now pruduces valid error codes if failed 116 - ganymed: now produces valid error codes if failed 117 118 - ganymed: MFMagicCuts now supports a hadronness cut. Switch it on 119 with the option "hadronness" instead of "area" or "both" if 120 you want to use both cuts. The hadronness cut includes a fixed 121 cut in hadronness (index 8) and a fixed cut in size (index 9). 122 117 123 118 124 -
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc
r7780 r7978 29 29 // Predefinitions: 30 30 // --------------- 31 // 32 // m3long = MHillasExt.fM3Long*sign(MHillasSrc.fCosDeltaAlpha)*fMM2Deg 33 // antim3long = MHillasExt.fM3Long*sign(MHillasSrcAnti.fCosDeltaAlpha)*fMM2Deg 31 // width/length = MHillas.fWidth/MHillas.fLength 32 // area = MHillas.GetArea*fMm2Deg*fMm2Deg 33 // lgsize = log10(MHillas.fSize) 34 // 35 // alpha = MHillasSrc.fAlpha 36 // dist = MHillasSrc.fDist*fMm2Deg 37 // leakage1 = log10(MNewImagePar.fLeakage1+1) 38 // 39 // m3long = MHillasExt.fM3Long*sign(MHillasSrc.fCosDeltaAlpha)*fMm2Deg 40 // antim3long = MHillasExt.fM3Long*sign(MHillasSrcAnti.fCosDeltaAlpha)*fMm2Deg 41 // 42 // had = Hadronness.fVal 34 43 // 35 44 // Coefficients/Cuts: … … 37 46 // 38 47 // c[0], c[5], c[6], c[7]: 39 // xi = c[0]+c[6]*pow( Leakage1, c[7]);48 // xi = c[0]+c[6]*pow(leakage1, c[7]); 40 49 // p = xi*(1-width/length); 41 50 // disp = TMath::Sign(disp, m3long-c[5]) … … 47 56 // thetasq < c[1]*c[1] 48 57 // 58 // AreaCut: 49 59 // c[2], c[3], c[4]: 50 60 // A = c[2]*(1 - c[4]*(lgsize-c[3])*(lgsize-c[3])) 51 61 // area < A 62 // 63 // HadronnessCut: 64 // c[8], c[9]: 65 // had <= c[8] 66 // 10^lgsize >= c[9] 52 67 // 53 68 // … … 113 128 MFMagicCuts::MFMagicCuts(const char *name, const char *title) 114 129 : fHil(0), fHilSrc(0), fHilAnti(0), fHilExt(0), fNewImgPar(0), 115 fThetaSq(0), fDisp(0), f Matrix(0), fVariables(30), fThetaCut(kNone),116 f HadronnessCut(kAll)130 fThetaSq(0), fDisp(0), fHadronness(0), fMatrix(0), fVariables(30), 131 fThetaCut(kNone), fHadronnessCut(kArea) 117 132 { 118 133 fName = name ? name : "MFMagicCuts"; … … 129 144 AddToBranchList("MHillasExt.fM3Long"); 130 145 AddToBranchList("MNewImagePar.fLeakage1"); 131 146 AddToBranchList("Hadronness.fVal"); 147 /* 132 148 fVariables[0] = 1.42547; // Xi 133 149 fVariables[1] = 0.233773; // Theta^2 … … 137 153 fVariables[5] = -0.0889; // M3long 138 154 fVariables[6] = 0.18; // Xi(theta) 155 fVariables[7] = 0.18; // Xi(theta) 156 */ 139 157 } 140 158 … … 214 232 } 215 233 234 if (fHadronnessCut&kHadronness) 235 { 236 fHadronness = (MParameterD*)pList->FindObject("Hadronness", "MParameterD"); 237 if (!fHadronness) 238 { 239 *fLog << warn << "Hadronness [MParameterD] not found... aborting." << endl; 240 return kFALSE; 241 } 242 } 243 216 244 return kTRUE; 217 245 } … … 258 286 fMap[kEDistAnti] = fMatrix->AddColumn("MHillasSrcAnti.fDist*MGeomCam.fConvMm2Deg"); 259 287 } 288 289 if (fHadronnessCut&kHadronness) 290 fMap[kEHadronness] = fMatrix->AddColumn("Hadronness.fVal"); 260 291 } 261 292 … … 294 325 const Double_t wdivl = fMatrix ? GetVal(kEWdivL) : fHil->GetWidth()/fHil->GetLength(); 295 326 const Double_t lgsize = fMatrix ? GetVal(kESize) : TMath::Log10(fHil->GetSize()); 296 //const Double_t zd = fMatrix ? GetVal(kEZd) : fPointing->GetZdRad();297 327 const Double_t leak = fMatrix ? GetVal(kELeakage) : TMath::Log10(fNewImgPar->GetLeakage1()+1); 298 328 … … 337 367 if (area>=A) 338 368 return kTRUE; 339 340 //const Double_t m3t = fMatrix ? GetVal(kEM3Trans) : TMath::Abs(fHilExt->GetM3Trans())*fMm2Deg; 341 //if (m3t>c[8]) 342 // return kTRUE; 369 } 370 371 // --------------------------------------------------------------- 372 // --------------------------------------------------------------- 373 374 if (fHadronnessCut&kHadronness) 375 { 376 const Double_t had = fMatrix ? GetVal(kEHadronness) : fHadronness->GetVal(); 377 if (had>c[8]) 378 return kTRUE; 379 380 if (TMath::Power(10, lgsize)<c[9]) 381 return kTRUE; 343 382 } 344 383 … … 408 447 *fLog << "none" << endl; 409 448 break; 410 //case kArea: 411 // *fLog << "area" << endl; 412 // break; 449 case kArea: 450 *fLog << "area" << endl; 451 break; 452 case kHadronness: 453 *fLog << "hadronness" << endl; 454 break; 413 455 case kAll: 414 456 *fLog << "all" << endl; … … 499 541 if (str==(TString)"area") 500 542 fHadronnessCut = kArea; 543 if (str==(TString)"hadronness") 544 fHadronnessCut = kHadronness; 501 545 if (str==(TString)"all") 502 546 fHadronnessCut = kAll; -
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h
r7191 r7978 32 32 // Possible kind of hadronness cuts 33 33 enum HadronnessCut_t { 34 kNoCut =BIT(0), 35 kArea =BIT(1), 36 kAll =kArea 34 kNoCut =BIT(0), 35 kArea =BIT(1), 36 kHadronness=BIT(2), 37 kAll =kArea|kHadronness 37 38 }; 38 39 … … 41 42 // the last on in the list. It is used as counter for fMap. 42 43 enum { 43 kESize, kEAlpha, kEAlphaAnti, kEArea, kEDist, kEM3Long,44 kEM3Long Anti, kEM3Trans, kEDistAnti, kEWdivL, //kEZd,45 kELeakage, kESrcSign, //kEDelta, //kEMeanX, kEMeanY, kEDelta,44 kESize, kEAlpha, kEAlphaAnti, kEArea, kEDist, 45 kEM3Long, kEM3LongAnti, kEM3Trans, kEDistAnti, kEWdivL, 46 kELeakage, kESrcSign, kEHadronness, 46 47 kLastElement 47 48 }; … … 54 55 MParameterD *fThetaSq; //! Pointer to MParameterD container called ThetaSq 55 56 MParameterD *fDisp; //! Pointer to MParameterD container called Disp 57 MParameterD *fHadronness; //! Pointer to MParameterD container called Hadronness 56 58 57 59 Float_t fMm2Deg; //! Conversion factor from mm to deg, from MGeomCam
Note:
See TracChangeset
for help on using the changeset viewer.