Ignore:
Timestamp:
11/14/02 16:49:37 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHHadronness.cc

    r1599 r1610  
    360360
    361361    *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;
    370379
    371380    const Int_t h = fMinDist->GetMaximumBin();
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc

    r1330 r1610  
    209209void MHMcCollectionArea::CalcEfficiency()
    210210{
    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//
     219void 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//
     229void 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//
    217254void MHMcCollectionArea::CalcEfficiency(UInt_t numevts, Float_t angle)
    218255{
     
    296333}
    297334
    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//
    306340void MHMcCollectionArea::Calc(const MHMcEfficiency &heff)
    307341{
     
    344378    SetReadyToSave();
    345379}
    346 
    347 // --------------------------------------------------------------------------
    348 //
    349 //  Calculate the Efficiency (collection area) and set the 'ReadyToSave'
    350 //  flag
    351 //
    352 /*
    353 void MHMcCollectionArea::Calc(MHMcEnergyImpact &mcsel, UInt_t numevents, Float_t angle)
    354 {
    355 }
    356 */
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.h

    r1300 r1610  
    2020    TH1D *fHistCol; //  the collection area
    2121
     22    void Calc(TH2D &hsel, TH2D &hall);
     23
    2224public:
    23 
    2425    MHMcCollectionArea(const char *name=NULL, const char *title=NULL);
    2526    ~MHMcCollectionArea();
Note: See TracChangeset for help on using the changeset viewer.