Project

General

Profile

Reproducing the nue 2017 Analysis results » History » Version 34

Shiqi Yu, 04/10/2018 04:20 PM

1 24 Erika Catano Mur
{{>toc}}
2 24 Erika Catano Mur
3 1 Christopher Backhouse
h1. Reproducing the nue 2017 Analysis results
4 1 Christopher Backhouse
5 24 Erika Catano Mur
%{color:orchid} TODO everywhere: what you need, how long does it take to run%
6 24 Erika Catano Mur
%{color:orchid} TODO everywhere: better links to repo%
7 24 Erika Catano Mur
8 25 Erika Catano Mur
h2. Set up the appropriate release
9 25 Erika Catano Mur
10 27 Erika Catano Mur
The 2017 analysis branch is "R17-11-22-2017ana-br":https://cdcvs.fnal.gov/redmine/projects/novaart/repository/show/branches/R17-11-22-2017ana-br. The most recent tagged release is "R17-11-22-2017ana.a":https://cdcvs.fnal.gov/redmine/projects/novaart/repository/show/tags/R17-11-22-2017ana.a.
11 27 Erika Catano Mur
12 27 Erika Catano Mur
Setup the release and check out @CAFAna@
13 27 Erika Catano Mur
<pre>
14 27 Erika Catano Mur
setup_nova -b maxopt -r R17-11-22-2017ana.a
15 27 Erika Catano Mur
newrel -t R17-11-22-2017ana.a rel_2017ana
16 27 Erika Catano Mur
cd rel_2017ana/
17 27 Erika Catano Mur
srt_setup -a
18 34 Shiqi Yu
addpkg_svn -b CAFAna R17-11-22-2017ana-br 
19 27 Erika Catano Mur
</pre>
20 27 Erika Catano Mur
21 27 Erika Catano Mur
Learn more about "releases and release branches":https://cdcvs.fnal.gov/redmine/projects/novaart/wiki/NOvA_Snapshot_and_Release_Policy.
22 27 Erika Catano Mur
23 28 Erika Catano Mur
---
24 25 Erika Catano Mur
25 1 Christopher Backhouse
h2. Datasets
26 1 Christopher Backhouse
27 31 Erika Catano Mur
The details of all datasets are always available on "the official datasets page":http://nusoft.fnal.gov/nova/production/production3/index.html, but below are the key concat datasets you're most likely to start with.
28 24 Erika Catano Mur
(NB: The Decaf Cuts live in CAFAna/Cuts/NueCuts2017.h for both ND and FD, See also: [[Reproducing the nue 2017 Analysis results#Creating concats|Creating concats]] below)
29 1 Christopher Backhouse
30 31 Erika Catano Mur
The "Prod3Loaders":https://cdcvs.fnal.gov/redmine/projects/novaart/repository/entry/branches/R17-11-22-2017ana-br/CAFAna/Analysis/Prod3Loaders.h ("doxygen":http://nusoft.fnal.gov/nova/novasoft/doxygen/html/classana_1_1Prod3LoadersBase.html) class is designed to retrieve appropriate nominal and systematic datasets, for @caf@,@decaf@,@sumdecaf@.
31 31 Erika Catano Mur
For the nue analysis, the @nue_or_numu_or_nus@ datasets have preselection cuts that are incompatible with the analysis cuts. Always double-check that the definitions printed on-screen are what you'd expect.
32 24 Erika Catano Mur
33 31 Erika Catano Mur
{{collapse(View list of nue concat datasets)
34 29 Erika Catano Mur
35 32 Erika Catano Mur
*ND data*
36 2 Christopher Backhouse
37 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.d_nd_numi_fhc_full_v1_goodruns_nue2017@
38 2 Christopher Backhouse
39 32 Erika Catano Mur
*ND nominal*
40 2 Christopher Backhouse
41 2 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1_nue2017@
42 2 Christopher Backhouse
43 32 Erika Catano Mur
*FD nominal*
44 2 Christopher Backhouse
45 7 Christopher Backhouse
* -@prod_sumdecaf_R17-03-01-prod3reco.g_fd_genie_nonswap_fhc_nova_v08_full_v1_nue2017@-
46 7 Christopher Backhouse
* -@prod_sumdecaf_R17-03-01-prod3reco.g_fd_genie_fluxswap_fhc_nova_v08_full_v1_nue2017@-
47 7 Christopher Backhouse
* -@prod_sumdecaf_R17-03-01-prod3reco.g_fd_genie_tau_fhc_nova_v08_full_v1_nue2017@-
48 7 Christopher Backhouse
49 7 Christopher Backhouse
(these were with the bad calibrations (uncalibrated hits in low gains) and cosmic-overlay-driven run-matching issue (missing 13 and 14 DB in period 1). Superceded by the below).
50 7 Christopher Backhouse
51 7 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1_nue2017@
52 7 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1_nue2017@
53 2 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1_nue2017@
54 2 Christopher Backhouse
55 32 Erika Catano Mur
*ND systematics*
56 13 Nitish Nayak
57 1 Christopher Backhouse
* -@prod_sumdecaf_R17-03-01-prod3reco.h_nd_genie_nonswap_fhc_nova_v08_full_ckv-proton-shift-down_v1_nue2017@-
58 13 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.h_nd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v1_nue2017@-
59 13 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.h_nd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v1_nue2017@-
60 1 Christopher Backhouse
61 13 Nitish Nayak
(these were with the bad calibrations (uncalibrated hits in low gains) and cosmic-overlay-driven run-matching issue (missing 13 and 14 DB in period 1). Superceded by the below).
62 13 Nitish Nayak
63 13 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_nd_genie_nonswap_fhc_nova_v08_full_ckv-proton-shift-down_v1_nue2017@
64 13 Nitish Nayak
65 13 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_nd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v1_nue2017@
66 13 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_nd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v1_nue2017@
67 13 Nitish Nayak
68 4 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.j_nd_genie_nonswap_fhc_nova_v08_full_calib-shift-nd-func_v1_nue2017@
69 1 Christopher Backhouse
70 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.h_nd_genie_nonswap_fhc_nova_v08_periods1235_calib-shift-nd-xyview-pos-offset_v1_nue2017@
71 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.h_nd_genie_nonswap_fhc_nova_v08_periods1235_calib-shift-nd-xyview-neg-offset_v1_nue2017@
72 1 Christopher Backhouse
73 13 Nitish Nayak
The concat for ND MC light-level no-shift are also shown here as a cross-check :
74 13 Nitish Nayak
75 13 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_nd_genie_nonswap_fhc_nova_v08_full_lightmodel-noshift_v1_nue2017@
76 13 Nitish Nayak
77 13 Nitish Nayak
78 32 Erika Catano Mur
*FD systematics*
79 1 Christopher Backhouse
80 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_ckv-proton-shift-down_v1_nue2017@-
81 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_ckv-proton-shift-down_v1_nue2017@-
82 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_ckv-proton-shift-down_v1_nue2017@-
83 2 Christopher Backhouse
84 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v1_nue2017@-
85 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v1_nue2017@-
86 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_lightmodel-lightdown-calibup_v1_nue2017@-
87 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v1_nue2017@-
88 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v1_nue2017@-
89 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_lightmodel-lightup-calibdown_v1_nue2017@-
90 1 Christopher Backhouse
91 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@-
92 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@-
93 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@-
94 1 Christopher Backhouse
95 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@-
96 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@-
97 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@-
98 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@-
99 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@-
100 10 Nitish Nayak
* -@prod_sumdecaf_R17-03-01-prod3reco.j_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@-
101 1 Christopher Backhouse
102 10 Nitish Nayak
(same as for FD MC, superceded by the following)
103 10 Nitish Nayak
104 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_ckv-proton-shift-down_v2_nue2017@
105 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v2_nue2017@
106 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v2_nue2017@
107 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@
108 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@
109 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@
110 10 Nitish Nayak
111 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_ckv-proton-shift-down_v2_nue2017@
112 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_lightmodel-lightup-calibdown_v2_nue2017@
113 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_lightmodel-lightdown-calibup_v2_nue2017@
114 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@
115 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@
116 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@
117 1 Christopher Backhouse
118 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_ckv-proton-shift-down_v2_nue2017@
119 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_lightmodel-lightup-calibdown_v2_nue2017@
120 12 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_lightmodel-lightdown-calibup_v2_nue2017@
121 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-func_v1_nue2017@
122 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-xyview-pos-offset_v1_nue2017@
123 10 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_calib-shift-fd-xyview-neg-offset_v1_nue2017@
124 12 Nitish Nayak
125 12 Nitish Nayak
The concats for FD MC light-level no-shift are also shown here as a cross-check :
126 12 Nitish Nayak
127 19 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_lightmodel-noshift_v2_nue2017@                                                                                                    
128 19 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_lightmodel-noshift_v2_nue2017@                                                                                                   
129 20 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_lightmodel-noshift_v2_nue2017@
130 1 Christopher Backhouse
131 32 Erika Catano Mur
*FD Rock+Cosmic Singles*
132 23 Nitish Nayak
133 23 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.m_fd_rock+cosmic-overlay_genie_nonswap_fhc_nova_v08_full_v2_nue2017@
134 23 Nitish Nayak
* @prod_sumdecaf_R17-03-01-prod3reco.m_fd_rock+cosmic-overlay_genie_fluxswap_fhc_nova_v08_full_v2_nue2017@
135 23 Nitish Nayak
136 32 Erika Catano Mur
*FD Cosmic Data*
137 1 Christopher Backhouse
138 1 Christopher Backhouse
* @prod_sumdecaf_R17-03-01-prod3reco.h_fd_cosmic_full_v1_goodruns_nue2017@
139 13 Nitish Nayak
140 32 Erika Catano Mur
*FD Data*
141 13 Nitish Nayak
142 13 Nitish Nayak
The unblinded definitions are here : 
143 13 Nitish Nayak
144 21 Nitish Nayak
* -@prod_restricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_full_v1_goodruns_nue2017@ // 200 files-
145 22 Nitish Nayak
146 21 Nitish Nayak
Above concats have mangled events, use the below for unblinded :
147 22 Nitish Nayak
148 21 Nitish Nayak
* @prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_full_v1_goodruns_nue2017@ // 200 files
149 13 Nitish Nayak
150 13 Nitish Nayak
Blinded :
151 13 Nitish Nayak
152 1 Christopher Backhouse
* @prod_decaf_R17-03-01-prod3reco.k_fd_numi_fhc_full_v1_goodruns_nue2017@ // 200 files
153 1 Christopher Backhouse
154 29 Erika Catano Mur
}}
155 24 Erika Catano Mur
156 24 Erika Catano Mur
---
157 24 Erika Catano Mur
158 1 Christopher Backhouse
h2. Central weights
159 1 Christopher Backhouse
160 1 Christopher Backhouse
All plots should be using these weights, which adjust the flux and cross-sections to our central tunes:
161 1 Christopher Backhouse
162 1 Christopher Backhouse
<pre>kPPFXFluxCVWgt * kXSecCVWgt2017</pre>
163 1 Christopher Backhouse
164 24 Erika Catano Mur
---
165 24 Erika Catano Mur
166 1 Christopher Backhouse
h2. Selections
167 1 Christopher Backhouse
168 1 Christopher Backhouse
As selection cuts are finalized they're added to "NueCuts2017.h":https://cdcvs.fnal.gov/redmine/projects/novaart/repository/entry/trunk/CAFAna/Cuts/NueCuts2017.h
169 1 Christopher Backhouse
To select the "core" sample use: @kNue2017FD@.
170 1 Christopher Backhouse
To select the "peripheral" sample use: @kNue2017FDPeripheral@.
171 9 Alexander Himmel
172 1 Christopher Backhouse
The best default for other cuts for now is probably whatever was used "in the second analysis":https://cdcvs.fnal.gov/redmine/projects/novaart/repository/entry/trunk/CAFAna/Cuts/NueCutsSecondAna.h
173 1 Christopher Backhouse
174 24 Erika Catano Mur
h3. Sideband cuts
175 24 Erika Catano Mur
176 24 Erika Catano Mur
%{color:orchid} TODO%
177 24 Erika Catano Mur
---
178 24 Erika Catano Mur
179 1 Christopher Backhouse
h2. Exposures
180 1 Christopher Backhouse
181 24 Erika Catano Mur
182 24 Erika Catano Mur
%{color:orchid} TODO this isn't true anymore%
183 24 Erika Catano Mur
184 5 Christopher Backhouse
Until the final processing of the data files, and all the accounting and crosschecks, are done, we will use round-number estimates of the beam exposure: 9e20 POT, and livetime within the beam spill (for scaling cosmic backgrounds) of 440s. These values are also available in CAFAna/Analysis/Exposures.h
185 10 Nitish Nayak
186 1 Christopher Backhouse
The POT and livetime numbers for FD data now live in CAFAna/Analysis/Exposures.h
187 1 Christopher Backhouse
188 24 Erika Catano Mur
---
189 24 Erika Catano Mur
190 1 Christopher Backhouse
h2. Creating predictions
191 11 Christopher Backhouse
192 24 Erika Catano Mur
193 16 Daniel Pershey
h3. Ana2017 prediction framework
194 16 Daniel Pershey
195 16 Daniel Pershey
With the 2017 analysis, we met two complications in creating our far detector predictions.  In short, we need a way to extrapolate background events in the peripheral sample without a good ND handle on these events and a way to add the FD rock estimate with the fiducial prediction.  For every prediction we make, we must first prepare three constituent pieces.  We need a @PredictionNoExtrap@ that gives the simulation's fiducial prediction at the far detector for both the core and peripheral samples, a @PredictionExtrap@ that sets up ND decompositions and an extrapolation just for the FD core fiducial sample, and a @PredictionNoExtrap@ that gives the simulation's rock estimate.  Assuming you have pointers to all three, you need to do:
196 16 Daniel Pershey
197 16 Daniel Pershey
<pre>
198 16 Daniel Pershey
PredictionExtendToPeripheral *predFid = new PredictionExtendToPeripheral(PredictionExtrap *predCore, PredictionNoExtrap *predNoExtrap);
199 16 Daniel Pershey
PredictionAddRock *pred = new PredictionAddRock(IPrediction *predFid,PredictionNoExtrap *predRock, 1./10.87, 1./13.13);
200 16 Daniel Pershey
</pre>
201 16 Daniel Pershey
202 16 Daniel Pershey
Here, @predCore@ gives your extrapolated prediction to the core sample, @predNoExtrap@ gives the MC prediction of all samples, and @predRock@ gives the rock prediction.  The 10.87 and 13.13 are rock spill duty factors.  See DocDB 23108 if you want to learn more.  The final @pred@ is the prediction we actually want to use in the analysis.
203 16 Daniel Pershey
204 1 Christopher Backhouse
h3. Creating systematically shifted predictions
205 1 Christopher Backhouse
206 24 Erika Catano Mur
%{color:orchid} TODO short description and link to shared nue numu wiki. Remove macros from repository that were not used%
207 24 Erika Catano Mur
208 26 Erika Catano Mur
209 11 Christopher Backhouse
This section was written by a convener who hasn't tried actually running any of the jobs. To be fleshed out.
210 11 Christopher Backhouse
211 11 Christopher Backhouse
<pre>
212 11 Christopher Backhouse
$ for k in `seq 0 4`; do cafe -bq nue/Ana2017/make_nue_filesyst_pred.C $k; done
213 11 Christopher Backhouse
$ cafe -bq nue/Ana2017/make_nue_xsec_pred.C
214 11 Christopher Backhouse
$ hadd_cafana hadded.root fout_make_nue_*_pred.root pred_xsec_fhc_*.root
215 11 Christopher Backhouse
</pre>
216 11 Christopher Backhouse
217 1 Christopher Backhouse
These files are read in by @PredictionSystNue2017@
218 26 Erika Catano Mur
219 26 Erika Catano Mur
[[Systematic predictions for the nue and numu 2017 analyses]]
220 1 Christopher Backhouse
221 24 Erika Catano Mur
%{color:orchid} TODO extrapdolation systematics might require a special place%
222 24 Erika Catano Mur
%{color:orchid} TODO link to PPFX principal components wiki if it exists%
223 24 Erika Catano Mur
224 1 Christopher Backhouse
h3. Creating cosmic background predictions
225 1 Christopher Backhouse
226 24 Erika Catano Mur
%{color:orchid} TODO add note about sideband weight. What's in the file%
227 24 Erika Catano Mur
228 1 Christopher Backhouse
For cosmic bkg prediction run @CAFAna/nue/Ana2017/get_cosmic_spectra.C@. It will produce a file with spectra, for reading the spectra from the *.root file follow the little instruction in the end of  @get_cosmic_spectra.C@ file.
229 1 Christopher Backhouse
230 24 Erika Catano Mur
%{color:orchid} TODO rock prediction%
231 24 Erika Catano Mur
232 24 Erika Catano Mur
%{color:orchid} TODO data spectrum%
233 24 Erika Catano Mur
234 24 Erika Catano Mur
%{color:orchid} TODO add note on binning%
235 24 Erika Catano Mur
236 24 Erika Catano Mur
---
237 24 Erika Catano Mur
238 17 Nitish Nayak
h2. Creating concats
239 17 Nitish Nayak
240 17 Nitish Nayak
The reduce script used for making the above listed datasets from the parent CAFs is @CAFAna/nue/reduce_bendecomp.C@. It can be used for making both the ND and FD concats. The following nue selection cuts are used :
241 17 Nitish Nayak
242 17 Nitish Nayak
* kNueFD2017DecafCut (= kNue2017BasicPart && kCVNe > 0.5) for FD
243 17 Nitish Nayak
* kNueND2017DecafCut (=  kNueDQ2017CVN &&  kNue2017NDFiducial && kNue2017NDContain && kNue2017NDFrontPlanes) for ND
244 17 Nitish Nayak
245 17 Nitish Nayak
Both these cuts live in @CAFAna/Cuts/NueCuts2017.h@
246 17 Nitish Nayak
247 17 Nitish Nayak
In addition, to constrain the beam nue backgrounds using BEN, we look at high-statistics samples of contained and uncontained numuCC events. 
248 17 Nitish Nayak
Therefore, additional cuts (in @CAFAna/Cuts/BeamNueCuts.h@) are applied to fit them into the ND concats. They are :
249 17 Nitish Nayak
250 17 Nitish Nayak
* kNumuContainNDDecafCut (= kNumuBasicQuality && (kNumuContainND2017 || kNumuContainND) && (kNumuPID2017 || kNumuNCRej))
251 17 Nitish Nayak
* kNumuUncontainNDDecafCut (= kNumuBasicQuality && kBENKaNumuFiducial && (!kNumuContainND2017 || !kNumuContainND) && (kNumuPID2017 || kNumuNCRej))
252 17 Nitish Nayak
253 17 Nitish Nayak
To prevent the concat size blowing up by adding in so many numuCC events, a special reduction method called @ReduceForBENDecaf@ (in @CAFAna/Decomp/BENDecomp.cxx@) is used in the macro. This essentially keeps only the necessary branches required for BEN for the numuCC sample. The nue sample is otherwise untouched by this method. This keeps the concats at a manageable size and allows us to calculate the BEN scale factors on-the-fly for both nominal and systematically shifted datasets (in contrast to the Second Analysis).
254 17 Nitish Nayak
255 17 Nitish Nayak
The interface to the reduction script is basically through @submit_concat_project.sh@ which lives in the @NovaGridUtils@ package. A couple of extra concat scripts have been committed to @NovaGridUtils@ to make the task simpler. The procedure is :
256 17 Nitish Nayak
257 17 Nitish Nayak
* Create a comma-separated txt file with the different CAF definitions you want to concat and the number of output concat files you want to create for each of them. An example is given in @NovaGridUtils/bin/extra_concat_scripts/datasets.txt@
258 17 Nitish Nayak
* Run @NovaGridUtils/bin/extra_concat_scripts/submit_multiple_concats.sh@ to submit a bunch of concat projects at once. The "nue2017" parameter runs @reduce_bendecomp.C@ on the grid
259 17 Nitish Nayak
<pre>
260 17 Nitish Nayak
submit_multiple_concats.sh <output_dir for concat jobs> <release> "nue2017" <comma-separated txt file>
261 17 Nitish Nayak
</pre>
262 17 Nitish Nayak
* Run @NovaGridUtils/bin/extra_concat_scripts/get_metadata.sh@ to check for metadata differences between output concats and parent CAFs. Check with #production if there's anything weird in them. (IMPORTANT!!)
263 17 Nitish Nayak
<pre>
264 17 Nitish Nayak
get_metadata.sh <output dir for metadata json files> <output_dir for concat jobs from previous step> "nue2017" <comma-separated txt file>
265 17 Nitish Nayak
</pre>
266 17 Nitish Nayak
* If everything is okay, then use @NovaGridUtils/bin/extra_concat_scripts/cp_dropbox.sh@ to copy over your concat files to the FTS dropbox. You'll need novapro permissions for this step. Either request on #production or get someone who has them to copy them over for you. 
267 17 Nitish Nayak
<pre>
268 17 Nitish Nayak
cp_dropbox.sh <output_dir for concat jobs from previous step> "nue2017" <comma-separated txt file>
269 17 Nitish Nayak
</pre>
270 17 Nitish Nayak
* Finally, once they are copied over and declared (might take a while), run @NovaGridUtils/bin/extra_concat_scripts/make_definitions.sh@ to well..make the definitions (like the ones given above)
271 17 Nitish Nayak
<pre>
272 17 Nitish Nayak
make_definitions.sh "nue2017" <comma-separated txt file>
273 17 Nitish Nayak
</pre>
274 1 Christopher Backhouse
275 1 Christopher Backhouse
@make_definitions.sh@ checks the comma-separated txt file for the expected number of concat files and aborts if it doesn't find the required number. That could mean either that the files haven't been declared yet from Step 3 or more SAM lookup-parameters need to be added to nail down the concat files. 
276 24 Erika Catano Mur
277 24 Erika Catano Mur
278 24 Erika Catano Mur
---
279 24 Erika Catano Mur
280 24 Erika Catano Mur
h2. Reproducing ND Data/MC comparisons
281 24 Erika Catano Mur
282 24 Erika Catano Mur
---
283 24 Erika Catano Mur
284 24 Erika Catano Mur
h2. Reproducing FD Data/MC comparisons 
285 24 Erika Catano Mur
286 24 Erika Catano Mur
287 24 Erika Catano Mur
h3. Sidebands
288 24 Erika Catano Mur
289 24 Erika Catano Mur
290 24 Erika Catano Mur
---
291 24 Erika Catano Mur
292 24 Erika Catano Mur
h2.  Sensitivities and fit results
293 24 Erika Catano Mur
294 24 Erika Catano Mur
---
295 24 Erika Catano Mur
296 24 Erika Catano Mur
h2. Feldman-Cousins corrections
297 24 Erika Catano Mur
298 24 Erika Catano Mur
---
299 24 Erika Catano Mur
300 24 Erika Catano Mur
h2. Other blessed plots
301 24 Erika Catano Mur
302 24 Erika Catano Mur
---