Changeset 855 for trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc
- Timestamp:
- 07/05/01 13:23:12 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc
r851 r855 29 29 #include <TH1.h> 30 30 #include <TF1.h> 31 #include <TCanvas.h> 31 32 #include <TPaveLabel.h> 32 33 … … 58 59 sprintf(aux+10, ";%i", idx); 59 60 hLogEner = new TH1F(aux, "", 100, 0.5, 4.5); 61 hLogEner->SetXTitle("log(E) [GeV]"); 62 hLogEner->SetYTitle("dN/dE"); 60 63 //hLogEner->SetBins(60); 61 64 } … … 75 78 { 76 79 // 80 // 0: don't draw the function (it is drawn together with the histogram) 81 // +: add these function to the list of fits. Don't delete the last fit. 82 // 77 83 // FIXME: R means: use the range specified in the function (xxmin, xxmax are ignored!) 78 84 // Q means: quiet (why?) 79 85 // 80 86 // 81 hLogEner->Fit(fLogEner->GetName(), " RQ", "", xxmin, xxmax);87 hLogEner->Fit(fLogEner->GetName(), "Q0+", "", xxmin, xxmax); 82 88 } 83 89 … … 92 98 const Float_t sum = min+max; 93 99 100 TCanvas *c=new TCanvas("Energy Distribution","Energy distribution for triggered events"); 101 102 hLogEner->Draw(option); 103 94 104 TPaveLabel* label = new TPaveLabel(2.2, 0.75*sum, 4.4, 0.90*sum, text); 95 96 hLogEner->SetYTitle("dN/dE") ;97 hLogEner->SetXTitle("log(E) [GeV]") ;98 hLogEner->Draw(option) ;99 105 label->SetFillColor(10); 100 106 label->SetTextSize(0.3); 101 107 label->Draw(); 108 109 c->Modified(); 110 c->Update(); 102 111 } 103 112
Note:
See TracChangeset
for help on using the changeset viewer.