Changeset 6355 for trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses
- Timestamp:
- 02/10/05 16:06:21 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MFindSupercutsONOFF.cc
r6232 r6355 319 319 320 320 321 // Degree of polynomials used to fit the ON and the OFF data are retrieved from 322 // the event loop 323 324 Int_t degreeON; 325 Int_t degreeOFF; 326 327 MDataValue* DegreeONContainer = (MDataValue*) ONDataplistfcn->FindObject("DegreeON"); 328 degreeON = int(DegreeONContainer -> GetValue()); 329 330 MDataValue* DegreeOFFContainer = (MDataValue*) OFFDataplistfcn->FindObject("DegreeOFF"); 331 degreeOFF = int(DegreeOFFContainer -> GetValue()); 332 333 gLog << "fcnSupercuts : fDegreeON and fDegreeOFF retrieved from ONDataplistfcn and OFFDataplistfcn: " << endl 334 << "fDegreeON, fDegreeOFF: = " << degreeON << " ," << degreeOFF << endl; 335 336 321 337 Double_t AlphaSig = 0.0; 322 338 MDataValue* AlphaSigContainer = (MDataValue*) ONDataplistfcn->FindObject("AlphaSigValue"); … … 484 500 // alpha min for bkg region in ON data 485 501 const Double_t alphamax = AlphaBkgMax; // alpha max for bkg region in ON data 486 const Int_t degreeON = 2; 487 // degree of polynomial used to fit ON data in Bkg region 488 const Int_t degreeOFF = 2; 489 // degree of polynomial used to fit OFF data in ALL region 502 490 503 491 504 Bool_t drawpoly; … … 523 536 524 537 TString DummyPs = ("Dummy"); 538 525 539 526 540 const Bool_t rc = findsig.FindSigmaONOFF(&alphaHist,&alphaHistOFF, … … 788 802 //////////////////////////////////////////////////// 789 803 790 791 804 805 // Degree of polynomials used to fit the ON OFF data is 806 // set initially to 2. 807 808 fDegreeON = 2; 809 fDegreeOFF = 2; 792 810 793 811 … … 1931 1949 1932 1950 1933 1934 1935 1936 1937 1938 1939 1940 1941 1951 Double_t prob = whichfractiontrain/(whichfractiontrain + whichfractiontest); 1942 1952 … … 2492 2502 AlphaBkgMaxCont.SetName("AlphaBkgMaxValue"); 2493 2503 2504 2505 MDataValue DegreeONCont (fDegreeON); 2506 DegreeONCont.SetName("DegreeON"); 2507 2508 MDataValue DegreeOFFCont (fDegreeOFF); 2509 DegreeOFFCont.SetName("DegreeOFF"); 2510 2511 2512 2513 2494 2514 2495 2515 // Value of fUseFittedQuantities is stored in container … … 2593 2613 parlistfcn.AddToList(&AlphaBkgMinCont); 2594 2614 parlistfcn.AddToList(&AlphaBkgMaxCont); 2615 parlistfcn.AddToList(&DegreeONCont); 2595 2616 parlistfcn.AddToList(&UseFittedQuantitiesCont); 2596 2617 parlistfcn.AddToList(&UseNormFactorFromAlphaBkgCont); … … 2698 2719 parlistfcnOFF.AddToList(&alphaOFF); 2699 2720 2721 parlistfcnOFF.AddToList(&DegreeOFFCont); 2700 2722 2701 2723 … … 3521 3543 3522 3544 const Double_t alphamax = fAlphaBkgMax; 3523 const Int_t degree = 2;3524 const Int_t degreeOFF = 2;3545 // const Int_t degree = 2; 3546 // const Int_t degreeOFF = 2; 3525 3547 const Bool_t drawpoly = kTRUE; 3526 3548 const Bool_t fitgauss = kTRUE; … … 3574 3596 fNormFactorTest, 3575 3597 alphamin, alphamax, 3576 degree, degreeOFF,3598 fDegreeON, fDegreeOFF, 3577 3599 alphasig, drawpolyTest, 3578 3600 fitgaussTest, printTest, … … 3684 3706 fNormFactorTest, 3685 3707 alphamin, alphamax, 3686 degree, degreeOFF,3708 fDegreeON, fDegreeOFF, 3687 3709 alphasig, drawpoly, fitgauss, print, 3688 3710 saveplots, psfilename); … … 4208 4230 4209 4231 const Double_t alphamax = fAlphaBkgMax; 4210 const Int_t degree = 2;4211 const Int_t degreeOFF = 2;4232 // const Int_t degree = 2; 4233 // const Int_t degreeOFF = 2; 4212 4234 const Bool_t drawpoly = kTRUE; 4213 4235 const Bool_t fitgauss = kTRUE; … … 4262 4284 fNormFactorTrain, 4263 4285 alphamin, alphamax, 4264 degree, degreeOFF,4286 fDegreeON, fDegreeOFF, 4265 4287 alphasig, drawpolyTest, 4266 4288 fitgaussTest, printTest, … … 4365 4387 fNormFactorTrain, 4366 4388 alphamin, alphamax, 4367 degree, degreeOFF,4389 fDegreeON, fDegreeOFF, 4368 4390 alphasig, drawpoly, fitgauss, print, 4369 4391 saveplots, psfilename); -
trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MFindSupercutsONOFF.h
r6232 r6355 66 66 67 67 68 69 68 Int_t fDegreeON; 69 Int_t fDegreeOFF; 70 70 71 71 … … 317 317 Bool_t CheckAlphaSigBkg(); 318 318 319 320 319 void SetDegreeON (Int_t d) {fDegreeON = d;} 320 void SetDegreeOFF (Int_t d) {fDegreeOFF = d;} 321 321 322 322 -
trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MHFindSignificanceONOFF.cc
r6232 r6355 547 547 //*fLog << "MHFindSignificanceONOFF::FindSigma;" << endl; 548 548 549 550 549 // Pointer to object TPostScript where plots will be stored 551 550 // is copied into member varialbe … … 1215 1214 // prepare fit of a polynomial : (a0 + a1*x + a2*x**2 + a3*x**3 + ...) 1216 1215 1216 1217 1217 TString funcname = "PolyOFF"; 1218 1218 Double_t xmin = 0.0; … … 1721 1721 //-------------------------------------------------- 1722 1722 // prepare fit of a polynomial : (a0 + a1*x + a2*x**2 + a3*x**3 + ...) 1723 1723 1724 1724 TString funcname = "Poly"; 1725 1725 Double_t xmin = 0.0; … … 3234 3234 fHist -> SetTitle("Alpha Plot"); 3235 3235 fHist-> SetTitleOffset(1.5, "Y"); 3236 fHist-> SetLineColor(kRed); 3236 3237 fHist-> DrawCopy(); 3237 3238 … … 3254 3255 } 3255 3256 3256 fHistOFFNormalized->SetLineColor(kRed); 3257 fHistOFFNormalized->DrawCopy("same"); 3257 3258 // fHistOFFNormalized->SetLineColor(kRed); 3259 // fHistOFFNormalized->DrawCopy("same"); 3258 3260 3259 3261 } … … 3278 3280 *fLog << "MHFindSignificanceONOFF::DrawFit; fbackg = NULL" << endl; 3279 3281 3282 if (fHistOFFNormalized) 3283 { 3284 fHistOFFNormalized->SetFillStyle(3002); 3285 fHistOFFNormalized->SetFillColor(9); 3286 fHistOFFNormalized->DrawCopy("Psamebar");} 3287 3288 3280 3289 if (fbackg) 3281 3290 { 3282 3291 // 10, 1 is white and solid 3283 fbackg->SetLineColor(kRed); 3292 //fbackg->SetLineColor(kRed); 3293 fbackg->SetLineColor(196); 3284 3294 fbackg->SetLineStyle(1); 3285 3295 fbackg->SetLineWidth(4); 3286 //fbackg->DrawCopy("same"); // I do not want to draw it... already too many things.3296 fbackg->DrawCopy("same"); // I do not want to draw it... already too many things. 3287 3297 } 3288 3298 } 3289 3299 3300 // fCanvas->SaveAs("plot.root"); 3301 // fCanvas->SaveAs("plot.ps"); 3290 3302 3291 3303 //------------------------------- … … 3455 3467 if (!fPsFilenameString.IsNull()) 3456 3468 { 3457 TString filename = (fPsFilenameString); 3469 TString filename = (fPsFilenameString); 3470 TString filename2 = (fPsFilenameString); 3458 3471 // Train or Test Sample is specified outside 3459 3472 // class MHFindSignificanceONOFF, and included in 3460 3473 // fPsFilenameString 3461 3474 3462 filename += ("AlphaPlot.ps"); 3475 filename += ("AlphaPlot.ps"); 3476 filename2 += ("AlphaPlot.C"); 3463 3477 cout << filename << endl; 3464 3478 fCanvas -> SaveAs(filename); 3479 fCanvas -> SaveAs(filename2); 3465 3480 } 3466 3481 -
trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MSupercutsCalcONOFF.cc
r6232 r6355 108 108 // as external variables. 109 109 110 fSizeOffset = 3000; // photons110 fSizeOffset = 3000; // still in photons ! 111 111 fDistOffset = 0.9; // degrees 112 112 fThetaOffset = 20; // degrees NOT USED FOR THE TIME BEING
Note:
See TracChangeset
for help on using the changeset viewer.