Changeset 5957
- Timestamp:
- 01/24/05 11:08:09 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5956 r5957 66 66 2005/01/24 Markus Gaug 67 67 68 * msignal/MExtractTimeAndCharge.cc69 - call Clear() for two results containers at beginning of Process()70 71 * msignal/MExtractedSignalPix.cc72 - change sign of default initializer to negative.68 * msignal/MExtractTimeAndCharge.cc 69 - call Clear() for two results containers at beginning of Process() 70 71 * msignal/MExtractedSignalPix.cc 72 - change sign of default initializer to negative. 73 73 74 74 … … 76 76 2005/01/23 Markus Gaug 77 77 78 * mhcalib/MHCalibrationHiLoCam.[h,cc]79 - updated to new logain switch setting in MExtractTimeAndCharge80 - extract also high-gain vs. low-gain time difference81 82 * mhcalib/MHCalibrationCam.[h,cc]83 * mhcalib/MHCalibrationChargeCam.[h,cc]84 - updated reading of conf. values in ReadEnv85 86 * mhcalib/MCalibrationHiLoCam.[h,cc]87 * mhcalib/MCalibrationHiLoPix.[h,cc]88 * mhcalib/MCalibrationIntensityHiLoCam.[h,cc]89 - updated accordingly90 91 * mbadpixels/MBadPixelsCam.cc92 - removed some bugs in the Print() function78 * mhcalib/MHCalibrationHiLoCam.[h,cc] 79 - updated to new logain switch setting in MExtractTimeAndCharge 80 - extract also high-gain vs. low-gain time difference 81 82 * mhcalib/MHCalibrationCam.[h,cc] 83 * mhcalib/MHCalibrationChargeCam.[h,cc] 84 - updated reading of conf. values in ReadEnv 85 86 * mhcalib/MCalibrationHiLoCam.[h,cc] 87 * mhcalib/MCalibrationHiLoPix.[h,cc] 88 * mhcalib/MCalibrationIntensityHiLoCam.[h,cc] 89 - updated accordingly 90 91 * mbadpixels/MBadPixelsCam.cc 92 - removed some bugs in the Print() function 93 93 94 94 -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r5901 r5957 220 220 // -------------------------------------------------------------------------- 221 221 // 222 // Calculate Significance as223 // significance = (s-b)/sqrt(s+k*k*b) mit k=s/b224 //225 // s: total number of events in signal region226 // b: number of background events in signal region227 //228 Double_t MHFalseSource::Significance(Double_t s, Double_t b)229 {230 return MMath::SignificanceSym(s, b);231 }232 233 // --------------------------------------------------------------------------234 //235 // calculates the significance according to Li & Ma236 // ApJ 272 (1983) 317, Formula 17237 //238 // s // s: number of on events239 // b // b: number of off events240 // alpha = t_on/t_off; // t: observation time241 //242 Double_t MHFalseSource::SignificanceLiMa(Double_t s, Double_t b, Double_t alpha)243 {244 return MMath::SignificanceLiMaSigned(s, b);245 }246 247 // --------------------------------------------------------------------------248 //249 222 // Set binnings (takes BinningFalseSource) and prepare filling of the 250 223 // histogram. … … 599 572 const Double_t b = h2->GetBinContent(n); 600 573 601 const Double_t sig = SignificanceLiMa(s, b);574 const Double_t sig = MMath::SignificanceLiMaSigned(s, b); 602 575 603 576 h4->SetBinContent(n, sig); … … 825 798 gPad->Modified(); 826 799 gPad->cd(); 800 } 801 802 // -------------------------------------------------------------------------- 803 // 804 // The following resources are available: 805 // 806 // MHFalseSource.DistMin: 0.5 807 // MHFalseSource.DistMax: 1.4 808 // MHFalseSource.DWMin: 0.1 809 // MHFalseSource.DWMax: 0.3 810 // 811 Int_t MHFalseSource::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 812 { 813 Bool_t rc = kFALSE; 814 if (IsEnvDefined(env, prefix, "DistMin", print)) 815 { 816 rc = kTRUE; 817 SetMinDist(GetEnvValue(env, prefix, "DistMin", fMinDist)); 818 } 819 if (IsEnvDefined(env, prefix, "DistMax", print)) 820 { 821 rc = kTRUE; 822 SetMaxDist(GetEnvValue(env, prefix, "DistMax", fMaxDist)); 823 } 824 825 if (IsEnvDefined(env, prefix, "DWMin", print)) 826 { 827 rc = kTRUE; 828 SetMinDW(GetEnvValue(env, prefix, "DWMin", fMinDist)); 829 } 830 if (IsEnvDefined(env, prefix, "DWMax", print)) 831 { 832 rc = kTRUE; 833 SetMaxDW(GetEnvValue(env, prefix, "DWMax", fMaxDist)); 834 } 835 836 return rc; 827 837 } 828 838 … … 965 975 continue; 966 976 977 // This is a quick hack to correct for the lower acceptance at 978 // the edge of the camera 967 979 h->Scale(entries/h->GetEntries()); 968 980 … … 970 982 { 971 983 hoff = fHistOff->ProjectionZ("AlphaFitOff", ix, ix, iy, iy); 984 // This is a quick hack to correct for the lower acceptance at 985 // the edge of the camera 972 986 hoff->Scale(entries/h->GetEntries()); 973 987 scale = fit.Scale(*hoff, *h); … … 982 996 983 997 // Fill results into some histograms 984 h0a.Fill(fit.GetGausA()); // gaus-A998 h0a.Fill(fit.GetGausA()); // gaus-A 985 999 h0b.Fill(fit.GetCoefficient(3)); // 3 986 h1.Fill(fit.GetGausMu()); // mu987 h2.Fill(fit.GetGausSigma()); // sigma-gaus1000 h1.Fill(fit.GetGausMu()); // mu 1001 h2.Fill(fit.GetGausSigma()); // sigma-gaus 988 1002 if (polynom>1 && !fHistOff) 989 1003 h3.Fill(fit.GetCoefficient(5)); … … 1193 1207 const Double_t b = f2.Integral(0, (float)i)/w; 1194 1208 1195 const Double_t sig = SignificanceLiMa(s, b);1209 const Double_t sig = MMath::SignificanceLiMaSigned(s, b); 1196 1210 1197 1211 g->SetPoint(g->GetN(), i, sig); -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.h
r5776 r5957 59 59 MHFalseSource(const char *name=NULL, const char *title=NULL); 60 60 61 Bool_t SetupFill(const MParList *pList);62 Bool_t Fill(const MParContainer *par, const Stat_t w=1);63 64 61 TH1 *GetHistByName(const TString name) { return &fHist; } 65 62 … … 90 87 } 91 88 89 // MParContainer 90 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE); 91 92 // MH 93 Bool_t SetupFill(const MParList *pList); 94 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 95 96 // TObject 92 97 void Paint(Option_t *opt=""); 93 98 void Draw(Option_t *option=""); 94 95 static Double_t Significance(Double_t s, Double_t b);96 static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);97 99 98 100 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5872 r5957 113 113 114 114 TFile file(oname, "RECREATE"); 115 if (!file.IsOpen()) 116 { 117 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 118 return kFALSE; 119 } 115 120 116 121 *fLog << inf << " - MStatusDisplay..." << flush; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5940 r5957 1563 1563 // Input containers 1564 1564 // 1565 pedcam.SetName("MPedestalCam"); 1565 pedcam.SetName("MPedestalCam"); // MPedestalFundamental 1566 1566 plist.AddToList(&pedcam); 1567 1567 plist.AddToList(&fBadPixels); … … 1962 1962 { 1963 1963 if (fPathOut.IsNull()) 1964 { 1965 *fLog << inf << "No output path specified via SetPathOut - no output written." << endl; 1964 1966 return kTRUE; 1967 } 1965 1968 1966 1969 const TString oname(GetOutputFile()); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r5902 r5957 752 752 753 753 if (fPathOut.IsNull()) 754 { 755 *fLog << inf << "No output path specified via SetPathOut - no output written." << endl; 754 756 return kTRUE; 757 } 755 758 756 759 const TString oname(GetOutputFile()); -
trunk/MagicSoft/Mars/mjobs/MJob.h
r5557 r5957 49 49 ~MJob(); 50 50 51 // Setter 51 52 void SetPathOut(const char *path="."); 52 53 void SetPathIn(const char *path="."); … … 60 61 void SetSequence(const MSequence &seq) { fSequence = seq; } 61 62 63 // Getter 64 TString GetPathOut() const { return fPathOut; } 65 TString GetPathIn() const { return fPathIn; } 66 TString GetPathData() const { return fPathData; } 67 68 // Others 62 69 MStatusDisplay *GetDisplay() { return fDisplay; } 63 70
Note:
See TracChangeset
for help on using the changeset viewer.