Ignore:
Timestamp:
04/07/03 15:34:51 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc

    r1809 r1910  
    6161
    6262static const TString gsDefName  = "MMultiDimDistCalc";
    63 static const TString gsDefTitle = "Composite Probabilities Loop 1/2";
     63static const TString gsDefTitle = "Calculate Hadronness with Nearest Neighbor/Kernel Method";
     64
    6465// --------------------------------------------------------------------------
    6566//
     
    6869//
    6970MMultiDimDistCalc::MMultiDimDistCalc(const char *name, const char *title)
    70     : fNum(0), fUseKernel(kTRUE), fData(NULL)
     71    : fNum(0), fUseKernel(kTRUE), fHadronnessName("MHadronness"), fData(NULL)
    7172{
    7273    //
     
    151152    }
    152153
    153     fHadronness = (MHadronness*)plist->FindCreateObj("MHadronness");
     154    fHadronness = (MHadronness*)plist->FindCreateObj(fHadronnessName, "MHadronness");
    154155    if (!fHadronness)
    155156        return kFALSE;
     
    208209    }
    209210
    210     Double_t arg;
    211 
    212     if (dg+dh != 0.0)
    213       arg = dg / (dg+dh);
    214     else
    215       arg = 1.e10;
    216     //fHadronness->SetHadronness(arg);
    217 
    218     if (dg != 0.0)
    219       arg = exp(-dh/dg);
    220     else
    221       arg = 0.0;
    222     fHadronness->SetHadronness(arg);
    223      
     211    fHadronness->SetHadronness(dg==0 ? 0 : exp(-dh/dg));
    224212
    225213    return kTRUE;
     
    238226    out << ";" << endl;
    239227
     228    if (fHadronnessName!="MHadronness")
     229        out << "   " << GetUniqueName() << ".SetHadronnessName(\"" << fHadronnessName << "\");" << endl;
    240230    if (fNum!=0)
    241231        out << "   " << GetUniqueName() << ".SetUseNumRows(" << fNum << ");" << endl;
Note: See TracChangeset for help on using the changeset viewer.