Changeset 1991


Ignore:
Timestamp:
04/23/03 16:44:15 (21 years ago)
Author:
stamerra
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

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

    r1920 r1991  
    1010//      - fValue        comparision value for the filter
    1111//
     12//  23/04/2003 Added example of MFEnergySlope filter
     13//
     14// 
    1215void triglvl2(char *filename = "Gamma.root")
    1316  //    USER:   Data File Name    ---^
     
    2023
    2124    parlist.AddToList(&tasklist);
     25
     26    MGeomCamMagic geocam;
     27    parlist.AddToList(&geocam);
     28
     29    //    MHillas hillas;
     30    // parlist.AddToList(&hillas);
    2231
    2332    // An instance of the class MMcTriggerLvl2 is created and added to the
     
    3544    //
    3645    MF lvl2filter("MMcTriggerLvl2.fLutPseudoSize > 8");
    37     // MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 16");
    3846
    3947    //
    4048    // A second filter is created using the class MFTriggerLvl2
    4149    //
    42     MFTriggerLvl2 fTrig1("MMcTriggerLvl2", '>', 8);
     50    MFTriggerLvl2 fTrig("MMcTriggerLvl2", '>', 8);
    4351    //      USER:       fValue to be compared --^
    4452
     
    4856    MF energyfilter("MMcEvt.fEnergy > 100");
    4957    MFEventSelector selector;
    50     selector.SetNumSelectEvts(4000);
     58    //selector.SetNumSelectEvts(4000);
     59
     60
     61    // Filter to select events according to a give slope
     62    MFEnergySlope eslope;
     63
     64    eslope.SetMcMinEnergy(50.);
     65    eslope.SetMcMaxEnergy(400.);
     66    eslope.SetNewSlope(-3.91);
    5167
    5268    // A filter list is created; the filters created can be added to the list
    5369    //
    5470    MFilterList flist;
    55     //    flist.AddToList(&energyfilter);
    56     //    flist.AddToList(&lvl2filter);
    57     //    flist.AddToList(&selector);
    58     flist.AddToList(&fTrig1);
     71    //   flist.AddToList(&energyfilter);
     72    //   flist.AddToList(&lvl2filter);
     73    //   flist.AddToList(&selector);
     74    //   flist.AddToList(&eslope);
     75       flist.AddToList(&fTrig);
     76
    5977
    6078    //
     
    7290
    7391    //
     92    // The filter list is added to the task list
     93    //
     94    tasklist.AddToList(&flist);
     95
     96    //
    7497    //  Task to calculate and plot the effective area
    7598    //
     
    83106 
    84107    //
    85     // The filter list is added to the task list
    86     //
    87     tasklist.AddToList(&flist);
    88 
    89     //
    90108    // The task to calculate the L2T parameter is added to the task list
    91109    //
    92110    MMcTriggerLvl2Calc fill("MMcTriggerLvl2","MMcTriggerLvl2"); 
    93111    tasklist.AddToList(&fill);
     112
     113    //
     114    // Filling of histos for MHMcTriggerLvl2
     115    //
     116    MFillH hfill1("MHMcTriggerLvl2","MMcTriggerLvl2");
     117    tasklist.AddToList(&hfill1);
    94118
    95119    //
     
    117141
    118142    parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps");
    119     parlist.FindObject("MHMcTriggerLvl2")->DrawClone();
     143    //     parlist.FindObject("MHMcTriggerLvl2")->DrawClone();
    120144
    121145    // Returns histogram of the class MHMcTriggerLvl2 
    122     //parlist.FindObject("MHMcTriggerLvl2")->GetHistByName("hfPseudoSize");
    123  
    124    
     146    //   parlist.FindObject("MHMcTriggerLvl2")->GetHistByName("hfPseudoSize"));
    125147   
    126148}
     149
     150
     151
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc

    r1920 r1991  
    4747#include "MMcRunHeader.hxx"
    4848
     49#include "MGeomCam.h"
     50
    4951
    5052ClassImp(MMcTriggerLvl2Calc);
     
    8385    {
    8486        *fLog << err << dbginf << "MMcTrig not found... exit." << endl;
     87        return kFALSE;
     88    }
     89
     90    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
     91    if (!fCam)
     92    {
     93        *fLog << dbginf << "MGeomCam not found (no geometry information available)... aborting." << endl;
    8594        return kFALSE;
    8695    }
     
    125134
    126135  fMMcTriggerLvl2->SetLv1(fMcTrig);
    127  
     136
     137  fMMcTriggerLvl2->CalcCompactPixels(fCam);
     138
    128139  fMMcTriggerLvl2->Calc();
    129 
    130   fMHMcTriggerLvl2->Fill(fMMcTriggerLvl2);
    131140
    132141  //fMMcTriggerLvl2->DrawLv1();
     
    149158}
    150159
     160
     161
     162
Note: See TracChangeset for help on using the changeset viewer.