Changeset 1987 for trunk/MagicSoft/Mars/macros/CT1collarea.C
- Timestamp:
- 04/23/03 15:42:14 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/CT1collarea.C
r1839 r1987 17 17 ! 18 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de) 19 ! Author(s): Abelardo Moralejo 4/2003 <mailto:moralejo@pd.infn.it> 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2001 … … 24 25 25 26 26 void CT1collarea(TString filename="MC _ON2.root", TString outname="")27 void CT1collarea(TString filename="MC3.root", TString outname="") 27 28 { 28 29 // … … 40 41 // 41 42 MReadMarsFile reader("Events", filename); 42 reader. EnableBranch("fHadronness");43 reader.DisableAutoScheme(); 43 44 44 MMcCT1CollectionAreaCalc effi; 45 MHMcCT1CollectionArea* collarea = new MHMcCT1CollectionArea("MHMcCT1CollectionArea","",30,2.,5.); 45 MHMcCT1CollectionArea* collarea = new MHMcCT1CollectionArea(); 46 47 MBinning binsx("MBinningE"); 48 binsx.SetEdges(30,2.,5.); 49 50 MBinning binsy("MBinningTheta"); 51 const Double_t yedge[7] = {12.5, 17.5, 23.5, 29.5, 35.5, 42., 48.}; 52 const TArrayD yed(7,yedge); 53 binsy.SetEdges(yed); 54 46 55 parlist.AddToList(collarea); 56 parlist.AddToList(&binsx); 57 parlist.AddToList(&binsy); 47 58 48 59 tasklist.AddToList(&reader); 49 60 50 MF filterhadrons(" MHadronness.fHadronness<0.25");61 MF filterhadrons("HadNN.fHadronness<0.25"); 51 62 tasklist.AddToList(&filterhadrons); 52 effi.SetFilter(&filterhadrons);53 63 54 tasklist.AddToList(&effi); 64 MFillH filler("MHMcCT1CollectionArea","MMcEvt"); 65 filler.SetFilter(&filterhadrons); 66 tasklist.AddToList(&filler); 55 67 56 68 // … … 70 82 tasklist.PrintStatistics(); 71 83 84 collarea->CalcEfficiency(); 85 72 86 // 73 87 // Now the histogram we wanted to get out of the data is 74 88 // filled and can be displayed 75 89 // 76 parlist.FindObject("MHMcCT1CollectionArea")->DrawClone();90 collarea->DrawClone(); 77 91 78 92 // … … 83 97 return; 84 98 85 TFile f( "area.root","recreate");99 TFile f(outname,"recreate"); 86 100 collarea->GetHist()->Write(); 87 101 collarea->GetHAll()->Write();
Note:
See TracChangeset
for help on using the changeset viewer.