Changeset 1610 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/14/02 16:49:37 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r1599 r1610 360 360 361 361 *fLog << "Used " << fGhness->GetEntries() << " Gammas and " << fPhness->GetEntries() << " Hadrons." << endl; 362 *fLog << "Acc Gammas @ 1% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.01)*100) << "%" << endl; 363 *fLog << "Acc Gammas @ 2% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.02)*100) << "%" << endl; 364 *fLog << "Acc Gammas @ 5% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.05)*100) << "%" << endl; 365 *fLog << "Acc Gammas @ 10% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.1)*100) << "%" << endl; 366 *fLog << "Acc Gammas @ 20% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.2)*100) << "%" << endl; 367 *fLog << "Acc Gammas @ 30% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.3)*100) << "%" << endl; 368 *fLog << "Acc Gammas @ 40% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.4)*100) << "%" << endl; 369 *fLog << "Acc Gammas @ 50% Hadron-acc: " << Form("%3.0f", GetGammaAcceptance(0.5)*100) << "%" << endl; 362 *fLog << " acc(hadron) acc(gamma)" << endl <<endl; 363 364 *fLog << " 0.005 " << Form("%6.3f", GetGammaAcceptance(0.005)) << endl; 365 *fLog << " 0.02 " << Form("%6.3f", GetGammaAcceptance(0.02)) << endl; 366 *fLog << " 0.05 " << Form("%6.3f", GetGammaAcceptance(0.05)) << endl; 367 *fLog << " 0.1 " << Form("%6.3f", GetGammaAcceptance(0.1 )) << endl; 368 *fLog << " 0.2 " << Form("%6.3f", GetGammaAcceptance(0.2 )) << endl; 369 *fLog << " 0.3 " << Form("%6.3f", GetGammaAcceptance(0.3 )) << endl; 370 *fLog << Form("%6.3f", GetHadronAcceptance(0.1)) << " 0.1 " << endl; 371 *fLog << Form("%6.3f", GetHadronAcceptance(0.2)) << " 0.2 " << endl; 372 *fLog << Form("%6.3f", GetHadronAcceptance(0.3)) << " 0.3 " << endl; 373 *fLog << Form("%6.3f", GetHadronAcceptance(0.4)) << " 0.4 " << endl; 374 *fLog << Form("%6.3f", GetHadronAcceptance(0.5)) << " 0.5 " << endl; 375 *fLog << Form("%6.3f", GetHadronAcceptance(0.6)) << " 0.6 " << endl; 376 *fLog << Form("%6.3f", GetHadronAcceptance(0.7)) << " 0.7 " << endl; 377 *fLog << Form("%6.3f", GetHadronAcceptance(0.8)) << " 0.8 " << endl; 378 *fLog << endl; 370 379 371 380 const Int_t h = fMinDist->GetMaximumBin(); -
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
r1330 r1610 209 209 void MHMcCollectionArea::CalcEfficiency() 210 210 { 211 MHMcEfficiency heff; 212 heff.Calc(*fHistSel, *fHistAll); 213 214 Calc(heff); 215 } 216 211 Calc(*fHistSel, *fHistAll); 212 } 213 214 // -------------------------------------------------------------------------- 215 // 216 // Calculate the Efficiency (collection area) and set the 'ReadyToSave' 217 // flag 218 // 219 void MHMcCollectionArea::Calc(const MHMcEnergyImpact &mcsel, const MHMcEnergyImpact &mcall) 220 { 221 Calc((TH2D&)*mcsel.GetHist(), (TH2D&)*mcall.GetHist()); 222 } 223 224 // -------------------------------------------------------------------------- 225 // 226 // Calculate the Efficiency (collection area) and set the 'ReadyToSave' 227 // flag 228 // 229 void MHMcCollectionArea::Calc(TH2D &hsel, TH2D &hall) 230 { 231 MH::SetBinning(fHistCol, hsel.GetXaxis()); 232 233 fHistCol->Sumw2(); 234 235 TH1D &psel = *hsel.ProjectionX(); 236 TH1D &pall = *hall.ProjectionX(); 237 238 const Double_t max = psel.GetYaxis()->GetXmax(); 239 240 fHistCol->Divide(&psel, &pall, TMath::Pi()*max*max, 1); 241 fHistCol->SetEntries(hsel.GetEntries()); 242 243 delete &psel; 244 delete &pall; 245 246 SetReadyToSave(); 247 } 248 249 // -------------------------------------------------------------------------- 250 // 251 // Calculate the Efficiency (collection area) and set the 'ReadyToSave' 252 // flag 253 // 217 254 void MHMcCollectionArea::CalcEfficiency(UInt_t numevts, Float_t angle) 218 255 { … … 296 333 } 297 334 298 void MHMcCollectionArea::Calc(const MHMcEnergyImpact &mcsel, const MHMcEnergyImpact &mcall) 299 { 300 MHMcEfficiency heff; 301 heff.Calc(*mcsel.GetHist(), *mcall.GetHist()); 302 303 Calc(heff); 304 } 305 335 // -------------------------------------------------------------------------- 336 // 337 // Calculate the Efficiency (collection area) and set the 'ReadyToSave' 338 // flag 339 // 306 340 void MHMcCollectionArea::Calc(const MHMcEfficiency &heff) 307 341 { … … 344 378 SetReadyToSave(); 345 379 } 346 347 // --------------------------------------------------------------------------348 //349 // Calculate the Efficiency (collection area) and set the 'ReadyToSave'350 // flag351 //352 /*353 void MHMcCollectionArea::Calc(MHMcEnergyImpact &mcsel, UInt_t numevents, Float_t angle)354 {355 }356 */ -
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.h
r1300 r1610 20 20 TH1D *fHistCol; // the collection area 21 21 22 void Calc(TH2D &hsel, TH2D &hall); 23 22 24 public: 23 24 25 MHMcCollectionArea(const char *name=NULL, const char *title=NULL); 25 26 ~MHMcCollectionArea();
Note:
See TracChangeset
for help on using the changeset viewer.