Changeset 6892


Ignore:
Timestamp:
Mar 29, 2005, 11:42:03 AM (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6891 r6892  
    9494     - added dummy parameters to FixParameter for compatibility
    9595       with SetParemeter
     96
     97   * mbase/MFilter.[h,cc]:
     98     - implemented ReadEnv to treat "Inverted"
     99
     100   * mfbase/MF.[h,cc], mfilter/MFSupercuts.cc:
     101     - treat "inverted" with MFilter::ReadEnv
    96102
    97103
  • trunk/MagicSoft/Mars/NEWS

    r6891 r6892  
    44
    55   - Fix bug on the arrival time reconstruction when using Digital
    6      Filter
     6     Filter (in some marginal cases times were reconstructed shifted by one
     7     or two slices)
    78
    89   - all executables now return 2 where in previous versions -1 has
  • trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc

    r2206 r6892  
    4343
    4444#include "MHCompProb.h"
    45 #include "MHadronness.h"
     45#include "MParameters.h"
    4646
    4747ClassImp(MCompProbCalc);
     
    123123    }
    124124
    125     fHadronness = (MHadronness*)plist->FindCreateObj("MHadronness");
     125    fHadronness = (MParameterD*)plist->FindCreateObj("MParameterD", "MHadronness");
    126126    if (!fHadronness)
    127127        return kFALSE;
     
    161161    }
    162162
    163     fHadronness->SetHadronness(pow(p, 1./n));
     163    fHadronness->SetVal(pow(p, 1./n));
    164164    return kTRUE;
    165165}
  • trunk/MagicSoft/Mars/mbase/MFilter.cc

    r6276 r6892  
    109109    *fLog << "%) Evts fullfilled: " << str << endl;
    110110}
     111
     112// --------------------------------------------------------------------------
     113//
     114// Check for corresponding entries in resource file and setup filters.
     115//
     116// Assuming your filter is called (Set/GetName): MyFilter
     117//
     118// First you can setup whether the filter is inverted or not:
     119//     MyFilter.Inverted: yes, no  <default=no>
     120//
     121Int_t MFilter::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     122{
     123    if (IsEnvDefined(env, prefix, "Inverted", print))
     124    {
     125        SetInverted(GetEnvValue(env, prefix, "Inverted", IsInverted()));
     126        return kTRUE;
     127    }
     128    return kFALSE;
     129}
  • trunk/MagicSoft/Mars/mbase/MFilter.h

    r5875 r6892  
    2828    void PrintSkipped(UInt_t n, const char *str);
    2929
     30    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     31
    3032    ClassDef(MFilter, 1)                // Abstract base class for the filters
    3133};
  • trunk/MagicSoft/Mars/mfbase/MF.cc

    r6253 r6892  
    477477Int_t MF::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
    478478{
    479     Bool_t rc = kFALSE;
    480     if (IsEnvDefined(env, prefix, "Inverted", print))
    481     {
    482         rc = kTRUE;
    483         SetInverted(GetEnvValue(env, prefix, "Inverted", IsInverted()));
    484     }
     479    Bool_t rc = MFilter::ReadEnv(env, prefix, print);
     480    if (rc==kERROR)
     481        return kERROR;
    485482
    486483    if (!IsEnvDefined(env, prefix, "Condition", print))
  • trunk/MagicSoft/Mars/mfilter/MFSupercuts.cc

    r6879 r6892  
    297297Int_t MFSupercuts::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
    298298{
     299    if (MFilter::ReadEnv(env, prefix, print)==kERROR)
     300        return kERROR;
     301
    299302    if (IsEnvDefined(env, prefix, "File", print))
    300303    {
  • trunk/MagicSoft/Mars/mhflux/FluxLinkDef.h

    r6890 r6892  
    1010#pragma link C++ class MHEnergyEst+;
    1111#pragma link C++ class MHFalseSource+;
    12 #pragma link C++ class MHEnergyEst+;
    1312#pragma link C++ class MHEffectiveOnTime+;
    1413
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r6891 r6892  
    3232        kSignificanceChi2,
    3333        kSignificanceLogExcess,
    34         kSignificanceChi2,
    3534        kSignificanceExcess,
    3635        kExcess
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r6890 r6892  
    611611                fHistOff->ProjectionZ("AlphaOff_z", maxx, maxx, maxy, maxy);
    612612
     613                /* ============= local scaling ================ */
    613614                const Int_t f = h0->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);
    614615                const Int_t l = h0->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;
     
    616617                //h0->Scale(h1->GetEntries()/h0->GetEntries());
    617618
     619                /* ============= global scaling ================
     620                const Int_t f = fHistOff->GetZaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);
     621                const Int_t l = fHistOff->GetZaxis()->FindFixBin(fAlphaCut*3)+f-1;
     622
     623                Double_t c0 = fHist.Integral(0, 9999, 0, 9999, f, l);
     624                Double_t c1 = fHistOff->Integral(0, 9999, 0, 9999, f, l);
     625
     626                h0->Scale(c0/c1);
     627                */
    618628            }
    619629        }
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r6891 r6892  
    322322
    323323    // Initialize default binnings
    324     MBinning bins1(18, 0,  90,  "BinningAlpha",     "lin");
    325     MBinning bins2(30, 10, 1e6, "BinningEnergyEst", "log");
    326     MBinning bins3(25, 0,  60,  "BinningTheta",     "cos"); // orig=50bins
     324    MBinning bins1(18, 0,  90,   "BinningAlpha",     "lin");
     325    MBinning bins2(15, 10, 1e6 , "BinningEnergyEst", "log");
     326    MBinning bins3(50, 0,  60,   "BinningTheta",     "cos");
    327327    MBinning bins4("BinningFalseSource");
    328328    plist.AddToList(&bins1);
Note: See TracChangeset for help on using the changeset viewer.