Ignore:
Timestamp:
04/23/03 15:42:14 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1839 r1987  
    1717!
    1818!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     19!   Author(s): Abelardo Moralejo 4/2003 <mailto:moralejo@pd.infn.it>
    1920!
    2021!   Copyright: MAGIC Software Development, 2000-2001
     
    2425
    2526
    26 void CT1collarea(TString filename="MC_ON2.root", TString outname="")
     27void CT1collarea(TString filename="MC3.root", TString outname="")
    2728{
    2829    //
     
    4041    //
    4142    MReadMarsFile reader("Events", filename);
    42     reader.EnableBranch("fHadronness");
     43    reader.DisableAutoScheme();
    4344
    44     MMcCT1CollectionAreaCalc effi;
    45     MHMcCT1CollectionArea* collarea = new MHMcCT1CollectionArea("MHMcCT1CollectionArea","",30,2.,5.);
     45    MHMcCT1CollectionArea* collarea = new MHMcCT1CollectionArea();
     46
     47    MBinning binsx("MBinningE");
     48    binsx.SetEdges(30,2.,5.);
     49
     50    MBinning binsy("MBinningTheta");
     51    const Double_t yedge[7] = {12.5, 17.5, 23.5, 29.5, 35.5, 42., 48.};
     52    const TArrayD yed(7,yedge);
     53    binsy.SetEdges(yed);
     54
    4655    parlist.AddToList(collarea);
     56    parlist.AddToList(&binsx);
     57    parlist.AddToList(&binsy);
    4758
    4859    tasklist.AddToList(&reader);   
    4960
    50     MF filterhadrons("MHadronness.fHadronness<0.25");
     61    MF filterhadrons("HadNN.fHadronness<0.25");
    5162    tasklist.AddToList(&filterhadrons);
    52     effi.SetFilter(&filterhadrons);
    5363
    54     tasklist.AddToList(&effi);
     64    MFillH filler("MHMcCT1CollectionArea","MMcEvt");
     65    filler.SetFilter(&filterhadrons);
     66    tasklist.AddToList(&filler);
    5567
    5668    //
     
    7082    tasklist.PrintStatistics();
    7183
     84    collarea->CalcEfficiency();
     85
    7286    //
    7387    // Now the histogram we wanted to get out of the data is
    7488    // filled and can be displayed
    7589    //
    76     parlist.FindObject("MHMcCT1CollectionArea")->DrawClone();
     90    collarea->DrawClone();
    7791
    7892    //
     
    8397        return;
    8498
    85     TFile f("area.root","recreate");
     99    TFile f(outname,"recreate");
    86100    collarea->GetHist()->Write();
    87101    collarea->GetHAll()->Write();
Note: See TracChangeset for help on using the changeset viewer.