Ignore:
Timestamp:
04/29/05 13:09:12 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc

    r6979 r6986  
    126126    }
    127127
    128     MMuonSetup *setup = (MMuonSetup*)plist->FindObject("MMuonSetup");
     128    MMuonSetup *setup = (MMuonSetup*)const_cast<MParList*>(plist)->FindCreateObj("MMuonSetup");
    129129    if (!setup)
    130     {
    131         *fLog << warn << "MMuonSetup not found... abort." << endl;
    132         return kFALSE;
    133     }
     130        return kFALSE;
     131
    134132    fMargin = setup->GetMargin()/fGeomCam->GetConvMm2Deg();
    135133
     
    185183    //  Up to now, the error of pedestal is not taken into accout. This is not
    186184    // of course correct. We will include this soon.
    187     Double_t ADC2PhEl = 0.14;
    188     Double_t Ffactor  = 1.4;
     185    const Double_t Ffactor  = 1.4;
    189186    for (Int_t i=0; i<fHistPhi.GetNbinsX()+1; i++)
    190187    {
    191188        const Float_t abs      = TMath::Abs(fHistPhi.GetBinContent(i));
    192         const Float_t rougherr = TMath::Sqrt(abs/ADC2PhEl)*Ffactor;
     189        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
    193190
    194191        fHistPhi.SetBinError(i, rougherr);
     
    198195    {
    199196        const Float_t abs      = TMath::Abs(fHistWidth.GetBinContent(i));
    200         const Float_t rougherr = TMath::Sqrt(abs/ADC2PhEl)*Ffactor;
     197        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
    201198
    202199        fHistWidth.SetBinError(i, rougherr);
     
    298295            first = 0; // If maximum is on the left side of histogram
    299296
     297    if (last-first<=3)
     298        return kFALSE;
     299
    300300    // Now get the fit range
    301301    const Float_t startfitval = fHistWidth.GetBinLowEdge(first+1);
     
    316316    fHistWidth.Fit(&f1, "NQR");
    317317
    318     if (last-first>3)
    319         chi = f1.GetChisquare()/(last-first-3);
     318    chi = f1.GetChisquare()/f1.GetNDF();
    320319
    321320    Double_t err;
Note: See TracChangeset for help on using the changeset viewer.