Changeset 851 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 06/13/01 15:29:47 (23 years ago)
- 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" )1 void getCollArea(char *filename = "data/gamma_15_on.root" ) 2 2 { 3 3 // FIXME: Harald, you should tell the people what the result of … … 21 21 parlist.AddToList(&tasklist); 22 22 23 M CollArea *collArea = new MCollArea();23 MHMcCollectionArea *collArea = new MHMcCollectionArea(); 24 24 parlist.AddToList(collArea); 25 25 -
trunk/MagicSoft/Mars/macros/getThreshold.C
r839 r851 1 1 void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root") 2 2 { 3 // This macro fill the container MMcEnerThre using the task 4 // MMcEnerThreCalc and shows the results. 3 5 4 // This macro fill the container MMcEnerThre using the task5 // MMcEnerThreCalc and shows the results.6 MParList parlist; 7 MTaskList tasklist; 6 8 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. 9 18 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); 19 21 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); 27 24 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 30 31 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); 37 33 34 MMcThresholdCalc tcalc(numtrigcond); 38 35 36 tasklist.AddToList(&read); 37 tasklist.AddToList(&tcalc); 39 38 40 MReadTree read("Events",filename); 39 MEvtLoop evtloop; 40 evtloop.SetParList(&parlist); 41 41 42 MMcEnerThreCalc enerthrecalc(NumTrigCond); 43 44 tasklist.AddToList(&read); 45 tasklist.AddToList(&enerthrecalc); 42 // Begin the loop 46 43 47 MEvtLoop evtloop; 48 evtloop.SetParList(&parlist); 44 evtloop.Eventloop(); 49 45 50 // Begin the loop46 // Now you can display the results 51 47 52 evtloop.Eventloop();48 TCanvas *c; 53 49 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(); 55 54 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(); 57 59 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(); 62 64 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(); 67 69 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(); 83 74 } 84 85 86 87
Note:
See TracChangeset
for help on using the changeset viewer.