Ignore:
Timestamp:
06/10/05 13:10:09 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7093 r7142  
    117117
    118118    fFunc->FixParameter(1, 0);
    119     fFunc->FixParameter(4, 0);
     119    if (fPolynomOrder!=1)
     120        fFunc->FixParameter(4, 0);
    120121    fFunc->SetParLimits(2, 0, 90);
    121122    fFunc->SetParLimits(3, -1, 1);
     
    159160    fFunc->ReleaseParameter(2);
    160161    fFunc->FixParameter(3, fFunc->GetParameter(3));
     162    fFunc->FixParameter(4, fFunc->GetParameter(4));
    161163    for (int i=5; i<fFunc->GetNpar(); i++)
    162164        fFunc->FixParameter(i, fFunc->GetParameter(i));
     
    297299    const Int_t    l1 = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w));
    298300    const Int_t    l2 = m<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(m));
    299     const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f  \\omega=%%.%df\\circ  E=%%d  B=%%d  (x<%%.%df)  (\\chi_{b}^{2}/ndf=%%.1f  \\chi_{s}^{2}/ndf=%%.1f  c_{0}=%%.1f)",
     301    const TString fmt = Form("\\sigma_{L/M}=%%.1f  \\omega=%%.%df\\circ  E=%%d B=%%d  x<%%.%df  \\tilde\\chi_{b}=%%.1f  \\tilde\\chi_{s}=%%.1f  c=%%.1f  f=%%.2f",
    300302                             l1<1?1:l1+1, l2<1?1:l2+1);
    301303
    302304    TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess,
    303305                           (int)fEventsBackground, m, fChiSqBg, fChiSqSignal,
    304                            fCoefficients[3]));
     306                           fCoefficients[3], fScaleFactor));
    305307
    306308    text.SetBit(TLatex::kTextNDC);
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r7122 r7142  
    139139    binsa.SetEdges(18, 0, 90);
    140140    binse.SetEdgesLog(15, 10, 100000);
    141     binst.SetEdgesCos(50, 0, 60);
     141    binst.SetEdgesASin(51, -0.005, 0.505);
    142142    binse.Apply(fHEnergy);
    143143    binst.Apply(fHTheta);
     
    818818
    819819        if (hof ? fit.Fit(*hon, *hof, alpha) : fit.Fit(*hon))
    820             *fLog << dbg << "Bin " << i << ": sigma=" << fit.GetSignificance() << " omega=" << fit.GetGausSigma() << " events=" << fit.GetEventsExcess() << endl;
     820        {
     821            *fLog << dbg << "Bin " << i << ": sigma=" << fit.GetSignificance() << " omega=" << fit.GetGausSigma() << " events=" << fit.GetEventsExcess() << " scale=" << fit.GetScaleFactor() << endl;
     822            fit.PaintResult();
     823        }
    821824        /*
    822825        if (fit.FitEnergy(fHist, fOffData, i, kTRUE))
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r7094 r7142  
    9595    MBinning binsa, binse, binst;
    9696    binse.SetEdgesLog(15, 10, 1000000);
    97     binst.SetEdgesCos(50, 0, 60);
     97    binst.SetEdgesASin(51, -0.005, 0.505);
    9898
    9999    binse.Apply(fHEnergy);
     
    289289    if (TString(option)=="paint4")
    290290    {
    291         const TString txt = Form("A_{eff}=%.0fm^{2}  A_{abs}=%.0fm^{2}  r=%.0fm",
    292                                  GetCollectionAreaEff(),
     291        //const TString txt = Form("A_{eff}=%.0fm^{2}  A_{abs}=%.0fm^{2}  r=%.0fm",
     292        //                         GetCollectionAreaEff(),
     293        //                         GetCollectionAreaAbs(), fMcAreaRadius);
     294        const TString txt = Form("A_{abs}=%.0fm^{2}  r=%.0fm",
    293295                                 GetCollectionAreaAbs(), fMcAreaRadius);
    294296
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7122 r7142  
    203203
    204204    // Now we can safly derotate both position...
    205     TVector2 srcp(fSrcPos->GetXY());
     205    TVector2 srcp;
     206    if (fSrcPos)
     207        srcp = fSrcPos->GetXY();
     208
    206209    if (rho!=0)
    207210    {
     
    211214    }
    212215
    213     if (fSrcPos)
    214     {
    215         pos1 -= srcp*fMm2Deg;
    216         pos2 -= srcp*fMm2Deg;
    217     }
     216    pos1 -= srcp*fMm2Deg;
     217    pos2 -= srcp*fMm2Deg;
    218218
    219219    fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight);
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc

    r7115 r7142  
    410410    // setup binning
    411411    MBinning btheta("BinningTheta");
    412     btheta.SetEdgesCos(100, 0, 60);
     412    btheta.SetEdgesASin(51, -0.005, 0.505);
    413413
    414414    MBinning btime("BinningDeltaT");
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r6983 r7142  
    9696    MBinning binsi, binse, binst, binsr;
    9797    binse.SetEdgesLog(15, 10, 1000000);
    98     binst.SetEdgesCos(50, 0, 60);
     98    binst.SetEdgesASin(51, -0.005, 0.505);
    9999    binsi.SetEdges(10, 0, 400);
    100100    binsr.SetEdges(50, -1.3, 1.3);
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r7130 r7142  
    7272
    7373#include <TF1.h>
     74#include <TH1.h>
    7475
    7576#include "MLog.h"
     
    7980#include "MParameters.h"
    8081
     82#include "MPointingPos.h"
     83
    8184#include "MMcEvt.hxx"
    8285#include "MMcCorsikaRunHeader.h"
     
    106109    fAllowChange = kFALSE;
    107110
    108     fFunc   = NULL;
    109     fMcEvt  = NULL;
    110     fWeight = NULL;
     111    fFunc      = NULL;
     112    fMcEvt     = NULL;
     113    fWeight    = NULL;
     114    fZdWeights = NULL;
     115    fPointing  = NULL;
    111116}
    112117
     
    150155    if (!fWeight)
    151156        return kFALSE;
     157
     158    if (!fZdWeights)
     159        return kTRUE;
     160
     161    fPointing = (MPointingPos*)pList->FindObject("MPointingPos");
     162    if (!fPointing)
     163    {
     164        *fLog << err << "MPointingPos not found... abort." << endl;
     165        return kFALSE;
     166    }
    152167
    153168    return kTRUE;
     
    362377    const Double_t e = fMcEvt->GetEnergy();
    363378
    364     fWeight->SetVal(fFunc->Eval(e));
     379    Double_t w = 1;
     380
     381    if (fZdWeights)
     382    {
     383        const Int_t i = fZdWeights->GetXaxis()->FindFixBin(fPointing->GetZd());
     384        w = fZdWeights->GetBinContent(i);
     385        cout << i << " " << w << " " << fPointing->GetZd() << endl;
     386    }
     387
     388    fWeight->SetVal(fFunc->Eval(e)*w);
    365389
    366390    return kTRUE;
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.h

    r7094 r7142  
    77
    88class TF1;
     9class TH1;
    910class MParList;
    1011class MMcEvt;
    1112class MParameterD;
     13class MPointingPos;
    1214class MMcCorsikaRunHeader;
    1315
     
    1719    const MMcEvt *fMcEvt;   // Pointer to the container with the MC energy
    1820    MParameterD  *fWeight;  // Pointer to the output MWeight container
     21    MPointingPos *fPointing;
    1922
    2023    TString fNameWeight;    // Name of the MWeight container
     
    2225
    2326    TF1 *fFunc;             // Function calculating the weights
     27    TH1 *fZdWeights;        // Set additional ZA weights
    2428
    2529    Double_t fOldSlope;     // Slope of energy spectrum generated with Corsika
     
    5963    void SetEnergyRange(Double_t min=-2, Double_t max=-1) { fEnergyMin=min; fEnergyMax=max; }
    6064    void SetOldSlope(Double_t s=-2.6) { fOldSlope=s; }
     65    void SetZdWeights(TH1 *h=0) { fZdWeights = h; }
    6166    Bool_t Set(const MMcCorsikaRunHeader &h);
    6267
Note: See TracChangeset for help on using the changeset viewer.