Changeset 1777 for trunk/MagicSoft/Mars
- Timestamp:
- 02/20/03 17:00:31 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/triglvl2.C
r1741 r1777 1 2 Bool_t HandleInput() 3 { 4 TTimer timer("gSystem->ProcessEvents();", 50, kFALSE); 5 while (1) 6 { 7 // 8 // While reading the input process gui events asynchronously 9 // 10 timer.TurnOn(); 11 TString input = Getline("Type 'q' to exit, <return> to go on: "); 12 timer.TurnOff(); 13 14 if (input=="q\n") 15 return kFALSE; 16 17 if (input=="\n") 18 return kTRUE; 19 }; 20 21 return kFALSE; 22 } 23 24 void triglvl2(char *filename = "../../Mars-0.8/gamma_new.root") 1 // triglvl2.C 2 // Macro to use the class MMcTriggerLvl2, which calculates the 3 // 2nd level trigger (L2T) selection parameters. 4 // Filters to select events using these parameter are also created. 5 // 6 void triglvl2(char *filename = "Gamma.root") 25 7 { 26 8 // … … 30 12 MTaskList tasklist; 31 13 32 MTrigLvl2 cell;33 34 parlist.AddToList(&cell);35 14 parlist.AddToList(&tasklist); 36 15 16 // An instance of the class MMcTriggerLvl2 is created and added to the 17 // parameter list 18 MMcTriggerLvl2 cell; 19 parlist.AddToList(&cell); 20 37 21 // 38 // Setup out tasks: 22 // A filter to select events using the L2T parameters is created 23 // 24 // MF lvl2filter("MMcTriggerLvl2.fLutPseudoSize > 6"); 25 MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 16"); 26 // A second filter is created using the class MFTriggerLvl2 27 MFTriggerLvl2 fTrig1("MMcTriggerLvl2", '>', 6); 28 // this is the value to be compared --^ 29 30 // 31 // A selection on the number and energy of the events 32 // 33 MF energyfilter("MMcEvt.fEnergy > 10"); 34 MFEventSelector selector; 35 selector.SetNumSelectEvts(4000); 36 37 // A filter list is created; the filters created can be added to the list 38 // 39 MFilterList flist; 40 flist.AddToList(&energyfilter); 41 flist.AddToList(&lvl2filter); 42 flist.AddToList(&selector); 43 flist.AddToList(&fTrig1); 44 45 // 46 // Setup our tasks: 39 47 // - First we have to read the events 40 48 // - Then we can fill the efficiency histograms 41 49 // 42 50 MReadMarsFile reader("Events", filename); 43 reader.EnableBranch("fEnergy"); 44 reader.EnableBranch("fImpact"); reader.EnableBranch("fTimeFirst[4]"); 45 reader.EnableBranch("fPixelsFirst[73][4]"); 51 reader.DisableAutoScheme(); 52 // reader.EnableBranch("fEnergy"); 53 // reader.EnableBranch("fImpact"); reader.EnableBranch("fTimeFirst[4]"); 54 // reader.EnableBranch("fPixelsFirst[73][4]"); 46 55 47 48 49 MTrigLvl2FillTask fill("MTrigLvl2FillTask","MTrigLvl2FillTask");50 51 56 tasklist.AddToList(&reader); 52 tasklist.AddToList(&fill);53 57 58 // 59 // The task to calculate the L2T parameter is added to the task list 60 // 61 MMcTriggerLvl2Calc fill("MMcTriggerLvl2","MMcTriggerLvl2"); 62 tasklist.AddToList(&fill); 63 64 // 65 // Task to calculate and plot the effective area 66 // 67 MMcCollectionAreaCalc effi; 68 tasklist.AddToList(&effi); 69 // 70 // The filter list selects events for the effective area calculation 71 // 72 effi.SetFilter(&flist); 73 74 // 75 // The filter list is added to the task list 76 // 77 tasklist.AddToList(&flist); 54 78 55 79 // … … 65 89 magic.SetProgressBar(&bar); 66 90 67 68 // if (!magic.Eventloop())69 // return;70 71 72 91 if (!magic.PreProcess()) 73 92 return; 74 93 75 76 77 while (tasklist.Process()) 78 { 79 cout << "Event #" << reader.GetEventNum() ":" << endl; 80 81 cell.DrawLv1(); 82 83 //if (!HandleInput()) 84 // break; 85 } 86 87 88 89 magic.PostProcess(); 94 if (!magic.Eventloop()) 95 return; 90 96 91 97 tasklist.PrintStatistics(); 92 93 98 // 94 99 // Now the histogram we wanted to get out of the data is 95 100 // filled and can be displayd 96 101 // 97 // parlist.FindObject("MHMcCollectionArea")->DrawClone(); 102 parlist.FindObject("MHMcCollectionArea")->DrawClone(); 103 104 magic.PostProcess(); 105 98 106 } -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r1769 r1777 52 52 #pragma link C++ class MSelFinal+; 53 53 54 #pragma link C++ class M TrigLvl2+;55 #pragma link C++ class M TrigLvl2FillTask+;54 #pragma link C++ class MMcTriggerLvl2+; 55 #pragma link C++ class MMcTriggerLvl2Calc+; 56 56 57 57 #endif -
trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
r1661 r1777 11 11 #pragma link C++ class MFEventSelector+; 12 12 #pragma link C++ class MFTriggerLvl1+; 13 #pragma link C++ class MFTriggerLvl2+; 13 14 #pragma link C++ class MFParticleId+; 14 15 #pragma link C++ class MFDataChain+; -
trunk/MagicSoft/Mars/mfilter/Makefile
r1661 r1777 32 32 33 33 SRCFILES = MFTriggerLvl1.cc \ 34 MFTriggerLvl2.cc \ 34 35 MF.cc \ 35 36 MFilterList.cc \
Note:
See TracChangeset
for help on using the changeset viewer.