Changeset 6355 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/10/05 16:06:21 (22 years ago)
Author:
mazin
Message:
*** empty log message ***
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  
    319319   
    320320
     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
    321337    Double_t AlphaSig = 0.0;
    322338    MDataValue* AlphaSigContainer = (MDataValue*) ONDataplistfcn->FindObject("AlphaSigValue");
    … …  
    484500   // alpha min for bkg region in ON data
    485501    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
    490503
    491504    Bool_t drawpoly;
    … …  
    523536   
    524537    TString DummyPs = ("Dummy");
     538 
    525539
    526540    const Bool_t rc = findsig.FindSigmaONOFF(&alphaHist,&alphaHistOFF,
    … …  
    788802    ////////////////////////////////////////////////////
    789803   
    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;
    792810
    793811
    … …  
    19311949
    19321950
    1933 
    1934 
    1935 
    1936    
    1937 
    1938 
    1939 
    1940    
    19411951    Double_t prob = whichfractiontrain/(whichfractiontrain + whichfractiontest);
    19421952
    … …  
    24922502    AlphaBkgMaxCont.SetName("AlphaBkgMaxValue");
    24932503   
     2504
     2505    MDataValue DegreeONCont (fDegreeON);
     2506    DegreeONCont.SetName("DegreeON");
     2507
     2508    MDataValue DegreeOFFCont (fDegreeOFF);
     2509    DegreeOFFCont.SetName("DegreeOFF");
     2510
     2511
     2512
     2513
    24942514   
    24952515    // Value of fUseFittedQuantities is stored in container
    … …  
    25932613    parlistfcn.AddToList(&AlphaBkgMinCont);
    25942614    parlistfcn.AddToList(&AlphaBkgMaxCont);
     2615    parlistfcn.AddToList(&DegreeONCont);
    25952616    parlistfcn.AddToList(&UseFittedQuantitiesCont);
    25962617    parlistfcn.AddToList(&UseNormFactorFromAlphaBkgCont);
    … …  
    26982719    parlistfcnOFF.AddToList(&alphaOFF);
    26992720
     2721    parlistfcnOFF.AddToList(&DegreeOFFCont);
    27002722   
    27012723
    … …  
    35213543   
    35223544    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;
    35253547    const Bool_t   drawpoly  = kTRUE;
    35263548    const Bool_t   fitgauss  = kTRUE;
    … …  
    35743596                                       fNormFactorTest,
    35753597                                       alphamin, alphamax,
    3576                                        degree, degreeOFF,
     3598                                       fDegreeON, fDegreeOFF,
    35773599                                       alphasig, drawpolyTest,
    35783600                                       fitgaussTest, printTest,
    … …  
    36843706                           fNormFactorTest,
    36853707                           alphamin, alphamax,
    3686                            degree, degreeOFF,
     3708                           fDegreeON, fDegreeOFF,
    36873709                           alphasig, drawpoly, fitgauss, print,
    36883710                           saveplots, psfilename);
    … …  
    42084230   
    42094231    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;
    42124234    const Bool_t   drawpoly  = kTRUE;
    42134235    const Bool_t   fitgauss  = kTRUE;
    … …  
    42624284                                      fNormFactorTrain,
    42634285                                      alphamin, alphamax,
    4264                                       degree, degreeOFF,
     4286                                      fDegreeON, fDegreeOFF,
    42654287                                      alphasig, drawpolyTest,
    42664288                                      fitgaussTest, printTest,
    … …  
    43654387                           fNormFactorTrain,
    43664388                           alphamin, alphamax,
    4367                            degree, degreeOFF,
     4389                           fDegreeON, fDegreeOFF,
    43684390                           alphasig, drawpoly, fitgauss, print,
    43694391                           saveplots, psfilename);
  • trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MFindSupercutsONOFF.h

    r6232 r6355  
    6666
    6767
    68 
    69 
     68    Int_t fDegreeON;
     69    Int_t fDegreeOFF;
    7070
    7171
    … …  
    317317  Bool_t CheckAlphaSigBkg();
    318318
    319 
    320 
     319  void SetDegreeON (Int_t d) {fDegreeON = d;}
     320  void SetDegreeOFF (Int_t d) {fDegreeOFF = d;}
    321321
    322322
  • trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MHFindSignificanceONOFF.cc

    r6232 r6355  
    547547    //*fLog << "MHFindSignificanceONOFF::FindSigma;" << endl;
    548548 
    549 
    550549    // Pointer to object TPostScript where plots will be stored
    551550    // is copied into member varialbe
    … …  
    12151214      // prepare fit of a polynomial :   (a0 + a1*x + a2*x**2 + a3*x**3 + ...)
    12161215
     1216
    12171217      TString funcname = "PolyOFF";
    12181218      Double_t xmin =   0.0;
    … …  
    17211721      //--------------------------------------------------
    17221722      // prepare fit of a polynomial :   (a0 + a1*x + a2*x**2 + a3*x**3 + ...)
    1723 
     1723 
    17241724      TString funcname = "Poly";
    17251725      Double_t xmin =   0.0;
    … …  
    32343234        fHist -> SetTitle("Alpha Plot");
    32353235        fHist-> SetTitleOffset(1.5, "Y");
     3236        fHist-> SetLineColor(kRed);
    32363237        fHist-> DrawCopy();
    32373238       
    … …  
    32543255        }
    32553256
    3256         fHistOFFNormalized->SetLineColor(kRed);
    3257         fHistOFFNormalized->DrawCopy("same");
     3257
     3258//      fHistOFFNormalized->SetLineColor(kRed);
     3259//      fHistOFFNormalized->DrawCopy("same");
    32583260
    32593261    }
    … …  
    32783280        *fLog << "MHFindSignificanceONOFF::DrawFit; fbackg = NULL" << endl;
    32793281
     3282    if (fHistOFFNormalized)
     3283      {
     3284      fHistOFFNormalized->SetFillStyle(3002);
     3285      fHistOFFNormalized->SetFillColor(9);
     3286      fHistOFFNormalized->DrawCopy("Psamebar");}
     3287
     3288
    32803289      if (fbackg)
    32813290      {
    32823291        // 10, 1 is white and solid
    3283         fbackg->SetLineColor(kRed);
     3292        //fbackg->SetLineColor(kRed);
     3293        fbackg->SetLineColor(196);
    32843294        fbackg->SetLineStyle(1);
    32853295        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.
    32873297      }
    32883298    }
    32893299
     3300//    fCanvas->SaveAs("plot.root");
     3301//    fCanvas->SaveAs("plot.ps");
    32903302
    32913303    //-------------------------------
    … …  
    34553467        if (!fPsFilenameString.IsNull())
    34563468        {
    3457             TString filename = (fPsFilenameString);
     3469            TString filename  = (fPsFilenameString);
     3470            TString filename2 = (fPsFilenameString);
    34583471            // Train or Test Sample is specified outside
    34593472            // class MHFindSignificanceONOFF, and included in
    34603473            // fPsFilenameString
    34613474           
    3462             filename += ("AlphaPlot.ps");
     3475            filename  += ("AlphaPlot.ps");
     3476            filename2 += ("AlphaPlot.C");
    34633477            cout << filename << endl;   
    34643478            fCanvas -> SaveAs(filename);
     3479            fCanvas -> SaveAs(filename2);
    34653480        }
    34663481       
  • trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MSupercutsCalcONOFF.cc

    r6232 r6355  
    108108    // as external variables.
    109109
    110     fSizeOffset = 3000; // photons
     110    fSizeOffset = 3000; // still in photons !
    111111    fDistOffset = 0.9; // degrees 
    112112    fThetaOffset = 20; // degrees   NOT USED FOR THE TIME BEING
Note: See TracChangeset for help on using the changeset viewer.