Changeset 1613
- Timestamp:
- 11/14/02 17:13:46 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
r1610 r1613 36 36 37 37 #include "MH.h" 38 #include "MBinning.h" 38 39 #include "MHMcEfficiency.h" 39 40 #include "MHMcEnergyImpact.h" … … 52 53 // initialize the histogram for the distribution r vs E 53 54 // 54 // we set the energy range from 1 Gev to 10000 GeV (in log 5 orders55 // we set the energy range from 10 Gev to 20000 GeV (in log 5 orders 55 56 // of magnitude) and for each order we take 10 subdivision --> 50 xbins 56 57 // 57 58 // we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins 58 59 59 // 60 60 fName = name ? name : "MHMcCollectionArea"; 61 61 fTitle = title ? title : "Collection Area vs. Energy"; 62 62 63 const Int_t nbins = 50; 64 const Float_t maxx = 5; 65 const Float_t maxy = 500; 66 67 Float_t *binsx = new Float_t[nbins+1]; 68 for (int i=0; i<nbins+1; i++) 69 binsx[i] = pow(10, maxx*i/nbins); 70 71 Float_t *binsy = new Float_t[nbins+1]; 72 for (int i=0; i<nbins+1; i++) 73 binsy[i] = maxy*i/nbins; 74 75 fHistAll = new TH2D("AllEvents", "All showers - Radius vs Energy distribution", 76 nbins, binsx, nbins, binsy); 77 fHistSel = new TH2D("SelectedEvents", "Selected showers - Radius vs Energy distribution", 78 nbins, binsx, nbins, binsy); 79 80 delete binsx; 81 delete binsy; 82 63 MBinning binsx; 64 MBinning binsy; 65 binsx.SetEdgesLog(50, 10, 20000); 66 binsy.SetEdges (50, 0, 500); 67 68 fHistAll = new TH2D; 69 fHistSel = new TH2D; 83 70 fHistCol = new TH1D; 71 72 MH::SetBinning(fHistAll, &binsx, &binsy); 73 MH::SetBinning(fHistSel, &binsx, &binsy); 74 84 75 fHistCol->SetName(fName); 76 fHistAll->SetName("AllEvents"); 77 fHistSel->SetName("SelectedEvents"); 78 85 79 fHistCol->SetTitle(fTitle); 80 fHistAll->SetTitle("All showers - Radius vs Energy distribution"); 81 fHistSel->SetTitle("Selected showers - Radius vs Energy distribution"); 86 82 87 83 fHistAll->SetDirectory(NULL); -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r1612 r1613 95 95 96 96 if (fTheta>=0 && fTheta!=runheader->GetTelesTheta()) 97 *fLog << warn << dbginf << "Warning - Read files have different TelesTheta... exit." << endl;97 *fLog << warn << dbginf << "Warning - Read files have different TelesTheta..." << endl; 98 98 99 99 fTheta = runheader->GetTelesTheta(); 100 100 101 101 if (fCorsikaVersion!=0 && fCorsikaVersion!=runheader->GetCorsikaVersion()) 102 *fLog << warn << dbginf << "Warning - Read files have different Corsika versions... exit." << endl;102 *fLog << warn << dbginf << "Warning - Read files have different Corsika versions..." << endl; 103 103 104 104 fCorsikaVersion = runheader->GetCorsikaVersion();
Note:
See TracChangeset
for help on using the changeset viewer.