Changeset 7251
- Timestamp:
- 08/02/05 10:04:19 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7249 r7251 1 2 3 1 Please do not write behind the end of line tag so that it is possible 4 2 to send a Changelog file to a line printer directly. Thanks. … … 20 18 21 19 -*-*- END OF LINE -*-*- 20 21 2005/08/02 Thomas Bretz 22 23 * callisto.rc, callisto_Dec04Jan05.rc: 24 - new ScaleFactor (1% difference) 25 26 * callisto_MarApr05.rc: 27 - new file, identical to callisto.rc but scale factor 5% different 28 29 * mhflux/MHPhi.[h,cc]: 30 - some small improvements 31 - commented code for further improvement 32 33 * mjobs/MJCut.cc: 34 - implemented MHPhi for wobble mode 35 36 * mjobs/MJStar.cc: 37 - repleced maximum deviation (45) in first muon cut by 35 38 it is done anyhow in a later step and doesn't change in between 39 40 22 41 23 42 2005/07/31 Daniela Dorner -
trunk/MagicSoft/Mars/NEWS
r7250 r7251 54 54 - 1.40 (MExtractTimeAndChargeDigitalFilter) 55 55 This is important mainly for timing studies. 56 57 - callisto: added new plot (MHPhi) as described in58 http://www.astro.uni-wuerzburg.de/results/ringmethod/59 56 60 57 - callisto: Changed limits in MHCalibrationChargeCalc from … … 72 69 for Monte Carlo calibrations. 73 70 71 - callisto: Updated Muon scale with latest results (1% difference 72 for most data, 5% for Mar/Apr'05) 73 74 74 - callisto: use a new criterium to exclude bad pixels: If the high-gain 75 75 was saturated and the blackout-events in the low-gain exceed the … … 134 134 plot was a histogram instead of a profile the resulting psf 135 135 became pedestal rms dependant 136 137 - ganymed: added new plot (MHPhi) for wobble mode as described in 138 http://www.astro.uni-wuerzburg.de/results/ringmethod/ 136 139 137 140 - ganymed: corrects now (correctly?) for the misspointing in -
trunk/MagicSoft/Mars/callisto.rc
r7189 r7251 399 399 #MJCalibrateSignal.MCalibColorSet.ExpicitColor: green,blue,uv,ct1 400 400 #MJCalibrateSignal.MCalibrateData.PedestalFlag: Event 401 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.9 56937799401 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.9633911368 402 402 #MJCalibrateSignal.MCalibrateData.CalibrationMode: Default 403 403 #MJCalibrateSignal.MCalibrateData.CalibConvMinLimit: 0.01 -
trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc
r7189 r7251 410 410 #MJCalibrateSignal.MCalibColorSet.ExpicitColor: green,blue,uv,ct1 411 411 #MJCalibrateSignal.MCalibrateData.PedestalFlag: Event 412 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.9 04159132412 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.919117647 413 413 #MJCalibrateSignal.MCalibrateData.CalibrationMode: Default 414 414 #MJCalibrateSignal.MCalibrateData.CalibConvMinLimit: 0.01 -
trunk/MagicSoft/Mars/mbase/MMath.h
r7181 r7251 10 10 namespace MMath 11 11 { 12 inline Double_t DegToHor() { return 1./15; } 13 inline Double_t HorToDeg() { return 15; } 14 15 inline Double_t RadToHor() { return TMath::RadToDeg()/15; } 16 inline Double_t HorToRad() { return 15/TMath::RadToDeg(); } 17 12 18 Double_t GaussProb(Double_t x, Double_t sigma, Double_t mean=0); 13 19 … … 24 30 Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x); 25 31 26 Double_t Sgn(Double_t d);32 inline Double_t Sgn(Double_t d) { return d<0 ? -1 : 1; } 27 33 } 28 34 29 inline Double_t MMath::Sgn(Double_t d) { return d<0 ? -1 : 1; }30 31 35 #endif -
trunk/MagicSoft/Mars/mhflux/MHPhi.cc
r7250 r7251 30 30 // the source position. 31 31 // 32 // More detail can be found at: 33 // http://www.astro.uni-wuerzburg.de/results/ringmethod/ 34 // 32 35 //////////////////////////////////////////////////////////////////////////// 33 36 #include "MHPhi.h" … … 60 63 // 61 64 MHPhi::MHPhi(const char *name, const char *title) 62 : fHillas(0), fSrcPos(0), fDisp(0) 65 : fHillas(0), fSrcPos(0), fDisp(0)//, fOnOffMode(kTRUE), fIsOffLoop(kFALSE) 63 66 { 64 67 fName = name ? name : "MHPhi"; … … 66 69 67 70 // Init Graphs 68 fHPhi.SetNameTitle("Phi", " Distribution of \\Delta\\Phi");71 fHPhi.SetNameTitle("Phi", "\\Delta\\Phi-Distribution"); 69 72 70 73 fHPhi.SetXTitle("\\Delta\\Phi [\\circ]"); … … 78 81 79 82 fHPhi.GetYaxis()->SetTitleOffset(1.2); 80 } 83 84 /* 85 fNameParameter = "Disp"; 86 87 fHist.SetNameTitle("Phi", "\\Delta\\Phi-Distribution"); 88 fHist.SetZTitle("\\Delta\\Phi [\\circ]"); 89 fHist.SetDirectory(NULL); 90 91 // Main histogram 92 fHistTime.SetName("Phi"); 93 fHistTime.SetXTitle("\\Delta\\Phi [\\circ]"); 94 fHistTime.SetDirectory(NULL); 95 96 MBinning binsa, binse, binst; 97 //binsa.SetEdges(75, 0, 1.5); 98 //binsa.SetEdges(arr); 99 binse.SetEdgesLog(15, 10, 100000); 100 binst.SetEdgesASin(67, -0.005, 0.665); 101 //binsa.Apply(fHistTime); 102 103 MH::SetBinning(&fHist, &binst, &binse, &binsa); 104 */ 105 } 106 107 /* 108 Double_t MHPhi::GetVal() const 109 { 110 const Dopuble_t disp = static_cast<const MParameterD*>(fParameter)->GetVal(); 111 112 const TVector2 pos = fHillas->GetMean()*fConvMm2Deg + fHillas->GetNormAxis()*disp; 113 const TVector2 src = fSrcPos->GetXY()*fConvMm2Deg; 114 115 // Calculate radial distance. 116 const Double_t d = pos.Mod() - src.Mod(); 117 118 if (d<-fThetaCut*0.913 || d>fThetaCut) 119 return kTRUE; 120 121 const Double_t delta = src.DeltaPhi(pos)*TMath::RadToDeg(); 122 const Double_t absd = TMath::Abs(delta) 123 124 return fHistOff ? absd : 180-absd; 125 } 126 */ 81 127 82 128 // -------------------------------------------------------------------------- … … 118 164 fThetaCut = 0.21/1.2; 119 165 fDistSrc = 0.4; 166 //fIsOffLoop = !fIsOffLoop; 120 167 121 168 const Double_t w = TMath::ATan(fThetaCut/fDistSrc); … … 124 171 125 172 MBinning(n, 0, n*sz).Apply(fHPhi); 126 173 /* 174 175 // Get Histogram binnings 176 MBinning binst, binse; 177 binst.SetEdges(fHist, 'x'); 178 binse.SetEdges(fHist, 'y'); 179 180 MBinning binsa(n, 0, n*sz); 181 182 // Apply binning 183 binsa.Apply(fHistTime); 184 MH::SetBinning(&fHist, &binst, &binse, &binsa); 185 186 // Remark: Binnings might be overwritten in MHAlpha::SetupFill 187 return MHAlpha::SetupFill(pl); 188 */ 127 189 return kTRUE; 128 190 } … … 135 197 Bool_t MHPhi::Fill(const MParContainer *par, const Stat_t weight) 136 198 { 137 const TVector2 pos = fHillas->GetMean()*fConvMm2Deg -fHillas->GetNormAxis()*fDisp->GetVal();199 const TVector2 pos = fHillas->GetMean()*fConvMm2Deg + fHillas->GetNormAxis()*fDisp->GetVal(); 138 200 const TVector2 src = fSrcPos->GetXY()*fConvMm2Deg; 139 201 202 // Calculate radial distance. 140 203 const Double_t d = pos.Mod() - src.Mod(); 141 204 … … 146 209 147 210 fHPhi.Fill(TMath::Abs(delta), weight); 211 212 // const Double_t absd = TMath::Abs(delta) 213 // fHPhi.Fill(fHistOff ? absd : 180-absd, weight); 148 214 149 215 return kTRUE; … … 161 227 pad->SetBorderMode(0); 162 228 229 AppendPad("combine"); 230 163 231 fHPhi.Draw(); 164 232 165 AppendPad( );233 AppendPad(opt); 166 234 } 167 235 168 236 void MHPhi::Paint(Option_t *o) 169 237 { 170 const Double_t sig = fHPhi.Integral(1, fNumBinsSignal); 171 const Double_t bg = fHPhi.Integral(1+fNumBinsSignal, fHPhi.GetNbinsX()); 172 173 const Double_t cut = fHPhi.GetBinLowEdge(fNumBinsSignal+1); 174 175 const Double_t f = cut/(180-cut); 176 177 const Double_t S0 = MMath::SignificanceLiMaSigned(sig, bg*f); 178 const Double_t S = MMath::SignificanceLiMaSigned(sig, bg, f); 179 180 const TString fmt = Form("\\sigma_{L/M}=%.1f (\\sigma_{0}=%.1f) \\Delta\\Phi<%.1f\\circ E=%.0f B=%.0f f=%.2f", 181 S, S0, cut, sig-bg*f, bg*f, f); 238 //TString opt(o); 239 //opt.ToLower(); 240 241 // if (opt=="combine" && fHistOff) 242 // { 243 // fHPhi.Add(fHist, fHistOff); 244 // return; 245 // } 246 247 const Bool_t wobble = TString(o).Contains("anticut", TString::kIgnoreCase); 248 249 const Double_t cut = fHPhi.GetBinLowEdge(fNumBinsSignal+1); 250 251 const Int_t maxbin = wobble ? fHPhi.GetXaxis()->FindFixBin(180-cut)-1 : fHPhi.GetNbinsX(); 252 const Double_t cut2 = wobble ? fHPhi.GetBinLowEdge(maxbin+1) : 180; 253 254 const Double_t sig = fHPhi.Integral(1, fNumBinsSignal); 255 const Double_t bg = fHPhi.Integral(1+fNumBinsSignal, maxbin); 256 257 const Double_t f = cut/(cut2-cut); 258 259 const Double_t S0 = MMath::SignificanceLiMaSigned(sig, bg*f); 260 const Double_t S = MMath::SignificanceLiMaSigned(sig, bg, f); 261 262 const TString fmt = Form("\\sigma_{L/M}=%.1f (\\sigma_{0}=%.1f) \\Delta\\Phi_{on}<%.1f\\circ \\Delta\\Phi_{off}<%.1f\\circ E=%.0f B=%.0f f=%.2f", 263 S, S0, cut, cut2, sig-bg*f, bg*f, f); 182 264 183 265 const Double_t b = bg *f/fNumBinsSignal; 184 266 const Double_t e = TMath::Sqrt(bg)*f/fNumBinsSignal; 185 267 186 TLatex text(0. 33, 0.94, fmt);268 TLatex text(0.27, 0.94, fmt); 187 269 text.SetBit(TLatex::kTextNDC); 188 270 text.SetTextSize(0.035); … … 192 274 line.SetLineColor(14); 193 275 line.PaintLine(cut, gPad->GetUymin(), cut, gPad->GetUymax()); 276 if (maxbin<fHPhi.GetNbinsX()) 277 line.PaintLine(cut2, gPad->GetUymin(), cut2, gPad->GetUymax()); 194 278 line.SetLineColor(kBlue); 195 279 line.PaintLine(0, b, cut, b); … … 202 286 m.SetMarkerStyle(kFullDotMedium); 203 287 m.PaintMarker(cut/2, b); 204 205 } 288 } -
trunk/MagicSoft/Mars/mhflux/MHPhi.h
r7250 r7251 27 27 Float_t fThetaCut; 28 28 Float_t fDistSrc; 29 //Bool_t fOnOffMode; 30 31 //Bool_t fIsOffLoop; //! 29 32 30 33 public: -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7214 r7251 727 727 MH *hfs=CreateNewHistFS(plist); 728 728 MFillH ffs2(hfs, "MHillas", "FillFS"); 729 MFillH fillphi("MHPhi", "", "FillPhi"); 730 fillphi.SetDrawOption("anticut"); 729 731 730 732 tlist.Replace(&readon); … … 751 753 if (!fIsWobble || !fNameHist.IsNull()) 752 754 tlist2.Replace(&ffs2); 753 if (fIsWobble && !fNameHist.IsNull()) 754 tlist2.RemoveFromList(&ffs); 755 if (fIsWobble) 756 { 757 tlist2.AddToListAfter(&fillphi, &falpha2); 758 if (!fNameHist.IsNull()) 759 tlist2.RemoveFromList(&ffs); 760 } 755 761 756 762 if (!fIsMonteCarlo)
Note:
See TracChangeset
for help on using the changeset viewer.