-
Notifications
You must be signed in to change notification settings - Fork 4
Example 1 Generating a covariance matrix
In this example we will use the provided toy analysis root files to generate a covariance matrix via re-weighting.
In this simplified example we will have
- 1 Mode (nu)
- 1 Detector (uboone)
- 3 Channels:
- e channel (nue) with 2 subchannels: intrinsic nue (intrinsic) and lee signal (leesignal)
- mu channel (numu) with 1 subchannel: intrinsic numu (intrinsic)
- CCpi0 sideband channel 1 subchannel: intrinsic numu (intrinsic)
This is included in the example.xml as follows:
<mode name="nu" use="1"/>
<detector name="uBooNE" use="1" />
<channel name="nue" unit="MeV" use="1" numbins="16">
<bins edges="100 200 300 400 500 600 700 800 900 1000 1200 1400 1600 1800 2000 2500 3000" />
<subchannel name="intrinsic" use="1" osc = "0"/>
<subchannel name="leesignal" use="1" osc = "0"/>
</channel>
<channel name="numu" unit="MeV" use="1" numbins="16">
<bins edges="100 200 300 400 500 600 700 800 900 1000 1200 1400 1600 1800 2000 2500 3000"/>
<subchannel name="intrinsic" use="1" osc = "0"/>
</channel>
<channel name="ccpi0" unit="MeV" use="1" numbins="6">
<bins edges="0 200 400 600 800 1000 2000" />
<subchannel name="intrinsic" use="1" osc = "0"/>
</channel>
So we have a total of 4 subchannel spectra
- nu_uboone_nue_intrinsic
- nu_uboone_nue_leesignal
- nu_uboone_numu_intrinsic
- nu_uboone_ccpi0_intrinsic
but only 3 physics channel spectra (made from adding each channels subchannels)
- nu_uboone_nue
- nu_uboone_numu
- nu_uboone_ccpi0
In addition to the layout of the modes, detectors, channels and subchannels, the .xml configuration also need to know where the data lives and what branches in those files are associated with each subchannel. For more on the format required of the files please see here. For this example we have 4 files:
ls /uboone/data/users/markross/SBNfit_example_data/
signal.root
1e1p.root
1m1p.root
ccpi0.root
We want to associate a branch in each file with a subchannel as defined in the .xml. E.g we want the branch ereco in the TTree events of file 1m1p.root to be associated to the subchannel nu_uboone_numu_intrinsic. This is included in the .xml in a relatively self explanatory way as follows:
<MultisimFile treename="events" filename="/uboone/data/users/markross/SBNfit_example_data/1m1p.root" scale ="1.0" maxevents ="50000" >
<parameters names = "ALL"/>
<branch
name="ereco"
type="double"
associated_subchannel="nu_uBooNE_numu_intrinsic"
/>
</MultisimFile>
The scale attribute allows for an overall normalization for the file if you wish to model a certain POT, and the maxevents attribute useful for running over a smaller subset for quick tests. Note the branch attribute name must correspond exactly to the TTree branch name and the associated_subchannel must match one as defined in the .xml file.
If compilation was successful, in /build/example there will be an executable example1 . Running this is as as straightforward as pointing to the configuration file that you wish to run on:
`./example1 --xml ../../xml/example.xml``
For this particular example (if using the example.xml exactly as is) it should take ~3-4 mins on the gpvms.