/usr/include/root/RooStats/HybridCalculator.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 | // @(#)root/roostats:$Id: HybridCalculator.h 43199 2012-03-01 20:17:42Z moneta $
// Author: Sven Kreiss, Kyle Cranmer Nov 2010
/*************************************************************************
* 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_HybridCalculator
#define ROOSTATS_HybridCalculator
//_________________________________________________
/*
BEGIN_HTML
<p>
This class extends the HybridCalculator with Importance Sampling. The use
of ToyMCSampler as the TestStatSampler is assumed.
</p>
END_HTML
*/
//
#ifndef ROOSTATS_HypoTestCalculatorGeneric
#include "RooStats/HypoTestCalculatorGeneric.h"
#endif
#ifndef ROOSTATS_ToyMCSampler
#include "RooStats/ToyMCSampler.h"
#endif
namespace RooStats {
class HybridCalculator : public HypoTestCalculatorGeneric {
public:
HybridCalculator(
const RooAbsData &data,
const ModelConfig &altModel,
const ModelConfig &nullModel,
TestStatSampler* sampler=0
) :
HypoTestCalculatorGeneric(data, altModel, nullModel, sampler),
fPriorNuisanceNull(0),
fPriorNuisanceAlt(0),
fNToysNull(-1),
fNToysAlt(-1),
fNToysNullTail(0),
fNToysAltTail(0)
{
}
~HybridCalculator() {
}
// Override the distribution used for marginalizing nuisance parameters that is infered from ModelConfig
virtual void ForcePriorNuisanceNull(RooAbsPdf& priorNuisance) { fPriorNuisanceNull = &priorNuisance; }
virtual void ForcePriorNuisanceAlt(RooAbsPdf& priorNuisance) { fPriorNuisanceAlt = &priorNuisance; }
// set number of toys
void SetToys(int toysNull, int toysAlt) { fNToysNull = toysNull; fNToysAlt = toysAlt; }
// set least number of toys in tails
void SetNToysInTails(int toysNull, int toysAlt) { fNToysNullTail = toysNull; fNToysAltTail = toysAlt; }
protected:
// check whether all input is consistent
int CheckHook(void) const;
// configure TestStatSampler for the Null run
int PreNullHook(RooArgSet* /*parameterPoint*/, double obsTestStat) const;
// configure TestStatSampler for the Alt run
int PreAltHook(RooArgSet* /*parameterPoint*/, double obsTestStat) const;
protected:
RooAbsPdf *fPriorNuisanceNull;
RooAbsPdf *fPriorNuisanceAlt;
// different number of toys for null and alt
int fNToysNull;
int fNToysAlt;
// adaptive sampling
int fNToysNullTail;
int fNToysAltTail;
protected:
ClassDef(HybridCalculator,1)
};
}
#endif
|