Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | -- WilliamBreadenMadden - 2013-08-05 | |||||||
> > | -- WilliamBreadenMadden - 2013-08-27 | |||||||
Line: 695 to 695 | ||||||||
example file: $ROOTSYS/tutorials/histfactory/example_channel.xml | ||||||||
Changed: | ||||||||
< < | <!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'> | |||||||
> > |
| |||||||
| ||||||||
Line: 712 to 713 | ||||||||
<-- | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
caveats | ||||||||
Line: 721 to 721 | ||||||||
A slash must be added to the end of the HistoPath string attribute of the Channel, Data and Sample tags when referencing directories other than the root directory in ROOT files, in such a manner as follows: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
HistoName="myDataHistogram" HistoPath="myDirectory/" /> | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
colon characters in Name attributes | ||||||||
Line: 775 to 772 | ||||||||
| ||||||||
Changed: | ||||||||
< < | <!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'> | |||||||
> > | ||||||||
<-- channel name and input file --> | ||||||||
Line: 820 to 817 | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
| ||||||||
Changed: | ||||||||
< < | <!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'> | |||||||
> > | ||||||||
<-- workspace output file prefix --> | ||||||||
Line: 839 to 836 | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
create XML configuration files automatically | ||||||||
Line: 1066 to 1063 | ||||||||
| ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
create a class representing a preprocess function and add it to a measurement directly using the constructor PreprocessFunction and a method of a measurement object | ||||||||
Changed: | ||||||||
< < | ||||||||
> > |
| |||||||
PreprocessFunction::PreprocessFunction(std::string Name, std::string Expression, std::string Dependents); void AddPreprocessFunction(const std::string& function); %ENDCODE% | ||||||||
Line: 1172 to 1170 | ||||||||
Make the main directory. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
cd ~ mkdir test cd test | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Make the directory for the XML configuration files. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
mkdir config | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Make the directory for the input histogram ROOT files. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
mkdir data | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Make the directory for the workspace. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
mkdir workspaces | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Generate input histograms.Change to the directory for the input histograms. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
cd data | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Run some code such as the following. For fun, we will create a simulated data signal at about 126 GeV at about three times the number of events of that which was expected.
example file: make_test_histograms.c | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
{ // Create the expected signal histogram. // Create the function used to describe the signal shape (a simple Gaussian shape). | ||||||||
Line: 1237 to 1234 | ||||||||
myData->Write(); myFile.Close(); } | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Create the workspace. | ||||||||
Line: 1247 to 1244 | ||||||||
Change to the directory for the configuration XML files. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
cd ~/test/config | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Copy the HistFactory XML schema to the configuration directory. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
cp $ROOTSYS/etc/HistFactorySchema.dtd . | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Create XML configuration files in the configuration directory.
example file: test_top-level.xml | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
<-- workspace output file prefix --> | ||||||||
Line: 1277 to 1273 | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
example file: test_channel.xml | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
<-- channel name and input file --> | ||||||||
Line: 1304 to 1299 | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
As you can see, the model is very simple. There is the expected signal, the expected background and the actual data (in this case, the data is simulated). The point of interest relates to the signal and the expected data will be compared to the actual data.
Run hist2workspace. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
hist2workspace config/test_top-level.xml | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
There should now be created 4 files in the workspaces directory: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
test_workspace_combined_datastat_model.root test_workspace_datastat.root test_workspace_results.table test_workspace_test_datastat_model.root | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
The test_workspace_combined_datastat_model.root file is the ROOT file that contains the combined workspace object (is has constraints, weightings etc. properly incorporated). This is the file you are almost certainly interested in. The test_workspace_test_datastat_model.root file contains a workspace object without proper constraints, weightings etc. I don't know what the other two files are. | ||||||||
Line: 1331 to 1326 | ||||||||
example file: ProfileLikeliHoodCalculator_confidence_level.cpp | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
#include | ||||||||
Line: 1408 to 1402 | ||||||||
myConfidenceInterval->UpperLimit(*myPOI) <<"]\n"<<endl; return 0; } | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Compile this code using a Makefile such as the following:
example file: Makefile | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
ProfileLikeliHoodCalculator_confidence_level.cpp : ProfileLikeliHoodCalculator_confidence_level.cpp g++ -g -O2 -fPIC -Wno-deprecated -o ProfileLikeliHoodCalculator_confidence_level.cpp ProfileLikeliHoodCalculator_confidence_level.cpp `root-config --cflags --libs --ldflags` -lHistFactory -lXMLParser -lRooStats -lRooFit -lRooFitCore -lThread -lMinuit -lFoam -lHtml -lMathMore -I$ROOTSYS/include -L$ROOTSYS/lib | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
Compile the code. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
make | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
resultsThe end result as displayed in the terminal output is the following: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
95% confidence interval on the point of interest SigXsecOverSM: [2.99653, 3.00347] | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | %ENDCODE% | |||||||
further information |