- Timestamp:
- 04/29/05 18:22:01 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6985 r6987 28 28 - set as time a time which represents the starting point 29 29 of the calculation interval in all cases 30 31 * star.rc, mmuon/MMuonCalibParCalc.cc, mmuon/MMuonSetup.[h,cc]: 32 - fixed wrong units of thresholds for muon analysis 33 34 * mmuon/MHSingleMuon.cc: 35 - removed obsolete conversion factor in error calculation 36 - FindeCreateObj called for MMuonSetup 37 - get NDF from fit 38 - optimized FindRangeAboveThreshold 39 - handle special case when arcphi is 360deg 40 41 * star.cc: 42 - replaced ProcessFile by Process 43 44 * mjobs/MJSpectrum.cc: 45 - renamed second MHAlpha tab to MHAlphaOn to be able to 46 access each tab uniquely 47 - fixed a bug calling SetStats which could cause crashes 48 49 * mjobs/MJStar.[h,cc]: 50 - preliminary implementation of the muon analysis 51 - reanamed ProcessFile to Process 30 52 31 53 -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r6978 r6987 344 344 345 345 MFillH fill1("MHAlphaOff [MHAlpha]", "MHillasSrc", "FillAlphaOff"); 346 MFillH fill2("MHAlpha ","MHillasSrc", "FillAlphaOn");346 MFillH fill2("MHAlphaOn [MHAlpha]", "MHillasSrc", "FillAlphaOn"); 347 347 348 348 MFDataMember f0("DataType.fVal", '<', 0.5, "FilterOffData"); … … 381 381 } 382 382 383 const MHAlpha *halpha = (MHAlpha *)plist.FindObject("MHAlpha ");383 const MHAlpha *halpha = (MHAlpha *)plist.FindObject("MHAlphaOn"); 384 384 if (!halpha) 385 385 { 386 *fLog << err << GetDescriptor() << ": MHAlpha not found... abort." << endl;386 *fLog << err << GetDescriptor() << ": MHAlphaOn [MHAlpha] not found... abort." << endl; 387 387 return kFALSE; 388 388 } … … 615 615 cout << "Searching..." << endl; 616 616 617 TH1 D*excess = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "MHAlpha");617 TH1 *excess = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "MHAlpha"); 618 618 if (!excess) 619 619 return kFALSE; … … 633 633 634 634 excess->SetTitle("Number of excess events vs Size (data, mc/blue)"); 635 excess->Scale(1./excess->Integral()); 636 excess = excess->DrawCopy(); 637 // Don't do this on the original object! 635 638 excess->SetStats(kFALSE); 636 excess->Scale(1./excess->Integral()); 637 excess->DrawCopy();639 640 cout << "ExcessSize..." << endl; 638 641 639 642 TObject *o=0; 640 643 if ((o=plist.FindObject("ExcessSize"))) 641 644 { 642 TH1F *histsel = (TH1F*)o->FindObject(""); 643 histsel->SetStats(kFALSE); 644 histsel->Scale(1./histsel->Integral()); 645 histsel->SetLineColor(kBlue); 646 histsel->SetBit(kCanDelete); 647 histsel->DrawCopy("same"); 648 } 645 TH1 *histsel = (TH1F*)o->FindObject(""); 646 if (histsel) 647 { 648 histsel->Scale(1./histsel->Integral()); 649 histsel->SetLineColor(kBlue); 650 histsel->SetBit(kCanDelete); 651 histsel = histsel->DrawCopy("same"); 652 // Don't do this on the original object! 653 histsel->SetStats(kFALSE); 654 } 655 } 656 657 cout << "Dist..." << endl; 649 658 650 659 // -------------- Comparison of Image Parameters -------------- … … 652 661 PlotSame(arr, plist, "Dist", "HilSrc", "MHHilSrcMCPost"); 653 662 663 cout << "Length..." << endl; 664 654 665 c.cd(3); 655 666 PlotSame(arr, plist, "Length", "PostCut", "MHHillasMCPost"); 656 667 668 cout << "M3l..." << endl; 669 657 670 c.cd(4); 658 671 PlotSame(arr, plist, "M3l", "HilExt", "MHHilExtMCPost"); 659 672 673 cout << "Conc1..." << endl; 674 660 675 c.cd(5); 661 676 PlotSame(arr, plist, "Conc1", "NewPar", "MHNewParMCPost"); 677 678 cout << "Width..." << endl; 662 679 663 680 c.cd(6); -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r6915 r6987 53 53 #include "MReadReports.h" 54 54 #include "MReadMarsFile.h" 55 #include "MF.h" 55 56 #include "MFDeltaT.h" 56 57 #include "MFSoftwareTrigger.h" … … 61 62 #include "MSrcPosCalc.h" 62 63 #include "MHillasCalc.h" 64 #include "../mmuon/MMuonSearchParCalc.h" 65 #include "../mmuon/MMuonCalibParCalc.h" 66 #include "../mmuon/MMuonSetup.h" 63 67 #include "MFillH.h" 64 68 #include "MWriteRootFile.h" … … 108 112 } 109 113 110 Bool_t MJStar::Process File(Bool_t ismc)114 Bool_t MJStar::Process(Bool_t ismc) 111 115 { 112 116 if (!fSequence.IsValid()) … … 156 160 MObservatory obs; 157 161 plist.AddToList(&obs); 162 163 MMuonSetup muonsetup; 164 plist.AddToList(&muonsetup); 165 166 // Setup binnings for muon analysis 167 MBinning bins1("BinningRadius"); 168 MBinning bins2("BinningArcWidth"); 169 MBinning bins3("BinningRingBroadening"); 170 MBinning bins4("BinningSizeVsArcRadius"); 171 MBinning bins5("BinningMuonWidth"); 172 MBinning bins6("BinningArcPhi"); 173 plist.AddToList(&bins1); 174 plist.AddToList(&bins2); 175 plist.AddToList(&bins3); 176 plist.AddToList(&bins4); 177 plist.AddToList(&bins5); 178 plist.AddToList(&bins6); 179 158 180 159 181 // Setup Tasklist … … 276 298 write.AddContainer("MObservatory", "RunHeaders"); 277 299 300 // Muon Setup 301 write.AddContainer("BinningRadius", "RunHeaders"); 302 write.AddContainer("BinningArcWidth", "RunHeaders"); 303 write.AddContainer("BinningRingBroadening", "RunHeaders"); 304 write.AddContainer("BinningSizeVsArcRadius", "RunHeaders"); 305 write.AddContainer("MMuonSetup", "RunHeaders"); 306 278 307 if (ismc) 279 308 { … … 327 356 tlist2.AddToList(&fill4); 328 357 tlist2.AddToList(&fill5); 358 359 // ********************************************************* 360 MMuonSetup setup; 361 plist.AddToList(&setup); 362 363 MF fmuon1("MHillas.fSize>150", "MuonPreCut"); 364 365 MF fmuon2("(MMuonSearchPar.fRadius>180) &&" 366 "(MMuonSearchPar.fRadius<400) &&" 367 "(MMuonSearchPar.fDeviation<45)", "MuonSearchCut"); 368 fmuon2.SetFilter(&fmuon1); 369 370 MF fmuon3("(MMuonCalibPar.fArcPhi>175) &&" 371 "(MMuonSearchPar.fDeviation<37)", "MuonFinalCut"); 372 373 MMuonSearchParCalc muscalc; 374 muscalc.SetFilter(&fmuon1); 375 376 MMuonCalibParCalc mcalc; 377 mcalc.SetFilter(&fmuon2); 378 379 MFillH fill11("MHSingleMuon", "", "FillMuon"); 380 MFillH fill10("MHMuonPar", "", "FillMuonPar"); 381 fill11.SetFilter(&fmuon2); 382 fill10.SetFilter(&fmuon3); 383 384 tlist2.AddToList(&fmuon1); 385 tlist2.AddToList(&muscalc); 386 tlist2.AddToList(&fmuon2); 387 tlist2.AddToList(&fill11); 388 tlist2.AddToList(&mcalc); 389 tlist2.AddToList(&fmuon3); 390 tlist2.AddToList(&fill10); 391 392 // ********************************************************* 393 329 394 //tlist2.AddToList(&fill6); 330 395 //tlist2.AddToList(&fill7); -
trunk/MagicSoft/Mars/mjobs/MJStar.h
r4906 r6987 14 14 MJStar(const char *name=NULL, const char *title=NULL); 15 15 16 Bool_t Process File(Bool_t ismc=kFALSE);16 Bool_t Process(Bool_t ismc=kFALSE); 17 17 18 18 ClassDef(MJStar, 0) // Tool to create a pedestal file (MPedestalCam) -
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
r6986 r6987 221 221 { 222 222 const Float_t val = h.GetBinContent(i%n + 1); 223 if (val<thres && last<0) 223 if (val<thres) 224 { 224 225 last = i%n+1; 226 break; 227 } 225 228 } 226 229 … … 230 233 { 231 234 const Float_t val = h.GetBinContent(i%n + 1); 232 if (val<thres && first<0) 235 if (val<thres) 236 { 233 237 first = i%n+1; 238 break; 239 } 234 240 } 235 241 … … 245 251 Bool_t MHSingleMuon::CalcPhi(Double_t thres, Double_t &peakphi, Double_t &arcphi) const 246 252 { 253 if (fHistPhi.GetMaximum()<thres) 254 return kFALSE; 255 247 256 peakphi = 180.-fHistPhi.GetBinCenter(fHistPhi.GetMaximumBin()); 248 257 … … 250 259 Int_t first, last; 251 260 252 if (!FindRangeAboveThreshold(fHistPhi, thres, first, last)) 253 return kFALSE; 254 255 //cout << "P: " << first << " " << last << " " << last-first << endl; 261 FindRangeAboveThreshold(fHistPhi, thres, first, last); 262 263 const Int_t n = fHistPhi.GetNbinsX(); 264 const Int_t edge = fHistPhi.GetMaximumBin()+n/2; 265 if (first<0) 266 first = (edge-1)%n+1; 267 if (last<0) 268 last = edge%n+1;; 256 269 257 270 const Float_t startfitval = fHistPhi.GetBinLowEdge(first+1); 258 271 const Float_t endfitval = fHistPhi.GetBinLowEdge(last); 259 272 260 //Int_t effbinnum = TMath::Nint((endfitval-startfitval)/convbin2val); 261 262 arcphi = last<first ? 360+(endfitval-startfitval) : endfitval-startfitval; 273 arcphi = last-1<first ? 360+(endfitval-startfitval) : endfitval-startfitval; 263 274 264 275 //if (fEnableImpactCalc) -
trunk/MagicSoft/Mars/star.cc
r6911 r6987 225 225 // job.SetPathIn(kInpath); // not yet needed 226 226 227 if (!job.Process File(kIsMC))227 if (!job.Process(kIsMC)) 228 228 { 229 229 gLog << err << "Calculation of image parameters failed." << endl << endl;
Note:
See TracChangeset
for help on using the changeset viewer.