| 236 | |
| 237 | === Covariance Structure === |
| 238 | Covariance objects are used by NUISANCE to assign likelihood penalty terms to parameters as well as define appropriate parameter throws when studying systematic uncertainties. They can be specified in the card file by providing the 'covar' structure, plus an ID, input definition, and state. |
| 239 | {{{ |
| 240 | <covar name="ID" input="TYPE:INPUT" type="STATE" /> |
| 241 | }}} |
| 242 | - **ID** : Unique ID specified by the user so they can keep track of this covariance class in the output file. Saved objects from this covariance will be labeled 'ID_label' (e.g. ID_central). |
| 243 | - **TYPE** : Covariance type. There are multiple ways to define a covariance, with some examples of these types below. |
| 244 | - **INPUT** : Input definition, this depends a lot on what the **TYPE** is defined as. Some examples are below. |
| 245 | - **STATE** : State of this covariance, used to tell NUISANCE whether it should use it to apply a likelihood penalty (e.g. GAUSPULL), use it to throw parameters (e.g. GAUSTHROW), or both. |
| 246 | |
| 247 | ==== Single uncorrelated dial covariances ==== |
| 248 | To tell NUISANCE to make a covariance for a single dial, you can specifiy the covariance type as 'DIAL' |
| 249 | {{{ |
| 250 | <covar name="ID" input="DIAL:NAME;CENTRAL;WIDTH" type="STATE" /> |
| 251 | }}} |
| 252 | - **NAME** : Name of the RW dial. This dial should have also already been setup using one of the 'parameter' structures shown above. |
| 253 | - **CENTRAL** : Central value for this dial used in the covariance. For example when you want to include the result from a previous fit, this should be set to the best fit value from that fit. |
| 254 | - **WIDTH** : Error on the parameter about the central value. Used as the Gaussian width when generating parameter throws. For example when you want to include the result from a previous fit, this should be set to the best fit error from that fit. |
| 255 | |
| 256 | |
| 257 | ** Example 1 ** : Covariance used to throw MaCCQE uncorrelated in nuissyst using MaCCQE=0.0+-1.0 |
| 258 | {{{ |
| 259 | <parameter type="genie_parameter" name="MaCCQE" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 260 | <covar name="MaThrow" input="DIAL:MaCCQE;0.0;1.0" type="GAUSTHROW" /> |
| 261 | }}} |
| 262 | |
| 263 | ** Example 2 ** : Covariance used to apply an additional MaCCQE pull in nuismin using MaCCQE=0.0+-1.0 |
| 264 | {{{ |
| 265 | <parameter type="genie_parameter" name="MaCCQE" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 266 | <covar name="MaTPull" input="DIAL:MaCCQE;0.0;1.0" type="GAUSPULL" /> |
| 267 | }}} |
| 268 | |
| 269 | ==== Correlated dial covariances ==== |
| 270 | To tell NUISANCE to make a covariance for multiple parameters that have some correlations between the, you can specifiy the covariance type as 'ROOT' and provide a ROOT input file containing the covariaince |
| 271 | {{{ |
| 272 | <covar name="ID" input="ROOT:FILEPATH;DIAL_HIST;COVARIANCE_HIST" type="STATE" /> |
| 273 | }}} |
| 274 | - **FILEPATH** : Path to a ROOT file containing the covariance information |
| 275 | - **DIAL_HIST** : Name of a TH1D inside **FILEPATH**. This TH1D should be created such that each bin corresponds to a different dial, with the bin contents set to the best fit value for that dial, and the bin label set to the dial name. A good example of such a histogram is given in the standard output of nuismin called 'fit_dials'. |
| 276 | - **COVARIANCE_HIST** : Name of a TH2D inside **FILEPATH**. This TH2D should be created such that each bin in x and y corresponds to a different dial, with the bin contents set to the covariance between each dial according to the bins x and y position, and the bin labels set to the corresponding dial names. A good example of such a histogram is given in the standard output of nuismin called 'fit_dials_free'. |
| 277 | |
| 278 | The following examples assume you have a root histogram called myfitresult.root, containing a TH1D called 'fitresults' with the dial central values in it, and a TH2D covariance histogram called 'cov', and that both these histograms describe the central values and covariance for the 'MaCCQE' and 'MaCCRES' dials. |
| 279 | |
| 280 | ** Example 1 ** : Covariance ROOT file used to throw MaCCQE and MaCCRES using nuissyst |
| 281 | {{{ |
| 282 | <parameter type="genie_parameter" name="MaCCQE" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 283 | <parameter type="genie_parameter" name="MaCCRES" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 284 | <covar name="CovarThrow" input="ROOT:/path/to/myfitresult.root;fitresults;cov" type="GAUSTHROW" /> |
| 285 | }}} |
| 286 | |
| 287 | ** Example 1 ** : Covariance ROOT file used to apply a pull to MaCCQE and MaCCRES using nuismin, where fitresult.root is in the current directory |
| 288 | {{{ |
| 289 | <parameter type="genie_parameter" name="MaCCQE" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 290 | <parameter type="genie_parameter" name="MaCCRES" nominal="0.0" low="-3.0" high="3.0" step="1.0" state="FREE" /> |
| 291 | <covar name="CoverPull" input="ROOT:myfitresult.root;fitresults;cov" type="GAUSPULL" /> |
| 292 | }}} |
| 293 | |
| 294 | === Config Structure === |
| 295 | Configuration options can be given at runtime by including them in the card file using the 'config' structure. |
| 296 | {{{ |
| 297 | <config NAME="VALUE" /> |
| 298 | }}} |
| 299 | - **NAME** : Name of configuration parameter |
| 300 | - **VALUE** : Value of configuration parameter |
| 301 | |
| 302 | Including a configuration option will override the defaults given in 'parameters/config.xml'. Multiple configuration options can be overridden at once by listing them on separate lines in the card file. |
| 303 | |
| 304 | **Example 1 ** : Change the verbosity level |
| 305 | {{{ |
| 306 | <config VERBOSITY="1" /> |
| 307 | }}} |
| 308 | |
| 309 | **Example 2 ** : Change the verbosity level and set the maximum number of events to run over |
| 310 | {{{ |
| 311 | <config VERBOSITY="2" /> |
| 312 | <config MAXEVENTS"25000" /> |
| 313 | }}} |
| 314 | |
| 315 | |
| 316 | === Comments Structure === |
| 317 | Comments can be inserted into the simple card format by using the '#' symbol at the start of a line. |
| 318 | {{{ |
| 319 | <!-- Insert my comments here --> |
| 320 | }}} |
| 321 | |
| 322 | ** Example 1: ** |
| 323 | {{{ |
| 324 | <!-- These are my config options --> |
| 325 | <config VERBOSITY="4" /> |
| 326 | }}} |
| 327 | |
| 328 | ** Example 2: ** |
| 329 | {{{ |
| 330 | <!-- I Like making comments --> |
| 331 | config VERBOSITY 4 |
| 332 | |
| 333 | <!-- |
| 334 | I like it a lot. |
| 335 | I can make multiple line comments. |
| 336 | I can also comment out other structures to 'turn them off' |
| 337 | --> |
| 338 | <!-- sample MiniBooNE_CCQE_XSec_1DQ2_nu NEUT:/path/to/neut/file.root --:> |
| 339 | }}} |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 | |