Ignore:
Timestamp:
09/24/03 13:29:00 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfilter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.cc

    r2206 r2357  
    188188    }
    189189
     190    *fLog << "-------------------------" << endl;
     191    *fLog << "MFEventSelector2::ReadDistribution; read input file to generate the original distribution" << endl;
     192
    190193    MEvtLoop run(GetName());
    191194    MParList plist;
     
    215218    }
    216219
     220    tlist.PrintStatistics(0, kTRUE);
     221
     222    *fLog << "MFEventSelector2::ReadDistribution; Original distribution has "
     223          << fHistOrig->GetHist().GetEntries() << " entries" << endl;
     224    *fLog << "-------------------------" << endl;
     225
    217226    return read.Rewind();
    218227}
     
    259268    if (fNumMax>0)
    260269    {
    261         cout << "SCALE: " << fNumMax/hn.Integral() << endl;
    262         cout << "SCALE: " << fNumMax << endl;
    263         cout << "SCALE: " << hn.Integral() << endl;
     270        *fLog << "MFEventSelector2::PrepareHistograms; SCALE : fNumMax = "
     271              << fNumMax << ",  hn.Integral() = "      << hn.Integral()
     272              << ",  fNumMax/hn.Integral() = " << fNumMax/hn.Integral()
     273              << endl;
     274
    264275        hn.Scale(fNumMax/hn.Integral());
    265276    }
     
    329340Int_t MFEventSelector2::PreProcess(MParList *parlist)
    330341{
     342    memset(fErrors, 0, sizeof(fErrors));
     343
    331344    MTaskList *tasklist = (MTaskList*)parlist->FindObject("MTaskList");
    332345    if (!tasklist)
     
    383396    const Double_t valz=fDataZ.GetValue();
    384397
     398
    385399    // get corresponding bin number
    386400    const Int_t bin = fHistNom->FindFixBin(valx, valy, valz)-1;
     
    389403    if (bin<0)
    390404        return kTRUE;
     405
    391406
    392407    if (gRandom->Rndm()*fIs[bin]<=fNom[bin])
     
    404419    fIs[bin]-=1;
    405420
     421    //----------------------
     422    Int_t rc;
     423    if (fResult)
     424    {
     425        rc = 0;
     426        fErrors[rc]++;
     427        return kTRUE;
     428    }
     429    rc = 1;
     430    fErrors[rc]++;
     431    //----------------------
     432
    406433    return kTRUE;
    407434}
     
    413440Int_t MFEventSelector2::PostProcess()
    414441{
     442    //---------------------------------
     443    if (GetNumExecutions() != 0)
     444    {
     445      *fLog << inf << endl;
     446      *fLog << GetDescriptor() << " execution statistics:" << endl;
     447      *fLog << dec << setfill(' ');
     448      *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3)
     449            << (int)(fErrors[1]*100/GetNumExecutions())
     450            << "%) Events not selected" << endl;
     451
     452      *fLog << " " << fErrors[0] << " ("
     453            << (int)(fErrors[0]*100/GetNumExecutions())
     454            << "%) Events selected!" << endl;
     455      *fLog << endl;
     456    }
     457    //---------------------------------
     458
    415459    if (!fCanvas || !fDisplay)
    416460        return kTRUE;
  • trunk/MagicSoft/Mars/mfilter/MFEventSelector2.h

    r2206 r2357  
    4242
    4343    Bool_t fResult;
     44    Int_t fErrors[2];
    4445
    4546    TH1   &InitHistogram(MH3* &hist);
Note: See TracChangeset for help on using the changeset viewer.