67                  const std::vector< const Node * >& nodes )
 
   72   , fCoefficient   ( 0.0 )
 
   74   , fImportanceRef ( 1.0 )
 
   75   , fRuleEnsemble  ( re )
 
 
   99   , fCoefficient   ( 0.0 )
 
  100   , fImportance    ( 0.0 )
 
  101   , fImportanceRef ( 1.0 )
 
  102   , fRuleEnsemble  ( re )
 
 
  117   , fCoefficient   ( 0.0 )
 
  118   , fImportance    ( 0.0 )
 
  119   , fImportanceRef ( 1.0 )
 
  120   , fRuleEnsemble  ( 0 )
 
 
  143   UInt_t nvars    = fCut->GetNvars();
 
  147      found = (fCut->GetSelector(i) == 
iv);
 
 
  158   fLogger->SetMinType(t);
 
 
  179   else rval = (!(
d<0));
 
 
  194   if (fCut->GetNvars()!=
other.GetRuleCut()->GetNvars()) 
return -1.0; 
 
  196   const UInt_t nvars  = fCut->GetNvars();
 
  215   while ((equal) && (in<nvars)) {
 
  217      equal = ( (fCut->GetSelector(in) == (
otherCut->GetSelector(in))) &&
 
  218                (fCut->GetCutDoMin(in) == (
otherCut->GetCutDoMin(in))) &&
 
  219                (fCut->GetCutDoMax(in) == (
otherCut->GetCutDoMax(in))) );
 
  223            sel   = fCut->GetSelector(in);
 
  224            vminA = fCut->GetCutMin(in);
 
  225            vmaxA = fCut->GetCutMax(in);
 
  229            rms = fRuleEnsemble->GetRuleFit()->GetMethodBase()->GetRMS(
sel);
 
  232            if (fCut->GetCutDoMin(in))
 
  234            if (fCut->GetCutDoMax(in))
 
 
  261   return (fImportance < 
other.GetImportance());
 
 
  278   return fRuleEnsemble->GetMethodBase()->GetInputLabel(i);
 
 
  287      SetRuleEnsemble( 
other.GetRuleEnsemble() );
 
  289      fSSB     = 
other.GetSSB();
 
  290      fSSBNeve = 
other.GetSSBNeve();
 
  291      SetCoefficient(
other.GetCoefficient());
 
  292      SetSupport( 
other.GetSupport() );
 
  293      SetSigma( 
other.GetSigma() );
 
  294      SetNorm( 
other.GetNorm() );
 
  296      SetImportanceRef( 
other.GetImportanceRef() );
 
 
  305   const UInt_t nvars = fCut->GetNvars();
 
  306   if (nvars<1) os << 
"     *** WARNING - <EMPTY RULE> ***" << std::endl; 
 
  311   os << 
"    Importance  = " << 
Form(
"%1.4f", fImportance/fImportanceRef) << std::endl;
 
  312   os << 
"    Coefficient = " << 
Form(
"%1.4f", fCoefficient) << std::endl;
 
  313   os << 
"    Support     = " << 
Form(
"%1.4f", fSupport)  << std::endl;
 
  314   os << 
"    S/(S+B)     = " << 
Form(
"%1.4f", fSSB)  << std::endl;
 
  316   for ( 
UInt_t i=0; i<nvars; i++) {
 
  318      sel    = fCut->GetSelector(i);
 
  319      valmin = fCut->GetCutMin(i);
 
  320      valmax = fCut->GetCutMax(i);
 
  322      os << 
Form(
"* Cut %2d",i+1) << 
" : " << std::flush;
 
  323      if (fCut->GetCutDoMin(i)) os << 
Form(
"%10.3g",
valmin) << 
" < " << std::flush;
 
  324      else                      os << 
"             " << std::flush;
 
  325      os << GetVarName(
sel) << std::flush;
 
  326      if (fCut->GetCutDoMax(i)) os << 
" < " << 
Form(
"%10.3g",
valmax) << std::flush;
 
  327      else                      os << 
"             " << std::flush;
 
 
  337   const UInt_t nvars = fCut->GetNvars();
 
  338   if (nvars<1) Log() << kWARNING << 
"BUG TRAP: EMPTY RULE!!!" << 
Endl;
 
  343   if (title) Log() << kINFO << title;
 
  345         << 
"Importance  = " << 
Form(
"%1.4f", fImportance/fImportanceRef) << 
Endl;
 
  347   for ( 
UInt_t i=0; i<nvars; i++) {
 
  349      Log() << kINFO << 
"            ";
 
  350      sel    = fCut->GetSelector(i);
 
  351      valmin = fCut->GetCutMin(i);
 
  352      valmax = fCut->GetCutMax(i);
 
  354      Log() << kINFO << 
Form(
"Cut %2d",i+1) << 
" : ";
 
  355      if (fCut->GetCutDoMin(i)) Log() << kINFO << 
Form(
"%10.3g",
valmin) << 
" < ";
 
  356      else                      Log() << kINFO << 
"             ";
 
  357      Log() << kINFO << GetVarName(
sel);
 
  358      if (fCut->GetCutDoMax(i)) Log() << kINFO << 
" < " << 
Form(
"%10.3g",
valmax);
 
  359      else                      Log() << kINFO << 
"             ";
 
 
  370   const UInt_t nvars = fCut->GetNvars();
 
  372      << std::setprecision(10)
 
  373      << fImportance << 
" " 
  374      << fImportanceRef << 
" " 
  375      << fCoefficient << 
" " 
  382   os << 
"N(cuts): " << nvars << std::endl; 
 
  383   for ( 
UInt_t i=0; i<nvars; i++) {
 
  384      os << 
"Cut " << i << 
" : " << std::flush;
 
  385      os <<        fCut->GetSelector(i)
 
  386         << std::setprecision(10)
 
  387         << 
" " << fCut->GetCutMin(i)
 
  388         << 
" " << fCut->GetCutMax(i)
 
  389         << 
" " << (fCut->GetCutDoMin(i) ? 
"T":
"F")
 
  390         << 
" " << (fCut->GetCutDoMax(i) ? 
"T":
"F")
 
  393   os << std::setprecision(
dp);
 
 
  401   const UInt_t nvars = fCut->GetNvars();
 
  413   for (
UInt_t i=0; i<nvars; i++) {
 
  418      gTools().
AddAttr( cut, 
"DoMin",    (fCut->GetCutDoMin(i) ? 
"T":
"F") );
 
  419      gTools().
AddAttr( cut, 
"DoMax",    (fCut->GetCutDoMax(i) ? 
"T":
"F") );
 
 
  431   if (
nodeName != 
"Rule") Log() << kFATAL << 
"<ReadFromXML> Unexpected node name: " << 
nodeName << 
Endl;
 
  444   if (fCut) 
delete fCut;
 
  446   fCut->SetNvars( nvars );
 
  456      fCut->SetSelector( i, 
ui );
 
  458      fCut->SetCutMin  ( i, 
d );
 
  460      fCut->SetCutMax  ( i, 
d );
 
  471   if (i != nvars) Log() << kFATAL << 
"<ReadFromXML> Mismatch in number of cuts: " << i << 
" != " << nvars << 
Endl;
 
 
  491   istr >> dummy >> nvars;
 
  496   if (fCut) 
delete fCut;
 
  498   fCut->SetNvars( nvars );
 
  499   for ( 
UInt_t i=0; i<nvars; i++) {
 
  503      fCut->SetSelector(i,
sel);
 
  504      fCut->SetCutMin(i,
cutmin);
 
  505      fCut->SetCutMax(i,
cutmax);
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
ostringstream derivative to redirect and format output
 
A class describing a 'rule cut'.
 
Double_t GetPurity() const
 
Double_t GetCutNeve() const
 
Implementation of a rule.
 
void SetMsgType(EMsgType t)
 
void Copy(const Rule &other)
copy function
 
void PrintLogger(const char *title=nullptr) const
print function
 
Bool_t Equal(const Rule &other, Bool_t useCutValue, Double_t maxdist) const
Compare two rules.
 
void ReadRaw(std::istream &os)
read function (format is the same as written by PrintRaw)
 
void * AddXMLTo(void *parent) const
 
Bool_t operator==(const Rule &other) const
comparison operator ==
 
void Print(std::ostream &os) const
print function
 
virtual ~Rule()
destructor
 
void ReadFromXML(void *wghtnode)
read rule from XML
 
void PrintRaw(std::ostream &os) const
extensive print function used to print info for the weight file
 
const TString & GetVarName(Int_t i) const
returns the name of a rule
 
Bool_t operator<(const Rule &other) const
comparison operator <
 
Double_t RuleDist(const Rule &other, Bool_t useCutValue) const
Returns:
 
Double_t fSSB
S/(S+B) for rule.
 
RuleCut * fCut
all cuts associated with the rule
 
Bool_t ContainsVariable(UInt_t iv) const
check if variable in node
 
Rule()
the simple constructor
 
Double_t fSSBNeve
N(events) reaching the last node in reevaluation.
 
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)
 
MsgLogger & Endl(MsgLogger &ml)