Changeset 1782


Ignore:
Timestamp:
02/21/03 15:55:35 (22 years ago)
Author:
stamerra
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1781 r1782  
    11
    22                                                         -*-*- END -*-*-
     3 2003/02/21: Antonio Stamerra
     4
     5    * manalysis/MMcTriggerLvl2.[cc|h]
     6      - new data member fCompactNN needed to define a compact pixels
     7      - new inline functions SetCompactNN and GetCompactNN
     8      - Method Calc(int neighpix) -> Calc(). The value of neighpix
     9        is read from fCompactNN
     10
     11    * manalysis/MMcTriggerLvl2Calc.[cc|h]
     12      - Check on fCompactNN added in the PreProcess
     13
     14    * macros/triglvl2.C
     15      - Set of fCompactNN added
     16
    317
    418 2003/02/21: Wolfgang Wittek
  • trunk/MagicSoft/Mars/macros/triglvl2.C

    r1777 r1782  
    44//  Filters to select events using these parameter are also created.
    55//
     6//   Inputs:
     7//      - filename      name of data file
     8//      - CompactNN     number of NN to define a compact pixel
     9//      - fValue        comparision value for the filter
     10//
    611void triglvl2(char *filename = "Gamma.root")
     12  //    USER:   Data File Name    ---^
    713{
    814    //
     
    1925    parlist.AddToList(&cell);
    2026
     27    // Set the number of Next Neighbourhoods that define a compact pixel
     28    //
     29    cell.SetCompactNN(3);
     30    //  USER:       --^
    2131    //
    2232    //  A filter to select events using the L2T parameters is created
     
    2434    //    MF lvl2filter("MMcTriggerLvl2.fLutPseudoSize > 6");
    2535    MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 16");
     36    //
    2637    // A second filter is created using the class MFTriggerLvl2
    27     MFTriggerLvl2 fTrig1("MMcTriggerLvl2", '>', 6);
    28     //       this is the value to be compared --^
     38    //
     39    MFTriggerLvl2 fTrig1("MMcTriggerLvl2", '>', 8);
     40    //      USER:       fValue to be compared --^
    2941
    3042    //
     
    3850    //
    3951    MFilterList flist;
    40     flist.AddToList(&energyfilter);
    41     flist.AddToList(&lvl2filter);
    42     flist.AddToList(&selector);
     52    //    flist.AddToList(&energyfilter);
     53    //    flist.AddToList(&lvl2filter);
     54    //    flist.AddToList(&selector);
    4355    flist.AddToList(&fTrig1);
    4456
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc

    r1776 r1782  
    2929//   Storage container for the 2nd level trigger selection parameters      //
    3030//    as part of the 2nd level trigger simulation                          //
     31//                                                                         //
     32// input parameter:                                                        //
     33//    fCompactNN   number of next neighboors that define a compact pixel   //
    3134//                                                                         //
    3235//                                                                         //
     
    236239//
    237240//
    238 void MMcTriggerLvl2::Calc(int neighpix)
    239 {
     241void MMcTriggerLvl2::Calc()
     242{
     243  // Reads the number of NN that define a compact pixel
     244  int neighpix=(*this).fCompactNN;
     245
    240246  // Find the Lut and cell with the higher LutPseudoSize.
    241247  int lutcell = CalcBiggerLutPseudoSize(neighpix);
     
    402408  int lut=-1;
    403409 
    404   // only cases neighpix=2,3 (2NN,3NN) are considered
    405   if (neighpix >3 || neighpix < 2) return(-1);
    406 
    407410  for(int j=0; j<19; j++)
    408411    {
     
    430433//   (=number of compact pixels in one LUT)
    431434//  neighpix is the number of Next-Neighbors which defines the compact pixel
    432 //    topology.
     435//    topology.  
    433436//   Up to now only  2NN or 3NN are considered
    434 //      if changed: change also GetBiggerLutPseudoSize
     437//    <!if changed: change check made by Preprocess in MMcTriggerLvl2Calc>   
    435438//
    436439//   Returns:
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.h

    r1776 r1782  
    2424  Int_t fSizeBiggerCell; // Number of fired pixel in bigger cell
    2525
     26  Int_t fCompactNN;  //Number of NN pixels that define a compact pixel
     27
    2628  MMcTrig *fMcTrig;
    2729  MGeomCamMagic *fGeomcam; 
     
    4042  void DrawLv1();
    4143
    42   virtual void Calc(int neighpix=2);
     44  virtual void Calc();
    4345
    4446  virtual void Print(Option_t *opt="") const;
     
    4749  void SetPixelFired(Int_t pixel, Int_t fired=1);
    4850 
     51  void SetCompactNN(Int_t neighpix)     {fCompactNN=neighpix;}
     52
    4953  Int_t GetPseudoSize()     {return fPseudoSize;}
    5054  Int_t GetLutPseudoSize()  {return fLutPseudoSize;}
    5155  Int_t GetSizeBiggerCell() {return fSizeBiggerCell;}
     56  Int_t GetCompactNN()      {return fCompactNN;}
    5257
    5358  Int_t GetCellNumberFired(int cell);
    54   Int_t GetLutCompactPixel(int cell, int lut, int neighpix=2);
     59  Int_t GetLutCompactPixel(int cell, int lut, int neighpix);
    5560
    5661  ClassDef(MMcTriggerLvl2,0) // Container for 2nd Level Trigger selection parameters
     
    6065
    6166
     67
     68
     69
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc

    r1776 r1782  
    6666
    6767
    68   //  h1 = new TH1F("h1","h1",30,0,30);
     68  // h1 = new TH1F("h1","h1",30,0,30);
    6969}
    7070
     
    100100    }
    101101
     102    // Check if the variable fCompactNN has been correctly set;
     103    //  accepted values for fCompactNN are (up to now) 2 and 3.
     104    if (fMMcTriggerLvl2->GetCompactNN()<2 || fMMcTriggerLvl2->GetCompactNN()>3)
     105      {
     106        *fLog << err << dbginf << "fCompactNN is not correctly set ("<<fMMcTriggerLvl2->GetCompactNN() <<") ... exit" <<endl;
     107        return kFALSE; 
     108      }
     109    else
     110      *fLog << "Compact pixel is set with at least "<<fMMcTriggerLvl2->GetCompactNN() << " NN" <<endl;
     111
     112
    102113    return kTRUE;
    103114}
     
    120131  //fMMcTriggerLvl2->Print();
    121132
    122   //    h1->Fill( fMMcTriggerLvl2->GetCellNumberFired(fMMcTriggerLvl2->GetBiggerFiredCell()) );
     133  //      h1->Fill(fMMcTriggerLvl2->GetLutPseudoSize() );
    123134
    124135
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.h

    r1776 r1782  
    3030    Bool_t PostProcess();
    3131
     32    //    TH1F *h1;
     33
    3234    ClassDef(MMcTriggerLvl2Calc, 0) // Task to calculate the MMcTriggerLvl2 Parameters
    3335};
Note: See TracChangeset for help on using the changeset viewer.