Changeset 710
- Timestamp:
- 03/30/01 11:30:32 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 18 added
- 10 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r708 r710 1 1 -*-*- END -*-*- 2 2 3 2000/03/30: Thomas Bretz 4 5 * mdatacheck/MH*, mdatacheck/MFillH* moved to mhist 6 7 3 8 2000/03/21: Thomas Bretz 4 9 -
trunk/MagicSoft/Mars/Makefile
r686 r710 35 35 # ----->>> mars libraries 36 36 # 37 SUBDIRS = mgui manalysis meventdisp mdatacheck mmontecarlo mbase mraw mmc 37 SUBDIRS = mgui \ 38 manalysis \ 39 meventdisp \ 40 mdatacheck \ 41 mmontecarlo \ 42 mhist \ 43 mbase \ 44 mraw \ 45 mmc 38 46 39 47 LIBRARIES = $(SUBDIRS:=.a) … … 85 93 @cd mraw; make mrproper; cd .. 86 94 @echo "cd .." 95 @echo "cd mhist" 96 @cd mhist; make mrproper; cd .. 97 @echo "cd .." 87 98 @echo "cd mgui" 88 99 @cd mgui; make mrproper; cd .. -
trunk/MagicSoft/Mars/macros/CT1Hillas.C
r700 r710 26 26 // finished you must create them yourself and add it to the list 27 27 // 28 MHHillas *hists = new MHHillas;28 MHHillas *hists = new MHHillas; 29 29 plist->AddToList(hists); 30 31 MHStarMap *smap = new MHStarMap; 32 plist->AddToList(smap); 30 33 31 34 // … … 37 40 // 4) fill the hillas into the histograms 38 41 // 39 MCT1ReadAscii read("CT1_9 9_on1.dat") ;42 MCT1ReadAscii read("CT1_97_on1.dat") ; 40 43 MImgCleanStd clean; 41 44 MHillasCalc hcalc; 42 45 MFillHHillas hfill; 46 MFillHStarMap sfill; 43 47 44 48 tlist.AddToList(&read); … … 46 50 tlist.AddToList(&hcalc); 47 51 tlist.AddToList(&hfill); 52 tlist.AddToList(&sfill); 48 53 49 54 // … … 62 67 // 63 68 hists->Draw(); 69 smap->Draw(); 64 70 } -
trunk/MagicSoft/Mars/macros/MagicHillas.C
r700 r710 32 32 plist->AddToList(hists); 33 33 34 MHStarMap *smap = new MHStarMap; 35 plist->AddToList(smap); 36 34 37 // 35 38 // Now setup the tasks and tasklist: … … 40 43 // 4) fill the hillas into the histograms 41 44 // 42 MReadTree read("oscar_protons.root", "Events") ; 43 MCerPhotCalc ncalc; 44 MImgCleanStd clean; 45 MHillasCalc hcalc; 46 MFillHHillas hfill; 45 MReadTree read("Events", "oscar_protons.root"); 46 read.AddFile("test.root"); 47 48 MCerPhotCalc ncalc; 49 MImgCleanStd clean; 50 MHillasCalc hcalc; 51 MFillHHillas hfill; 52 MFillHStarMap sfill; 47 53 48 54 tlist.AddToList(&read); … … 51 57 tlist.AddToList(&hcalc); 52 58 tlist.AddToList(&hfill); 59 tlist.AddToList(&sfill); 53 60 54 61 // … … 67 74 // 68 75 hists->Draw(); 76 smap->Draw(); 69 77 } 78 -
trunk/MagicSoft/Mars/macros/readCT1.C
r700 r710 11 11 plist->AddToList(&tlist); 12 12 13 MCT1ReadAscii read("CT1_99_o n1.dat") ;13 MCT1ReadAscii read("CT1_99_off1.dat") ; 14 14 MImgCleanStd clean; 15 15 MHillasCalc hcalc; … … 29 29 Int_t icount = 0 ; 30 30 MCamDisplay display(&geomcam) ; 31 display.DrawPhotNum(&phevt); 32 31 33 32 34 while (read.Process()) 33 35 { 34 36 cout << "Event: " << icount++ << endl ; 35 36 if (icount < 45 )37 continue;38 37 39 38 display.DrawPhotNum(&phevt); -
trunk/MagicSoft/Mars/mars.cc
r669 r710 26 26 // start the main window 27 27 28 MGMarsMain mainWin(gClient->GetRoot(), 400, 650);28 MGMarsMain *mainWin = new MGMarsMain(400, 650); 29 29 30 30 theApp.Run(); -
trunk/MagicSoft/Mars/mdatacheck/DataCheckIncl.h
r462 r710 1 1 #ifndef __CINT__ 2 2 3 #include "MParList.h"4 5 #include "MRawRunHeader.h"6 #include "MRawEvtHeader.h"7 #include "MRawEvtData.h"8 #include "MRawCrateArray.h"9 #include "MTime.h"10 #include "MInputStreamID.h"11 12 #include "MReadTree.h"13 14 3 #endif // __CINT__ -
trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h
r698 r710 5 5 #pragma link off all functions; 6 6 7 #pragma link C++ class MHFadcCam;8 #pragma link C++ class MHFadcPix;9 #pragma link C++ class MHHillas;10 11 7 #pragma link C++ class MShowSpect; 12 13 #pragma link C++ class MFillHFadc;14 #pragma link C++ class MFillHHillas;15 16 8 #pragma link C++ class MDumpEvtHeader; 17 9 -
trunk/MagicSoft/Mars/mdatacheck/Makefile
r698 r710 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase -I../mraw -I../m analysis24 INCLUDES = -I. -I../mbase -I../mraw -I../mhist 25 25 26 26 #------------------------------------------------------------------------------ … … 29 29 30 30 SRCFILES = MDumpEvtHeader.cc \ 31 MFillHFadc.cc \32 MFillHHillas.cc \33 31 MGDisplayAdc.cc \ 34 MHFadcPix.cc \35 MHFadcCam.cc \36 MHHillas.cc \37 32 MShowSpect.cc \ 38 33 MViewAdcSpectra.cc -
trunk/MagicSoft/Mars/mgui/MGMarsMain.cc
r587 r710 31 31 32 32 33 MGMarsMain::MGMarsMain( const TGWindow *p,UInt_t w, UInt_t h)34 : TGMainFrame( p, w, h)33 MGMarsMain::MGMarsMain(/*const TGWindow *p,*/ UInt_t w, UInt_t h) 34 : TGMainFrame(gClient->GetRoot(), w, h) 35 35 { 36 36 // First create the MenuBar. -
trunk/MagicSoft/Mars/mgui/MGMarsMain.h
r706 r710 56 56 57 57 public: 58 MGMarsMain( const TGWindow *p,UInt_t w, UInt_t h) ;58 MGMarsMain(/*const TGWindow *p,*/ UInt_t w, UInt_t h) ; 59 59 60 60 ~MGMarsMain(); -
trunk/MagicSoft/Mars/mmontecarlo/MCollArea.cc
r689 r710 34 34 50, 0., 500. ) ; 35 35 36 fHistCol l = new TH1D("collArea", "Collection Area",37 50, 0., 5.) ; 36 fHistCol = new TH1D("collArea", "Collection Area", 37 50, 0., 5.) ; 38 38 39 39 } … … 43 43 delete fHistAll ; 44 44 delete fHistSel ; 45 delete fHistCol l ;45 delete fHistCol ; 46 46 } 47 47 … … 68 68 void MCollArea::Draw(Option_t* option) 69 69 { 70 fHistCol l->Draw(option) ;70 fHistCol->Draw(option) ; 71 71 } 72 72 73 void MCollArea::Calc ulateEffi()73 void MCollArea::CalcEfficiency() 74 74 { 75 // first of all calculate the efficency 76 // do it here by hand to get the right error of efficency 77 78 Int_t iBinx = ( (TAxis *) fHistSel->GetXaxis())->GetNbins() ; 79 Int_t iBiny = ( (TAxis *) fHistSel->GetYaxis())->GetNbins() ; 80 81 Float_t N, Nall ; 82 Double_t effi, error ; 83 for (Int_t ix=1; ix<=iBiny; ix++ ) 75 // Description! 76 77 // 78 // first of all calculate the efficency 79 // do it here by hand to get the right error of efficency 80 // 81 const Int_t iBinx = ((TAxis *)fHistSel->GetXaxis())->GetNbins(); 82 const Int_t iBiny = ((TAxis *)fHistSel->GetYaxis())->GetNbins(); 83 84 for (Int_t ix=1; ix<=iBiny; ix++ ) 84 85 { 85 for (Int_t iy=1; iy<=iBiny; iy++ ) 86 { 87 effi = error = 0. ; 86 for (Int_t iy=1; iy<=iBiny; iy++ ) 87 { 88 const Float_t N = fHistSel->GetCellContent(ix, iy); 89 const Float_t Nall = fHistAll->GetCellContent(ix, iy); 88 90 89 N = fHistSel->GetCellContent(ix, iy) ; 90 Nall = fHistAll->GetCellContent(ix, iy) ; 91 92 if ( Nall > 0 ) { 93 effi = N / Nall ; 94 error = sqrt ( Nall + Nall * N - N * N - N ) / (Nall * Nall ) ; 91 if ( Nall <= 0 ) { 92 // cout << ix << " " << iy << endl ; 93 continue; 94 } 95 95 96 cout << ix << " " << iy 97 << " N " << N 98 << " Nall " << Nall 99 << " effi " << effi 100 << " error " << error 101 << endl ; 96 const Double_t eff = N / Nall ; 97 const Double_t err = sqrt(Nall + Nall*N - N*N - N) / (Nall*Nall); 98 /* 99 cout << ix << " " << iy 100 << " N " << N 101 << " Nall " << Nall 102 << " effi " << eff 103 << " error " << err 104 << endl ; 105 */ 106 fHistSel->SetCellContent(ix, iy, eff); 107 fHistSel->SetCellError(ix, iy, err); 108 } 109 } 102 110 103 fHistSel->SetCellContent(ix, iy, effi) ; 104 fHistSel->SetCellError(ix, iy, error) ; 105 } 106 else 107 cout << ix << " " << iy << endl ; 108 109 111 // 112 // now calculate the Collection area for different 113 // energies 114 // 115 for (Int_t ix=1; ix<=iBiny; ix++ ) 116 { 117 Double_t errA = 0; 118 Double_t colA = 0; 110 119 111 112 } 113 } 114 115 // 116 // now calculate the Collection area for different 117 // energies 118 // 119 120 121 Double_t r1, r2, eff, errEff, A, errA, collA ; 120 for (Int_t iy=1; iy<=iBiny; iy++ ) 121 { 122 const Double_t r1 = ((TAxis *)fHistSel->GetYaxis())->GetBinLowEdge(iy); 123 const Double_t r2 = ((TAxis *)fHistSel->GetYaxis())->GetBinLowEdge(iy+1); 122 124 123 for (Int_t ix=1; ix<=iBiny; ix++ ) 124 { 125 A = errA = collA = errEff = 0. ; 126 127 for (Int_t iy=1; iy<=iBiny; iy++ ) 128 { 129 r1 = ( (TAxis *) fHistSel->GetYaxis())->GetBinLowEdge(iy) ; 130 r2 = ( (TAxis *) fHistSel->GetYaxis())->GetBinLowEdge(iy+1) ; 131 A = 3.141592654 * ( r2*r2 - r1*r1 ) ; 132 eff = fHistSel->GetCellContent(ix, iy) ; 133 errEff = fHistSel->GetCellError(ix, iy) ; 134 collA += eff * A ; 135 136 errA += ( A * A ) * errEff * errEff ; 137 } 125 const Double_t A = kPI * (r2*r2 - r1*r1); 138 126 139 errA = sqrt( errA ) ; 127 const Double_t eff = fHistSel->GetCellContent(ix, iy); 128 const Double_t err = fHistSel->GetCellError(ix, iy); 140 129 141 cout << ix << " --> " << A 142 << endl ; 143 144 fHistColl->SetBinContent(ix, collA ) ; 145 fHistColl->SetBinError(ix, errA ) ; 146 130 colA += eff*A; 131 errA += (A*A) * err * err; 132 } 147 133 148 } 149 } 134 fHistCol->SetBinContent(ix, colA); 135 fHistCol->SetBinError(ix, sqrt(errA)); 136 } 137 } -
trunk/MagicSoft/Mars/mmontecarlo/MCollArea.h
r686 r710 9 9 10 10 private: 11 TH2D *fHistAll ; //! all simulated showers12 TH2D *fHistSel ; //! 13 TH1D *fHistCol l ; //!the collection area11 TH2D *fHistAll ; //! all simulated showers 12 TH2D *fHistSel ; //! the selected showers 13 TH1D *fHistCol ; // the collection area 14 14 15 15 public: … … 23 23 void DrawSel() ; 24 24 void Draw(Option_t* option = "") ; 25 void Calc ulateEffi() ;25 void CalcEfficiency() ; 26 26 27 27 ClassDef(MCollArea, 1) // Data Container to calculate Collection Area
Note:
See TracChangeset
for help on using the changeset viewer.