Changeset 6986 for trunk/MagicSoft


Ignore:
Timestamp:
04/29/05 13:09:12 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 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;
  • trunk/MagicSoft/Mars/mmuon/MMuonCalibParCalc.cc

    r6979 r6986  
    187187{
    188188    // Calculation of Arc Phi etc...
    189     const Float_t thresphi   = fMuonSetup->GetThresholdArcPhi()  /fGeomCam->GetConvMm2Deg();
    190     const Float_t threswidth = fMuonSetup->GetThresholdArcWidth()/fGeomCam->GetConvMm2Deg();
     189    const Float_t thresphi   = fMuonSetup->GetThresholdArcPhi();
     190    const Float_t threswidth = fMuonSetup->GetThresholdArcWidth();
    191191
    192192    Double_t peakphi, arcphi;
  • trunk/MagicSoft/Mars/mmuon/MMuonSetup.cc

    r6979 r6986  
    4545//
    4646MMuonSetup::MMuonSetup(const char *name, const char *title)
    47     : fMargin(0.2), fThresholdArcPhi(0.1), fThresholdArcWidth(0.1)
     47    : fMargin(0.2), fThresholdArcPhi(30), fThresholdArcWidth(30)
    4848{
    4949    fName  = name  ? name  : "MMuonSetup";
     
    5555// Read the setup from a TEnv, eg:
    5656//   MMuonSetup.Margin:            0.2
    57 //   MMuonSetup.ThresholdArcPhi:   0.1
    58 //   MMuonSetup.ThresholdArcWidth: 0.1
     57//   MMuonSetup.ThresholdArcPhi:   30
     58//   MMuonSetup.ThresholdArcWidth: 30
    5959//
    6060Int_t MMuonSetup::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
  • trunk/MagicSoft/Mars/mmuon/MMuonSetup.h

    r6979 r6986  
    1010private:
    1111    Float_t fMargin;            // [deg] margin to evaluate muons. The defaut value is 60 mm, corresponding to 0.2 deg. This value can be changed by using the function of SetMargin
    12     Float_t fThresholdArcPhi;   // [deg] The threshold value to define arc phi
    13     Float_t fThresholdArcWidth; // [deg] The threshold value to define arc width
     12    Float_t fThresholdArcPhi;   // [phe] The threshold value to define arc phi
     13    Float_t fThresholdArcWidth; // [phe] The threshold value to define arc width
    1414
    1515    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
  • trunk/MagicSoft/Mars/star.rc

    r6979 r6986  
    4949# -------------------------------------------------------------------------
    5050# MMuonSetup.Margin:            0.2
    51 # MMuonSetup.ThresholdArcPhi:   0.1
    52 # MMuonSetup.ThresholdArcWidth: 0.1
     51# MMuonSetup.ThresholdArcPhi:   30
     52# MMuonSetup.ThresholdArcWidth: 30
    5353# BinningRadius.Raw:            20  0.5  1.5
    5454# BinningArcWidth.Raw:          60  0.0  0.3
Note: See TracChangeset for help on using the changeset viewer.