- Timestamp:
- 05/30/05 19:55:26 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7111 r7113 42 42 #include <TProfile.h> 43 43 44 #include "MLog.h" 45 #include "MLogManip.h" 46 47 #include "MMath.h" 48 44 49 #include "MParList.h" 45 50 #include "MParameters.h" … … 49 54 #include "MSrcPosCam.h" 50 55 #include "MPointingPos.h" 51 52 #include "MLog.h"53 #include "MLogManip.h"54 56 55 57 ClassImp(MHDisp); … … 201 203 202 204 // Now we can safly derotate both position... 203 //TVector2 srcp(fSrcPos->GetXY());205 TVector2 srcp(fSrcPos->GetXY()); 204 206 if (rho!=0) 205 207 { 206 208 pos1=pos1.Rotate(-rho); 207 209 pos2=pos2.Rotate(-rho); 208 //srcp=srcp.Rotate(-rho);209 } 210 211 /*if (fSrcPos)210 srcp=srcp.Rotate(-rho); 211 } 212 213 if (fSrcPos) 212 214 { 213 215 pos1 -= srcp*fMm2Deg; 214 216 pos2 -= srcp*fMm2Deg; 215 } */217 } 216 218 217 219 // Workaround: Number-of-entries … … 249 251 250 252 pad->cd(3); 251 TH1 *h2 = (TH1*)gPad->FindObject("Radial"); 253 TH1 *h2 = (TH1*)gPad->FindObject("RadProf"); 254 /* 255 if (!h2) 256 { 257 const Double_t maxr = TMath::Hypot(h1->GetXaxis()->GetXmax(), h1->GetYaxis()->GetXmax()); 258 const Int_t nbin = (h1->GetNbinsX()+h1->GetNbinsY())/2; 259 TProfile *h = new TProfile("RadProf", "Radial Profile", nbin, 0, maxr); 260 //TH1F *h = new TH1F("RadProf", "Radial Profile", nbin, 0, maxr); 261 h->Sumw2(); 262 h->SetXTitle("\\vartheta [\\circ]"); 263 h->SetYTitle("<cts>/\\Delta R"); 264 h->SetBit(kCanDelete); 265 h->Draw(); 266 }*/ 252 267 if (h1 && h2) 253 268 { … … 258 273 const Double_t x0 = h1->GetXaxis()->GetBinCenter(ix); 259 274 const Double_t y0 = h1->GetYaxis()->GetBinCenter(iy); 260 261 h2->SetTitle(Form("Profile @ (%.2f\\circ, %.2f\\circ)", x0, y0));262 275 263 276 for (int x=0; x<h1->GetNbinsX(); x++) … … 269 282 } 270 283 284 // Replace with MAlphaFitter? 271 285 func.SetLineWidth(1); 272 286 func.SetLineColor(kBlue); 287 288 func.SetParLimits(2, h2->GetBinWidth(1), 1.1); 289 273 290 func.SetParameter(0, h2->GetBinContent(1)); 274 291 func.FixParameter(1, 0); 275 func.SetParameter(2, 0. 05);292 func.SetParameter(2, 0.15); 276 293 func.SetParameter(4, h2->GetBinContent(10)); 277 h2->Fit(&func, "IMQ"); 294 h2->Fit(&func, "IMQ", "same", 0, 1.1); 295 296 const Double_t r0 = 2*func.GetParameter(2); 297 const Double_t e = func.Integral(0, r0)/h1->GetBinWidth(1); 298 func.SetParameter(0, 0); 299 const Double_t b = func.Integral(0, r0)/h1->GetBinWidth(1); 300 const Double_t s = MMath::SignificanceLiMa(e, b); 301 302 h2->SetTitle(Form("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ \\sigma=%.1f E=%.0f B=%.0f", x0, y0, func.GetParameter(2), s, e-b, b)); 278 303 } 279 304 /* … … 348 373 const Double_t maxr = TMath::Hypot(h3->GetXaxis()->GetXmax(), h3->GetYaxis()->GetXmax()); 349 374 const Int_t nbin = (h3->GetNbinsX()+h3->GetNbinsY())/2; 350 TProfile *h = new TProfile("Radial", "Radial Profile", nbin, 0, maxr, "s"); 375 TProfile *h = new TProfile("RadProf", "Radial Profile", nbin, 0, maxr); 376 //TH1F *h = new TH1F("RadProf", "Radial Profile", nbin, 0, maxr); 377 h->Sumw2(); 378 h->SetXTitle("\\vartheta [\\circ]"); 379 h->SetYTitle("<cts>/\\Delta R"); 351 380 h->SetBit(kCanDelete); 352 381 h->Draw(); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r7109 r7113 731 731 } 732 732 tlist2.Replace(&falpha2); 733 if (!fIsWobble /* || !fNameHist.IsNull()*/)733 if (!fIsWobble || !fNameHist.IsNull()) 734 734 tlist2.Replace(&ffs2); 735 735 if (fIsWobble && !fNameHist.IsNull())
Note:
See TracChangeset
for help on using the changeset viewer.