Changeset 1920


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1918 r1920  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/04/08: Nicola Galante and Antonio Stamerra
     4
     5   * mhist/MHMcTriggerLvl2.[h,cc]
     6      - New class added (histograms for the MMcTriggerLvl2 class)
     7
     8   * mhist/Makefile
     9     - Added MHMcTrigggerLvl2 in SRCFILES
     10
     11   * manalysis/Makefile
     12     - Reintroduced MMcTriggerLvl2 and MMcTriggerLvl2Calc
     13       (they were removed!!)
     14
     15   * manalysis/MMcTriggerLvl2.h
     16     - 'const' added in inline functions Get****
     17
     18   * manalysis/MMcTriggerLvl2Calc.cc
     19     - added call to Fill method of MHMcTriggerLvl2
    220
    321
  • 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}
  • trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h

    r1917 r1920  
    6262#pragma link C++ class MParameterD+;
    6363
     64#pragma link C++ class MMcTriggerLvl2+;
     65#pragma link C++ class MMcTriggerLvl2Calc+;
     66
    6467#pragma link C++ class MCT1SupercutsCalc+;
    6568
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc

    r1782 r1920  
    254254  fSizeBiggerCell = GetCellNumberFired(CalcBiggerFiredCell());
    255255 
    256 
    257256}
    258257
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.h

    r1782 r1920  
    5151  void SetCompactNN(Int_t neighpix)     {fCompactNN=neighpix;}
    5252
    53   Int_t GetPseudoSize()     {return fPseudoSize;}
    54   Int_t GetLutPseudoSize()  {return fLutPseudoSize;}
    55   Int_t GetSizeBiggerCell() {return fSizeBiggerCell;}
    56   Int_t GetCompactNN()      {return fCompactNN;}
     53  Int_t GetPseudoSize()     const {return fPseudoSize;}
     54  Int_t GetLutPseudoSize()  const {return fLutPseudoSize;}
     55  Int_t GetSizeBiggerCell() const {return fSizeBiggerCell;}
     56  Int_t GetCompactNN()      const {return fCompactNN;}
    5757
    5858  Int_t GetCellNumberFired(int cell);
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc

    r1782 r1920  
    3737#include "MMcTriggerLvl2Calc.h"
    3838#include "MMcTriggerLvl2.h"
    39 
     39#include "MHMcTriggerLvl2.h"
    4040
    4141#include "MParList.h"
     
    4747#include "MMcRunHeader.hxx"
    4848
    49 #include <TH1.h>
    5049
    5150ClassImp(MMcTriggerLvl2Calc);
     
    6160  fTitle = title ? title : "Task to Fill the MMcTriggerLvl2 object";
    6261 
    63   //  AddToBranchList("MMcEvt.fEnergy");
    64   //AddToBranchList(Form("%s.fNumFirstLevel", "MMcTrig"));
    65   //AddToBranchList(Form("%s.fPixelsFirst[73][4]", "MMcTrig"));
    66 
    67 
    68   // h1 = new TH1F("h1","h1",30,0,30);
    6962}
    7063
     
    10093    }
    10194
     95    fMHMcTriggerLvl2 = (MHMcTriggerLvl2*)pList->FindCreateObj("MHMcTriggerLvl2");
     96    if (!fMHMcTriggerLvl2)
     97    {
     98        *fLog << err << dbginf << "MHMcTriggerLvl2 not found... exit." << endl;
     99        return kFALSE;
     100    }
     101
    102102    // Check if the variable fCompactNN has been correctly set;
    103103    //  accepted values for fCompactNN are (up to now) 2 and 3.
     
    125125
    126126  fMMcTriggerLvl2->SetLv1(fMcTrig);
     127 
    127128  fMMcTriggerLvl2->Calc();
     129
     130  fMHMcTriggerLvl2->Fill(fMMcTriggerLvl2);
    128131
    129132  //fMMcTriggerLvl2->DrawLv1();
    130133  //fMMcTriggerLvl2->DrawCell(fMMcTriggerLvl2->GetBiggerFiredCell() );
    131134  //fMMcTriggerLvl2->Print();
    132 
    133   //      h1->Fill(fMMcTriggerLvl2->GetLutPseudoSize() );
    134 
    135135
    136136  return kTRUE;
     
    146146{
    147147 
    148   //   *fLog << inf << "Filling..." << endl;
    149  
    150   //    h1->Draw();
    151      
    152148    return kTRUE;
    153149}
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.h

    r1782 r1920  
    1212
    1313class MMcTriggerLvl2;
     14class MHMcTriggerLvl2;
    1415
    1516class TH1F;
     
    2223
    2324  MMcTriggerLvl2 *fMMcTriggerLvl2;
     25  MHMcTriggerLvl2 *fMHMcTriggerLvl2;
    2426   
    2527 public:
  • trunk/MagicSoft/Mars/manalysis/Makefile

    r1917 r1920  
    6969           MNewImageParCalc.cc \
    7070           MParameters.cc \
     71           MMcTriggerLvl2.cc \
     72           MMcTriggerLvl2Calc.cc \
    7173           MCT1SupercutsCalc.cc
    7274
  • trunk/MagicSoft/Mars/mhist/HistLinkDef.h

    r1877 r1920  
    5757#pragma link C++ class MHMcCT1CollectionArea+;
    5858
     59#pragma link C++ class MHMcTriggerLvl2+;
     60
    5961#pragma link C++ class MHNewImagePar+;
    6062
  • trunk/MagicSoft/Mars/mhist/Makefile

    r1875 r1920  
    7171           MHNewImagePar.cc \
    7272           MHSigmaTheta.cc \
    73            MHMcCT1CollectionArea.cc
     73           MHMcCT1CollectionArea.cc \
     74           MHMcTriggerLvl2.cc
    7475
    7576SRCS    = $(SRCFILES)
Note: See TracChangeset for help on using the changeset viewer.