Ignore:
Timestamp:
06/13/01 15:29:47 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/macros
Files:
2 edited

Legend:

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

    r753 r851  
    1 void getCollArea(char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" )
     1void getCollArea(char *filename = "data/gamma_15_on.root" )
    22{
    33    // FIXME: Harald, you should tell the people what the result of
     
    2121    parlist.AddToList(&tasklist);
    2222
    23     MCollArea *collArea = new MCollArea();
     23    MHMcCollectionArea *collArea = new MHMcCollectionArea();
    2424    parlist.AddToList(collArea);
    2525
  • trunk/MagicSoft/Mars/macros/getThreshold.C

    r839 r851  
    11void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root")
    22{
     3    // This macro fill the container MMcEnerThre using the task
     4    // MMcEnerThreCalc and shows the results.
    35
    4   // This macro fill the container MMcEnerThre using the task
    5   // MMcEnerThreCalc and shows the results.
     6    MParList parlist;
     7    MTaskList tasklist;
    68
    7   MParList parlist;
    8   MTaskList tasklist;
     9    // Setup the parameter list
     10    // - You need create the container MMcEnerThre.
     11    //    + You need to put the number of trigger conditions when
     12    //      you declarete the MMcEnerThre
     13    //    + If you don't put any dimension to MMcEnerThre it works
     14    //      taking only the trigger information from MMcTrig
     15    // - You can control the number of bins in the energy distribution
     16    //   histogram used to compute the energy threshold using
     17    //   the SetBins() function.
    918
    10   // Setup the parameter list
    11   // - You need create the container MMcEnerThre.
    12   //    · You need to put the number of trigger conditions when
    13   //      you declarete the MMcEnerThre
    14   //    · If you don't put any dimension to MMcEnerThre it works
    15   //      taking only the trigger information from MMcTrig
    16   // - You can control the number of bins in the energy distribution
    17   //   histogram used to compute the energy threshold using
    18   //   the SetBins() function.
     19    Int_t numtrigcond = 5;
     20    MHMcEnergies *hists = new MHMcEnergies(numtrigcond);
    1921
    20   Int_t NumTrigCond = 5;
    21   MMcEnerThre enerthre(NumTrigCond);
    22   enerthre[0].SetBins(60);
    23   enerthre[1].SetBins(60);
    24   enerthre[2].SetBins(60);
    25   enerthre[3].SetBins(60);
    26   enerthre[4].SetBins(60);
     22    parlist.AddToList(&tasklist);
     23    hists->AddEntriesToList(&parlist);
    2724
    28   parlist.AddToList(&tasklist);
    29   parlist.AddToList(&enerthre);
     25    // Setup the task list
     26    // - You need the read and the MMcEnerThreCalc tasks
     27    //    + You need to put the number of trigger conditions when
     28    //      you declarete the MMcEnerThreCalc
     29    //    + If you don't put any dimension to MMcEnerThreCalc it works
     30    //      like one dimension MMcEnerThreCalc
    3031
    31   // Setup the task list
    32   // - You need the read and the MMcEnerThreCalc tasks
    33   //    · You need to put the number of trigger conditions when
    34   //      you declarete the MMcEnerThreCalc
    35   //    · If you don't put any dimension to MMcEnerThreCalc it works
    36   //      like one dimension MMcEnerThreCalc
     32    MReadTree read("Events", filename);
    3733
     34    MMcThresholdCalc tcalc(numtrigcond);
    3835
     36    tasklist.AddToList(&read);
     37    tasklist.AddToList(&tcalc);
    3938
    40   MReadTree read("Events",filename);
     39    MEvtLoop evtloop;
     40    evtloop.SetParList(&parlist);
    4141
    42   MMcEnerThreCalc enerthrecalc(NumTrigCond);
    43  
    44   tasklist.AddToList(&read);
    45   tasklist.AddToList(&enerthrecalc);
     42    // Begin the loop
    4643
    47   MEvtLoop evtloop;
    48   evtloop.SetParList(&parlist);
     44    evtloop.Eventloop();
    4945
    50   // Begin the loop
     46    // Now you can display the results
    5147
    52   evtloop.Eventloop();
     48    TCanvas *c;
    5349
    54   // Now you can display the results
     50    c=new TCanvas("c0","Energy distribution for triggered events", 50, 50, 850, 550);
     51    hists[0].Print();
     52    hists[0].Draw();
     53    c->Update();
    5554
    56   gROOT->Reset();
     55    c= new TCanvas("c1","Energy distribution for triggered events", 50, 50, 850, 550);
     56    hists[1].Print();
     57    hists[1].Draw();
     58    c->Update();
    5759
    58   c0= new TCanvas("c0","Energy distribution for triggered events",50,50,850,550);
    59   enerthre[0].Print();
    60   enerthre[0].Draw();
    61   c0->Update();
     60    c= new TCanvas("c2","Energy distribution for triggered events", 50, 50, 850, 550);
     61    hists[2].Print();
     62    hists[2].Draw();
     63    c->Update();
    6264
    63   c1= new TCanvas("c1","Energy distribution for triggered events",50,50,850,550);
    64   enerthre[1].Print();
    65   enerthre[1].Draw();
    66   c1->Update();
     65    c= new TCanvas("c3","Energy distribution for triggered events", 50, 50, 850, 550);
     66    hists[3].Print();
     67    hists[3].Draw();
     68    c->Update();
    6769
    68   c2= new TCanvas("c2","Energy distribution for triggered events",50,50,850,550);
    69   enerthre[2].Print();
    70   enerthre[2].Draw();
    71   c2->Update();
    72 
    73   c3= new TCanvas("c3","Energy distribution for triggered events",50,50,850,550);
    74   enerthre[3].Print();
    75   enerthre[3].Draw();
    76   c3->Update();
    77 
    78   c4= new TCanvas("c4","Energy distribution for triggered events",50,50,850,550);
    79   enerthre[4].Print();
    80   enerthre[4].Draw();
    81   c4->Update();
    82 
     70    c= new TCanvas("c4","Energy distribution for triggered events", 50, 50, 850, 550);
     71    hists[4].Print();
     72    hists[4].Draw();
     73    c->Update();
    8374}
    84 
    85 
    86 
    87 
Note: See TracChangeset for help on using the changeset viewer.