Difference: HiggsAnalysisAtATLASUsingRooStats (43 vs. 44)

Revision 442013-08-27 - WilliamBreadenMadden

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
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'>
>
>
%CODE{"html"}%
  InputFile="./data/example.root" HistoName="" > HistoName="data" HistoPath="" />
Line: 712 to 713
 
<-- HistoPathHigh="" HistoPathLow="histForSyst4"/>-->
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:
<
<


>
>
%CODE{"html"}%
 HistoName="myDataHistogram" HistoPath="myDirectory/" />
Changed:
<
<
>
>
%ENDCODE%
 
colon characters in Name attributes
Line: 775 to 772
  example file: ttH_m110_channel.xml
Changed:
<
<
<!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'>
>
>
%CODE{"html"}%
 
<-- channel name and input file -->
InputFile="data/ttH_histograms.root" HistoName="">
Line: 820 to 817
 

Changed:
<
<
>
>
%ENDCODE%
  example file: ttH_m110_top-level.xml
Changed:
<
<
<!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'>
>
>
%CODE{"html"}%
 
<-- workspace output file prefix -->
OutputFilePrefix="workspaces/ttH_m110_workspace" Mode="comb" >
Line: 839 to 836
 

Changed:
<
<
>
>
%ENDCODE%
 
create XML configuration files automatically
Line: 1066 to 1063
  %CODE{"c++"}% void AddPreprocessFunction(std::string name, std::string expression, std::string dependencies);
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:
<
<

>
>
%CODE{"c++"}%
 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:
<
<
>
>
%CODE{"bash"}%
 cd ~ mkdir test cd test
Changed:
<
<
>
>
%ENDCODE%
  Make the directory for the XML configuration files.
Changed:
<
<
>
>
%CODE{"bash"}%
 mkdir config
Changed:
<
<
>
>
%ENDCODE%
  Make the directory for the input histogram ROOT files.
Changed:
<
<
>
>
%CODE{"bash"}%
 mkdir data
Changed:
<
<
>
>
%ENDCODE%
  Make the directory for the workspace.
Changed:
<
<
>
>
%CODE{"bash"}%
 mkdir workspaces
Changed:
<
<
>
>
%ENDCODE%
 

Generate input histograms.

Change to the directory for the input histograms.

Changed:
<
<
>
>
%CODE{"bash"}%
 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:
<
<

>
>
%CODE{"c++"}%
 { // 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:
<
<
>
>
%CODE{"bash"}%
 cd ~/test/config
Changed:
<
<
>
>
%ENDCODE%
  Copy the HistFactory XML schema to the configuration directory.
Changed:
<
<
>
>
%CODE{"bash"}%
 cp $ROOTSYS/etc/HistFactorySchema.dtd .
Changed:
<
<
>
>
%ENDCODE%
  Create XML configuration files in the configuration directory.

example file: test_top-level.xml
Changed:
<
<

>
>
%CODE{"html"}%
 

<-- workspace output file prefix -->
Line: 1277 to 1273
 

Changed:
<
<
>
>
%ENDCODE%
 
example file: test_channel.xml
Changed:
<
<

>
>
%CODE{"html"}%
 

<-- 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:
<
<
>
>
%CODE{"bash"}%
 hist2workspace config/test_top-level.xml
Changed:
<
<
>
>
%ENDCODE%
  There should now be created 4 files in the workspaces directory:
Changed:
<
<
>
>
%CODE{"bash"}%
 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:
<
<

>
>
%CODE{"c++"}%
 #include #include #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:
<
<

>
>
%CODE{"bash"}%
 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:
<
<
>
>
%CODE{"bash"}%
 make
Changed:
<
<
>
>
%ENDCODE%
 

results

The end result as displayed in the terminal output is the following:

Changed:
<
<
>
>
%CODE{"bash"}%
 95% confidence interval on the point of interest SigXsecOverSM: [2.99653, 3.00347]
Changed:
<
<
>
>
%ENDCODE%
 

further information

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback