Changeset 1227 for trunk/MagicSoft
- Timestamp:
- 02/28/02 16:36:54 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1221 r1227 1 1 -*-*- END -*-*- 2 3 2002/02/28: Thomas Bretz 4 5 * mhist/MHMcEnergyImpact.[h,cc], mhist/MHMcEfficiency.[h,cc]: 6 - added 7 8 * mhist/Makefile, mhist/HistLinkDef.h: 9 - added MHMcEnergyImpact and MHMcEfficiency 10 11 * mhist/*.cc: 12 - repaced some *&-> casts by &. 13 14 * mhist/MHMcCollectionArea.[h,cc]: 15 - changed to be able to use new MHMcEfficiency. 16 17 2 18 3 19 2002/02/21: Abelardo Moralejo -
trunk/MagicSoft/Mars/mhist/HistLinkDef.h
r1211 r1227 15 15 #pragma link C++ class MHEnergyTime+; 16 16 #pragma link C++ class MHEnergyTheta+; 17 #pragma link C++ class MHMcEnergy+;18 #pragma link C++ class MHMcCollectionArea+;19 17 #pragma link C++ class MHAlphaEnergyTime; 20 18 #pragma link C++ class MHAlphaEnergyTheta; … … 27 25 28 26 #pragma link C++ class MHMcRate+; 27 #pragma link C++ class MHMcEfficiency+; 28 #pragma link C++ class MHMcEnergy+; 29 #pragma link C++ class MHMcEnergyImpact+; 30 #pragma link C++ class MHMcCollectionArea+; 29 31 30 32 #endif -
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
r1219 r1227 165 165 166 166 c->cd(4); 167 ((TH3 *)(&fHist))->DrawCopy(opt);167 ((TH3&)fHist).DrawCopy(opt); 168 168 169 169 c->Modified(); -
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
r1215 r1227 169 169 170 170 c->cd(4); 171 ((TH3D *)(&fHist))->DrawCopy(opt);171 ((TH3D&)fHist).DrawCopy(opt); 172 172 173 173 c->Modified(); -
trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.cc
r1215 r1227 139 139 gROOT->SetSelectedPad(NULL); 140 140 141 ((TH2 *)(&fHist))->DrawCopy(opt);141 ((TH2&)fHist).DrawCopy(opt); 142 142 143 143 c->Modified(); -
trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc
r1215 r1227 78 78 gROOT->SetSelectedPad(NULL); 79 79 80 ((TH2 *)(&fHist))->DrawCopy(opt);80 ((TH2&)fHist).DrawCopy(opt); 81 81 82 82 c->Modified(); -
trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc
r1213 r1227 133 133 gROOT->SetSelectedPad(NULL); 134 134 135 ((TH2D *)&fHist)->DrawCopy(option);135 ((TH2D&)fHist).DrawCopy(option); 136 136 gPad->SetLogy(); 137 137 -
trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
r1213 r1227 141 141 gROOT->SetSelectedPad(NULL); 142 142 143 ((TH2D *)&fHist)->DrawCopy(option);143 ((TH2D&)fHist).DrawCopy(option); 144 144 gPad->SetLogy(); 145 145 -
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
r1088 r1227 30 30 31 31 #include "MH.h" 32 #include "MHMcEfficiency.h" 32 33 33 34 ClassImp(MHMcCollectionArea); … … 192 193 } 193 194 195 void MHMcCollectionArea::Calc(MHMcEfficiency *heff) 196 { 197 // 198 // now calculate the Collection area for different 199 // energies 200 // 201 TH2D &h = (TH2D&)*heff->GetHist(); 202 203 const Int_t nbinx = h.GetXaxis()->GetNbins(); 204 const Int_t nbiny = h.GetYaxis()->GetNbins(); 205 206 for (Int_t ix=1; ix<=nbinx; ix++) 207 { 208 Double_t errA = 0; 209 Double_t colA = 0; 210 211 for (Int_t iy=1; iy<=nbiny; iy++) 212 { 213 TAxis *yaxis = h.GetYaxis(); 214 215 const Double_t r1 = yaxis->GetBinLowEdge(iy); 216 const Double_t r2 = yaxis->GetBinLowEdge(iy+1); 217 218 const Double_t A = TMath::Pi() * (r2*r2 - r1*r1); 219 220 const Double_t eff = h.GetCellContent(ix, iy); 221 const Double_t err = h.GetCellError(ix, iy); 222 223 colA += eff*A; 224 errA += A*A * err*err; 225 } 226 227 fHistCol->SetBinContent(ix, colA); 228 fHistCol->SetBinError(ix, sqrt(errA)); 229 } 230 } 231 194 232 // -------------------------------------------------------------------------- 195 233 // … … 201 239 // Description! 202 240 241 /* 203 242 // 204 243 // first of all calculate the efficency … … 258 297 fHistCol->SetBinContent(ix, colA); 259 298 fHistCol->SetBinError(ix, sqrt(errA)); 260 } 299 } 300 */ 301 MHMcEfficiency heff; 302 heff.Calc(fHistSel, fHistAll); 303 304 Calc(&heff); 261 305 262 306 SetReadyToSave(); -
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.h
r1015 r1227 8 8 class TH1D; 9 9 class TH2D; 10 11 class MHMcEfficiency; 10 12 11 13 class MHMcCollectionArea : public MParContainer … … 33 35 void CalcEfficiency(); 34 36 37 void Calc(MHMcEfficiency *eff); 38 35 39 ClassDef(MHMcCollectionArea, 1) // Data Container to calculate Collection Area 36 40 }; -
trunk/MagicSoft/Mars/mhist/Makefile
r1216 r1227 46 46 MHTimeDiffTheta.cc \ 47 47 MHMcEnergy.cc \ 48 MHMcEfficiency.cc \ 49 MHMcEnergyImpact.cc \ 48 50 MHMcRate.cc 49 51
Note:
See TracChangeset
for help on using the changeset viewer.