This file is indexed.

/usr/include/root/RooStats/MinNLLTestStat.h is in libroot-roofit-dev 5.34.00-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// @(#)root/roostats:$Id: MinNLLTestStat.h 43035 2012-02-16 16:48:57Z sven $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
// Additional Contributions: Giovanni Petrucciani 
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOSTATS_MinNLLTestStat
#define ROOSTATS_MinNLLTestStat

//_________________________________________________
/*
BEGIN_HTML
<p>
MinNLLTestStat is an implementation of the TestStatistic interface that calculates the minimum value of the negative log likelihood
function and returns it as a test statistic.
Internaly it operates by delegating to a MinNLLTestStat object.
</p>
END_HTML
*/
//

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

#include <vector>

#include "RooStats/RooStatsUtils.h"

//#include "RooStats/DistributionCreator.h"
#include "RooStats/SamplingDistribution.h"
#include "RooStats/TestStatistic.h"

#include "RooStats/RooStatsUtils.h"

#include "RooRealVar.h"
#include "RooProfileLL.h"
#include "RooNLLVar.h"
#include "RooMsgService.h"

#include "RooMinuit.h"
#include "RooMinimizer.h"
#include "Math/MinimizerOptions.h"
#include "TStopwatch.h"
#include "ProfileLikelihoodTestStat.h"

namespace RooStats {

  class MinNLLTestStat : public TestStatistic{

   public:
     MinNLLTestStat() {
        // Proof constructor. Do not use.
	fProflts = 0;
     }
     MinNLLTestStat(RooAbsPdf& pdf) {
	fProflts = new ProfileLikelihoodTestStat(pdf);
     }

     MinNLLTestStat(const MinNLLTestStat& rhs) : fProflts(0) {
        RooAbsPdf * pdf = rhs.fProflts->GetPdf();
        if (pdf)  fProflts = new ProfileLikelihoodTestStat(*pdf);
     }

     MinNLLTestStat & operator=(const MinNLLTestStat& rhs)  {
        if (this == &rhs) return *this;
        RooAbsPdf * pdf = rhs.fProflts->GetPdf();
        if (fProflts) delete fProflts;
        fProflts = NULL;
        if (pdf)  fProflts = new ProfileLikelihoodTestStat(*pdf);
        return *this;
     }

     virtual ~MinNLLTestStat() {
	delete fProflts;
     }

     void SetOneSided(Bool_t flag=true) {fProflts->SetOneSided(flag);}
     void SetOneSidedDiscovery(Bool_t flag=true) {fProflts->SetOneSidedDiscovery(flag);}
     void SetReuseNLL(Bool_t flag) { fProflts->SetReuseNLL(flag); }
     void SetMinimizer(const char* minimizer){ fProflts->SetMinimizer(minimizer); }
     void SetStrategy(Int_t strategy){ fProflts->SetStrategy(strategy); }
     void SetTolerance(double tol){ fProflts->SetTolerance(tol); }
     void SetPrintLevel(Int_t printlevel){ fProflts->SetPrintLevel(printlevel); }
    
     // Main interface to evaluate the test statistic on a dataset
     virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInterest) {
        return fProflts->EvaluateProfileLikelihood(1, data, paramsOfInterest); //find unconditional NLL minimum
     }

     virtual void EnableDetailedOutput( bool e=true ) { fProflts->EnableDetailedOutput(e); }

     virtual const RooArgSet* GetDetailedOutput(void) const {
	     // Returns detailed output. The value returned by this function is updated after each call to Evaluate().
	     // The returned RooArgSet contains the following:
	     // <ul>
	     // <li> the minimum nll, fitstatus and convergence quality for each fit </li> 
	     // <li> for all non-constant parameters their value, error and pull </li>
	     // </ul>
	     return fProflts->GetDetailedOutput();
     }
    
     virtual void SetVarName(const char* name) { fProflts->SetVarName(name); }

     virtual const TString GetVarName() const { return fProflts->GetVarName(); }

   private:
     ProfileLikelihoodTestStat* fProflts;

   protected:
      ClassDef(MinNLLTestStat,1)   // implements the minimum NLL as a test statistic to be used with several tools
   };
}


#endif