Ignore:
Timestamp:
11/20/03 09:13:31 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/CT1Analysis.C

    r2475 r2543  
    286286
    287287
     288
    288289    // Job E_XX : extended version of E_XX (including flux plots) 
    289290    //  - select g/h separation method XX
     
    297298
    298299
    299     Bool_t JobE_XX  = kFALSE; 
     300    Bool_t JobE_XX  = kTRUE; 
     301    Bool_t CCollArea= kFALSE;  // calculate eff. collection areas
    300302    Bool_t OEEst    = kFALSE;  // optimize energy estimator
    301     Bool_t WEX      = kFALSE;  // update root file  ?
    302     Bool_t WRobert  = kFALSE;  // write out Robert's file  ?
     303    Bool_t WEX      = kTRUE;  // update root file  ?
     304    Bool_t WRobert  = kTRUE;  // write out Robert's file  ?
     305
    303306
    304307
     
    25272530
    25282531
    2529 
    25302532  //---------------------------------------------------------------------
    25312533  // Job E_XX
     
    25472549
    25482550    gLog << "" << endl;
    2549     gLog << "Macro CT1Analysis : JobE_XX, OEEst, WEX = "
     2551    gLog << "Macro CT1Analysis : JobE_XX, CCollArea, OEEst, WEX = "
    25502552         << (JobE_XX ? "kTRUE" : "kFALSE")  << ",  "
     2553         << (CCollArea?"kTRUE" : "kFALSE")  << ",  "
    25512554         << (OEEst ?   "kTRUE" : "kFALSE")  << ",  "
    25522555         << (WEX     ? "kTRUE" : "kFALSE")  << endl;
     
    25542557
    25552558    // type of data to be analysed
    2556     TString typeData = "ON";
     2559    //TString typeData = "ON";
    25572560    //TString typeData = "OFF";
    2558     //TString typeData = "MC";
     2561    TString typeData = "MC";
    25592562    gLog << "typeData = " << typeData << endl;
    25602563
     
    25672570    // and definition of final selections
    25682571
    2569     TString XX("SC");
    2570     //TString XX("RF");
     2572    //TString XX("SC");
     2573    TString XX("RF");
    25712574    TString fhadronnessName("Had");
    25722575    fhadronnessName += XX;
     
    25742577
    25752578    // maximum values of the hadronness, |ALPHA| and DIST
    2576     Float_t maxhadronness   = 0.4;
     2579    Float_t maxhadronness   = 0.23;
    25772580    Float_t maxalpha        = 20.0;
    25782581    Float_t maxdist         = 10.0;
     
    26382641
    26392642    //====================================================================
     2643
     2644    MHMcCT1CollectionArea collarea;
     2645    collarea.SetEaxis(MHMcCT1CollectionArea::kLinear);
     2646
     2647    MParList  parlist;
     2648    InitBinnings(&parlist);
     2649
     2650  if (CCollArea)
     2651  {
    26402652    gLog << "-----------------------------------------------" << endl;
    26412653    gLog << "Start calculation of effective collection areas" << endl;
    2642     MParList  parlist;
     2654
     2655
    26432656    MTaskList tasklist;
    26442657
     
    26552668    MContinue conthadrons(&cuthadrons);
    26562669
    2657     MHMcCT1CollectionArea collarea;
    2658     collarea.SetEaxis(MHMcCT1CollectionArea::kLinear);
    26592670
    26602671    MFillH filler("MHMcCT1CollectionArea", "MMcEvt");
     
    26652676
    26662677    parlist.AddToList(&tasklist);
    2667     InitBinnings(&parlist);
     2678
    26682679    parlist.AddToList(&collarea);
    26692680
     
    26972708    collarea.CalcEfficiency();
    26982709    collarea.DrawClone();
     2710
     2711
     2712
     2713    //---------------------------------------------
     2714    // Write histograms to a file
     2715    //
     2716
     2717    TFile f(collareaName, "RECREATE");
     2718    //collarea.GetHist()->Write();
     2719    //collarea.GetHAll()->Write();
     2720    //collarea.GetHSel()->Write();
     2721    collarea.Write();
     2722
     2723    f.Close();
     2724
     2725    gLog << "Collection area plots written onto file " << collareaName << endl;
     2726
     2727    gLog << "Calculation of effective collection areas done" << endl;
     2728    gLog << "-----------------------------------------------" << endl;   
     2729    //------------------------------------------------------------------
     2730  }
     2731
     2732  if (!CCollArea)
     2733  {
     2734    gLog << "-----------------------------------------------" << endl;
     2735    gLog << "Read in effective collection areas from file "
     2736         << collareaName << endl;
     2737
     2738    TFile collfile(collareaName);
     2739    collfile.ls();
     2740    collarea.Read("MHMcCT1CollectionArea");
     2741    collarea.DrawClone();
     2742
     2743    gLog << "Effective collection areas were read in from file "
     2744         << collareaName << endl;
     2745    gLog << "-----------------------------------------------" << endl;   
     2746  }
     2747
    26992748
    27002749    // save binnings for call to CT1EEst
     
    27122761        }
    27132762
    2714 
    2715     //---------------------------------------------
    2716     // Write histograms to a file
    2717     //
    2718 
    2719     TFile f(collareaName, "RECREATE");
    2720     collarea.GetHist()->Write();
    2721     collarea.GetHAll()->Write();
    2722     collarea.GetHSel()->Write();
    2723     f.Close();
    2724 
    2725     gLog << "Collection area plots written onto file " << collareaName << endl;
    2726 
    2727     gLog << "Calculation of effective collection areas done" << endl;
    2728     gLog << "-----------------------------------------------" << endl;   
    2729     //------------------------------------------------------------------
    2730 
    2731 
     2763    //-------------------------------------
    27322764    TString fHilName    = "MHillas";
    27332765    TString fHilNameExt = "MHillasExt";
Note: See TracChangeset for help on using the changeset viewer.