Changeset 7775 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 07/03/06 09:59:59 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
r7721 r7775 68 68 MHThetaSqN::MHThetaSqN(const char *name, const char *title) 69 69 : MHAlpha(name, title), fDisp(0), fSrcPosCam(0), fSignificanceCutLevel(1.7), 70 fNumBinsSignal(3), fNumBinsTotal(75), fNumOffSourcePos(3), fDoOffCut(kTRUE) 70 fNumBinsSignal(3), fNumBinsTotal(75), fNumOffSourcePos(3), fDoOffCut(kTRUE), 71 fCounter(4) 71 72 { 72 73 // … … 176 177 177 178 fThetaSqCut = fSignificanceCutLevel*fFit.GetSignalIntegralMax()/1.7; 179 180 fCounter.Reset(); 178 181 179 182 return kTRUE; … … 280 283 281 284 const Double_t dist = src0.Mod()*TMath::Sin(rad/2); 282 if (dist<TMath::Sqrt(fFit.GetSignalIntegralMax())) 285 const Double_t cut = TMath::Sqrt(fFit.GetSignalIntegralMax()); 286 if (dist<cut) 283 287 { 284 *fLog << warn << "WARNING - Source regions overlap: "; 285 *fLog << "distance " << dist << " less than theta-sq cut "; 286 *fLog << TMath::Sqrt(fFit.GetSignalIntegralMax()) << "!" << endl; 288 *fLog << warn << "WARNING - Source regions overlap: distance "; 289 *fLog << dist << " less than theta-sq cut " << cut << "!" << endl; 290 if (dist*1.7<cut*1.0) 291 fCounter[3]++; 292 else 293 if (dist*1.7<cut*1.5) 294 fCounter[2]++; 295 else 296 fCounter[1]++; 297 287 298 } 299 else 300 fCounter[0]++; 288 301 } 289 302 290 303 return kTRUE; 304 } 305 306 // -------------------------------------------------------------------------- 307 // 308 // Print execution statistics 309 // 310 Bool_t MHThetaSqN::Finalize() 311 { 312 if (GetNumExecutions()>0) 313 { 314 *fLog << inf << endl; 315 *fLog << GetDescriptor() << " execution statistics:" << endl; 316 PrintSkipped(fCounter[3], "Region distance below 1.0sigma (68.3%)"); 317 PrintSkipped(fCounter[2], "Region distance below 1.5sigma (86.6%)"); 318 PrintSkipped(fCounter[1], "Region distance below 1.7sigma (91.1%)"); 319 *fLog << " " << (int)fCounter[0] << " (" << Form("%5.1f", 100.*fCounter[0]/GetNumExecutions()) << "%) Evts ok!" << endl; 320 //*fLog << " " << (int)fCounter[0] << " (" << Form("%5.1f", 100.*fCounter[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl; 321 *fLog << endl; 322 } 323 324 return MHAlpha::Finalize(); 291 325 } 292 326 -
trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h
r7720 r7775 27 27 Bool_t fDoOffCut; 28 28 29 TArrayI fCounter; //! 30 29 31 // MHThetaSqN 30 32 TVector2 GetVec(const TVector2 &v, Int_t n1) const; … … 45 47 46 48 // MH 47 Bool_t SetupFill(const MParList *pl); 48 Bool_t Fill(const MParContainer *par, const Stat_t weight); 49 Bool_t SetupFill(const MParList *pl); 50 Bool_t Fill(const MParContainer *par, const Stat_t weight); 51 Bool_t Finalize(); 49 52 50 53 // MParContainer … … 61 64 void SetNumOffSourcePos(UInt_t n=3) { fNumOffSourcePos=TMath::Max(n, 1U); } 62 65 63 void SetSignificanceCutLevel(Double_t l=1.7) 66 void SetSignificanceCutLevel(Double_t l=1.7) { fSignificanceCutLevel=l; } 64 67 65 68 void SetDoOffCut(Bool_t b=kTRUE) { fDoOffCut = b; }
Note:
See TracChangeset
for help on using the changeset viewer.