Changeset 1920 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 04/08/03 10:13:47 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/dohtml.C
r1912 r1920 80 80 html.Convert("starplot.C", "MARS - Plots data from a STAR-file into a mars histogram"); 81 81 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"); 82 83 } -
trunk/MagicSoft/Mars/macros/triglvl2.C
r1782 r1920 2 2 // Macro to use the class MMcTriggerLvl2, which calculates the 3 3 // 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. 5 6 // 6 7 // Inputs: … … 22 23 // An instance of the class MMcTriggerLvl2 is created and added to the 23 24 // parameter list 24 MMcTriggerLvl2 cell; 25 MMcTriggerLvl2 cell; 25 26 parlist.AddToList(&cell); 26 27 … … 29 30 cell.SetCompactNN(3); 30 31 // USER: --^ 32 31 33 // 32 34 // A filter to select events using the L2T parameters is created 33 35 // 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 36 39 // 37 40 // A second filter is created using the class MFTriggerLvl2 … … 43 46 // A selection on the number and energy of the events 44 47 // 45 MF energyfilter("MMcEvt.fEnergy > 10 ");48 MF energyfilter("MMcEvt.fEnergy > 100"); 46 49 MFEventSelector selector; 47 50 selector.SetNumSelectEvts(4000); … … 69 72 70 73 // 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 // 71 90 // The task to calculate the L2T parameter is added to the task list 72 91 // 73 92 MMcTriggerLvl2Calc fill("MMcTriggerLvl2","MMcTriggerLvl2"); 74 93 tasklist.AddToList(&fill); 75 76 //77 // Task to calculate and plot the effective area78 //79 MMcCollectionAreaCalc effi;80 tasklist.AddToList(&effi);81 //82 // The filter list selects events for the effective area calculation83 //84 effi.SetFilter(&flist);85 86 //87 // The filter list is added to the task list88 //89 tasklist.AddToList(&flist);90 94 91 95 // … … 101 105 magic.SetProgressBar(&bar); 102 106 103 if (!magic.PreProcess())104 return;105 106 107 if (!magic.Eventloop()) 107 108 return; 108 109 109 110 tasklist.PrintStatistics(); 111 110 112 // 111 113 // Now the histogram we wanted to get out of the data is … … 114 116 parlist.FindObject("MHMcCollectionArea")->DrawClone(); 115 117 116 magic.PostProcess(); 118 parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps"); 119 parlist.FindObject("MHMcTriggerLvl2")->DrawClone(); 117 120 121 // Returns histogram of the class MHMcTriggerLvl2 122 //parlist.FindObject("MHMcTriggerLvl2")->GetHistByName("hfPseudoSize"); 123 124 125 118 126 }
Note:
See TracChangeset
for help on using the changeset viewer.