Ignore:
Timestamp:
04/08/03 10:13:47 (22 years ago)
Author:
stamerra
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/macros
Files:
2 edited

Legend:

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

    r1912 r1920  
    8080    html.Convert("starplot.C",      "MARS - Plots data from a STAR-file into a mars histogram");
    8181    html.Convert("testenv.C",       "MARS - Example to use TEnv and Mars Eventloops");
     82    html.Convert("triglvl2.C",       "MARS - Example to use MMcTriggerLvl2 class, using filters and creating histograms");
    8283}
  • trunk/MagicSoft/Mars/macros/triglvl2.C

    r1782 r1920  
    22//  Macro to use the class MMcTriggerLvl2, which calculates the
    33//   2nd level trigger (L2T) selection parameters.
    4 //  Filters to select events using these parameter are also created.
     4//  Filters to select events using these parameter and
     5//  histograms with selection variables distributions are also created.
    56//
    67//   Inputs:
     
    2223    // An instance of the class MMcTriggerLvl2 is created and added to the
    2324    //  parameter list
    24     MMcTriggerLvl2 cell;      
     25    MMcTriggerLvl2 cell;     
    2526    parlist.AddToList(&cell);
    2627
     
    2930    cell.SetCompactNN(3);
    3031    //  USER:       --^
     32
    3133    //
    3234    //  A filter to select events using the L2T parameters is created
    3335    //
    34     //    MF lvl2filter("MMcTriggerLvl2.fLutPseudoSize > 6");
    35     MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 16");
     36    MF lvl2filter("MMcTriggerLvl2.fLutPseudoSize > 8");
     37    // MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 16");
     38
    3639    //
    3740    // A second filter is created using the class MFTriggerLvl2
     
    4346    // A selection on the number and energy of the events
    4447    //
    45     MF energyfilter("MMcEvt.fEnergy > 10");
     48    MF energyfilter("MMcEvt.fEnergy > 100");
    4649    MFEventSelector selector;
    4750    selector.SetNumSelectEvts(4000);
     
    6972
    7073    //
     74    //  Task to calculate and plot the effective area
     75    //
     76    MMcCollectionAreaCalc effi;
     77    tasklist.AddToList(&effi);
     78
     79    //
     80    // The filter list selects events for the effective area calculation
     81    //
     82    effi.SetFilter(&flist);
     83 
     84    //
     85    // The filter list is added to the task list
     86    //
     87    tasklist.AddToList(&flist);
     88
     89    //
    7190    // The task to calculate the L2T parameter is added to the task list
    7291    //
    7392    MMcTriggerLvl2Calc fill("MMcTriggerLvl2","MMcTriggerLvl2"); 
    7493    tasklist.AddToList(&fill);
    75 
    76     //
    77     //  Task to calculate and plot the effective area
    78     //
    79     MMcCollectionAreaCalc effi;
    80     tasklist.AddToList(&effi);
    81     //
    82     // The filter list selects events for the effective area calculation
    83     //
    84     effi.SetFilter(&flist);
    85 
    86     //
    87     // The filter list is added to the task list
    88     //
    89     tasklist.AddToList(&flist);
    9094
    9195    //
     
    101105    magic.SetProgressBar(&bar);
    102106
    103     if (!magic.PreProcess())
    104       return;
    105 
    106107    if (!magic.Eventloop())
    107108      return;
    108109
    109110    tasklist.PrintStatistics();
     111 
    110112    //
    111113    // Now the histogram we wanted to get out of the data is
     
    114116    parlist.FindObject("MHMcCollectionArea")->DrawClone();
    115117
    116     magic.PostProcess();
     118    parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps");
     119    parlist.FindObject("MHMcTriggerLvl2")->DrawClone();
    117120
     121    // Returns histogram of the class MHMcTriggerLvl2 
     122    //parlist.FindObject("MHMcTriggerLvl2")->GetHistByName("hfPseudoSize");
     123 
     124   
     125   
    118126}
Note: See TracChangeset for help on using the changeset viewer.