Ignore:
Timestamp:
08/02/07 10:46:14 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8651 r8655  
    8686
    8787MJSpectrum::MJSpectrum(const char *name, const char *title)
    88     : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), fEstimateEnergy(0),
    89     fCalcHadronness(0), fRefill(kFALSE), fSimpleMode(kTRUE),
    90     fRawMc(kFALSE), fNoThetaWeights(kFALSE)
     88    : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), fCutS(0),
     89    fEstimateEnergy(0), fCalcHadronness(0), fRefill(kFALSE),
     90    fSimpleMode(kTRUE), fRawMc(kFALSE), fNoThetaWeights(kFALSE)
    9191{
    9292    fName  = name  ? name  : "MJSpectrum";
     
    106106    if (fCut3)
    107107        delete fCut3;
     108    if (fCutS)
     109        delete fCutS;
    108110    if (fEstimateEnergy)
    109111        delete fEstimateEnergy;
     
    158160    fLog->Separator("Alpha Fitter");
    159161    *fLog << all;
    160     fit.Print();
     162    fit.Print("result");
    161163
    162164    fLog->Separator("Used Cuts");
     
    164166    fCut0->Print();
    165167    fCut1->Print();
     168    fCutS->Print();
    166169    fCut2->Print();
    167170    fCut3->Print();
    168 
    169     //gLog.Separator("Energy Estimator");
    170     //fEstimateEnergy->Print();
    171171}
    172172
     
    383383{
    384384    if (!fDisplay || !fDisplay->CdCanvas("ZdDist"))
    385         return;
     385    {
     386        *fLog << err << "ERROR - Display or tab ZdDist vanished... abort." << endl;
     387        return kFALSE;
     388    }
    386389
    387390    TH1D &proj = *h2.ProjectionX();
     
    459462// The resulting histogram excess-vs-energy ist copied into h2.
    460463//
    461 Bool_t MJSpectrum::Refill(MParList &plist, TH1D &h2) const
     464Bool_t MJSpectrum::Refill(MParList &plist, TH1D &h2)/*const*/
    462465{
    463466    // Try to find the class used to determin the signal!
     
    478481    }
    479482
    480     cout << "FOUND: "<< cls << endl;
    481 
    482483    // Now fill the histogram
    483484    *fLog << endl;
     
    492493    read.AddFile(fPathIn);
    493494
     495    MTaskEnv taskenv0("CalcHadronness");
     496    taskenv0.SetDefault(fCalcHadronness);
     497
    494498    MEnergyEstimate est;
    495499    MTaskEnv taskenv1("EstimateEnergy");
    496500    taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
    497501
     502    MContinue *cont = new MContinue("", "CutS");
     503    cont->SetAllowEmpty();
     504
     505    if (fCutS)
     506        delete fCutS;
     507    fCutS = cont;
     508
    498509    // FIXME: Create HistE and HistEOff to be able to modify it from
    499510    // the resource file.
     
    509520
    510521    tlist.AddToList(&read);
     522    //tlist.AddToList(&taskenv0); // not necessary, stored in file!
     523    tlist.AddToList(fCutS);
    511524    tlist.AddToList(&taskenv1);
    512525    tlist.AddToList(&f0);
     
    11211134        return kFALSE;
    11221135
    1123     // Print the setup of the MAlphaFitter
    1124     PrintSetup(fit);
    11251136    bins3.SetEdges(temp1, 'x');
    11261137
     
    11441155    if (!Refill(plist, excess))
    11451156        return kFALSE;
     1157
     1158    // Print the setup and result of the MAlphaFitter
     1159    // Print used cuts
     1160    PrintSetup(fit);
    11461161
    11471162    TH2D hist;
     
    11721187    else
    11731188    {
    1174         // This rereads the original MC spectrumand aaplies both
    1175         // weights spectral weights and ZA-weights.
     1189        // This rereads the original MC spectrum and aplies both
     1190        // weights, spectral weights and ZA-weights.
    11761191        weight.SetNameMcEvt("MMcEvtBasic");
    11771192        if (!IntermediateLoop(plist, mh1, temp1, set, weight))
     
    12981313    tlist2.AddToList(fCut0);
    12991314    tlist2.AddToList(&taskenv0);
     1315    tlist2.AddToList(fCutS);
    13001316    tlist2.AddToList(fCut1);
    13011317    tlist2.AddToList(fCut2);
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.h

    r8651 r8655  
    2929    MTask *fCut2;
    3030    MTask *fCut3;
     31    MTask *fCutS;
    3132    MTask *fEstimateEnergy;
    3233    MTask *fCalcHadronness;
     
    4243    Bool_t  ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const;
    4344    Bool_t  GetThetaDistribution(TH1D &temp1, TH1D &temp2) const;
    44     Bool_t  Refill(MParList &plist, TH1D &h) const;
     45    Bool_t  Refill(MParList &plist, TH1D &h) /*const*/;
    4546    Bool_t  InitWeighting(const MDataSet &set, MMcSpectrumWeight &w) const;
    4647
Note: See TracChangeset for help on using the changeset viewer.