Skip to content
Snippets Groups Projects
Commit 5aa3783c authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

merge changes done in dev branch from Kyle (revisions: 37177:37185 )

git-svn-id: http://root.cern.ch/svn/root/trunk@37194 27541ba8-7e3a-0410-8455-c3a389f83636
parent a8d8c80a
No related branches found
No related tags found
No related merge requests found
...@@ -646,8 +646,16 @@ namespace HistFactory{ ...@@ -646,8 +646,16 @@ namespace HistFactory{
string prefix, range; string prefix, range;
///////////////////////////// /////////////////////////////
// observed data // Make observables, set values to observed data if data is specified,
if (summary.at(0).name=="Data") ProcessExpectedHisto(summary.at(0).nominal,proto,"obsN","","",0,100000,fLowBin,fHighBin); // otherwise use expected "Asimov" data
if (summary.at(0).name=="Data") {
ProcessExpectedHisto(summary.at(0).nominal,proto,"obsN","","",0,100000,fLowBin,fHighBin);
} else {
cout << "Will use expected (\"Asimov\") data set" << endl;
ProcessExpectedHisto(NULL,proto,"obsN","","",0,100000,fLowBin,fHighBin);
}
///////////////////////////// /////////////////////////////
// shared parameters // shared parameters
......
...@@ -5,8 +5,11 @@ ...@@ -5,8 +5,11 @@
--> -->
<!-- <!--
Configuration for the ee channel. Should be mainly self-explanatory. Top-level configuration, details for the example channel are in example_channel.xml.
NormalizedByTheory should be "True" (not "TRUE" or "true") for all non-data-driven background This is the input file to the executable.
Note: Config.dtd needs to be accessible. It can be found in ROOT release area.
The file system path is relative to location of this XML file, not the executable.
--> -->
<!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'> <!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'>
...@@ -15,7 +18,13 @@ ...@@ -15,7 +18,13 @@
<Input>./config/example_channel.xml</Input> <Input>./config/example_channel.xml</Input>
<Measurement Name="Example" Lumi="10" LumiRelErr="0.05" BinLow="0" BinHigh="2" Mode="comb"> <Measurement Name="GammaExample" Lumi="1." LumiRelErr="0.1" BinLow="0" BinHigh="2" Mode="comb" >
<POI>SigXsecOverSM</POI>
<ParamSetting Const="True">Lumi alpha_syst1</ParamSetting>
<ConstraintTerm Type="Gamma" RelativeUncertainty="1.4">syst2</ConstraintTerm>
</Measurement>
<Measurement Name="ConstExample" Lumi="1." LumiRelErr="0.1" BinLow="0" BinHigh="2" Mode="comb" ExportOnly="True">
<POI>SigXsecOverSM</POI> <POI>SigXsecOverSM</POI>
<ParamSetting Const="True">Lumi alpha_syst1</ParamSetting> <ParamSetting Const="True">Lumi alpha_syst1</ParamSetting>
</Measurement> </Measurement>
......
<!--
Single channel configuration exampple.
The top level configuration XML is example.xml
NormalizedByTheory should be "True" (not "TRUE" or "true") for all non-data-driven backgrounds.
If you comment or remove the <Data> tag then it will use the expected data.
Histogram inputs should be in pb and in top-level xml the lumi should be in 1/pb
(The important thing is that they match... fb and 1/fb is also ok)
Note: Config.dtd needs to be accessible. It can be found in ROOT release area.
The file system path is relative to location of this XML file, not the executable.
-->
<!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'> <!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'>
<Channel Name="channel1" InputFile="./data/example.root" HistoName="" > <Channel Name="channel1" InputFile="./data/example.root" HistoName="" >
<!--<Data Name="data" InputFile="" HistoPath="" HistoName=""/>--> <Data HistoName="data" HistoPath="" />
<Sample Name="signal" HistoPath="" HistoName="signal"> <Sample Name="signal" HistoPath="" HistoName="signal">
<OverallSys Name="syst1" High="1.05" Low="0.95"/> <OverallSys Name="syst1" High="1.05" Low="0.95"/>
<NormFactor Name="SigXsecOverSM" Val="1" Low="0.5" High="1.8" Const="True" /> <NormFactor Name="SigXsecOverSM" Val="1" Low="0." High="3." Const="True" />
</Sample> </Sample>
<Sample Name="background1" HistoPath="" NormalizeByTheory="True" HistoName="background1"> <Sample Name="background1" HistoPath="" NormalizeByTheory="True" HistoName="background1">
<OverallSys Name="syst2" Low="0.95" High="1.05"/> <OverallSys Name="syst2" Low="0.95" High="1.05"/>
......
makeExample(){ makeExample(){
TFile* example = new TFile("example.root","RECREATE"); TFile* example = new TFile("example.root","RECREATE");
TH1F* data = new TH1F("data","data", 2,1,2);
TH1F* signal = new TH1F("signal","signal histogram (pb)", 2,1,2); TH1F* signal = new TH1F("signal","signal histogram (pb)", 2,1,2);
TH1F* background1 = new TH1F("background1","background 1 histogram (pb)", 2,1,2); TH1F* background1 = new TH1F("background1","background 1 histogram (pb)", 2,1,2);
TH1F* background2 = new TH1F("background2","background 2 histogram (pb)", 2,1,2); TH1F* background2 = new TH1F("background2","background 2 histogram (pb)", 2,1,2);
// run with 1 pb
data->SetBinContent(1,122);
data->SetBinContent(2,112);
signal->SetBinContent(1,20); signal->SetBinContent(1,20);
signal->SetBinContent(2,10); signal->SetBinContent(2,10);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment