mrbrem_get_reweighted_spectra.C
Go to the documentation of this file.
1 #include "CAFAna/Core/Binning.h"
2 #include "CAFAna/Core/Spectrum.h"
5 #include "CAFAna/Core/Var.h"
6 #include "CAFAna/Core/MultiVar.h"
7 
8 //#include "CAFAna/Cuts/BPFCuts.h"
9 //#include "CAFAna/Vars/BPFVars.h"
10 
11 #include "CAFAna/Cuts/Cuts.h"
13 #include "CAFAna/Cuts/TimingCuts.h"
14 #include "CAFAna/Cuts/SpillCuts.h"
16 #include "CAFAna/Cuts/TruthCuts.h"
19 #include "CAFAna/Vars/XsecTunes.h"
20 
21 #include "CAFAna/Vars/Vars.h"
23 #include "3FlavorAna/Vars/MRVars.h"
25 
27 
28 #include <cassert>
29 
30 #include "TFile.h"
31 #include "TCanvas.h"
32 #include "TH2.h"
33 #include "TH1.h"
34 #include "TStyle.h"
35 #include "TLegend.h"
36 #include "TLatex.h"
37 #include "TArrayD.h"
38 #include "TTree.h"
39 #include "TLeaf.h"
40 #include "stdio.h"
41 #include <sstream>
42 #include <string>
43 #include <iostream>
44 #include <fstream>
45 #include <string>
46 
47 
48 using namespace ana;
49 using namespace std;
50 
51 
53 {
54 
55  std::string filename = "${CONDOR_DIR_INPUT}/MRbrem_extract_weights_"+mode+".root"; // ${CONDOR_DIR_INPUT}
56  struct HistDef
57  {
59  HistAxis axis;
60  };
61 
62  const int kNumVars = 1;
63  const int kNumSels = 8;
64 
65  const HistDef defs[kNumVars] = {
66  {"shwangle", {"Cos(#theta_{Z})", Binning::Simple(60,0,1.0), kShwAngle}},
67  };
68 
69  struct CutDef
70  {
72  Cut cut;
73  };
74 
75  const CutDef sels[kNumSels] = {
76  {"core_presel", kNue2020CorePresel_MRBrem},
77  {"periph_presel", kNue2020PeripheralPresel_MRBrem},
78  {"core_full", kNue2020FD_MRBrem},
79  {"periph_full", kNue2020FDPeripheral_MRBrem},
80  {"periph_preselbdt", kNue2020PeripheralPresel_MRBrem && kCosPIDPeriBDT > 0.57},
81  {"periph_preselcvn", kNue2020PeripheralPresel_MRBrem && kCVNe_looseptp >= 0.97},
82  {"periph_preselen", kNue2020PeripheralPresel_MRBrem && kShwE > 1},
83  {"periph_fullen", kNue2020FDPeripheral_MRBrem && kShwE > 1},
84  };
85 
86  Spectrum* spec_mrbrem_data[kNumSels][kNumVars];
87  Spectrum* spec_mrbrem_cry[kNumSels][kNumVars];
88  Spectrum* spec_genie_fd[kNumSels][kNumVars];
89 
90  for(int selIdx = 0; selIdx < kNumSels; ++selIdx){
91  const char* selName = sels[selIdx].name.c_str();
92  for (int varIdx=0; varIdx<kNumVars;varIdx++){
93  const char* varName = defs[varIdx].name.c_str();
94  spec_mrbrem_data[selIdx][varIdx] = LoadFromFile<Spectrum>(filename, TString::Format("%s/mrbrem_data_%s", selName, varName).Data()).release();
95  spec_mrbrem_cry[selIdx][varIdx] = LoadFromFile<Spectrum>(filename, TString::Format("%s/mrbrem_mc_%s", selName, varName).Data()).release();
96  spec_genie_fd[selIdx][varIdx] = LoadFromFile<Spectrum>(filename, TString::Format("%s/genie_fd_%s", selName, varName).Data()).release();
97  }
98  }
99 
100  double livetime = spec_mrbrem_data[0][0]->Livetime();
101  double pot = spec_genie_fd[0][0]->POT();
102 
103  TH1D* hspec_mrbrem_data[kNumSels][kNumVars];
104  TH1D* hspec_mrbrem_cry[kNumSels][kNumVars];
105  TH1D* hspec_genie_fd[kNumSels][kNumVars];
106 
107  for (int selIdx = 0; selIdx < kNumSels; ++selIdx){
108  for (int varIdx=0; varIdx<kNumVars;varIdx++){
109  hspec_mrbrem_data[selIdx][varIdx] = spec_mrbrem_data[selIdx][varIdx]->ToTH1(livetime,kLivetime);
110  hspec_mrbrem_cry[selIdx][varIdx] = spec_mrbrem_cry[selIdx][varIdx]->ToTH1(livetime,kLivetime);
111  hspec_genie_fd[selIdx][varIdx] = spec_genie_fd[selIdx][varIdx]->ToTH1(pot);
112  }
113  }
114 
115  TH1D* hgenie_core_presel = (TH1D*)hspec_genie_fd[0][0]->Clone();
116  TH1D* hgenie_peri_presel = (TH1D*)hspec_genie_fd[1][0]->Clone();
117  TH1D* hgenie_peri_preselbdt = (TH1D*)hspec_genie_fd[4][0]->Clone();
118  TH1D* hgenie_peri_preselcvn = (TH1D*)hspec_genie_fd[5][0]->Clone();
119  TH1D* hgenie_peri_preselen = (TH1D*)hspec_genie_fd[6][0]->Clone();
120  TH1D* hgenie_core_presel_data = (TH1D*)hspec_genie_fd[0][0]->Clone();
121  TH1D* hgenie_peri_presel_data = (TH1D*)hspec_genie_fd[1][0]->Clone();
122  TH1D* hgenie_peri_preselbdt_data = (TH1D*)hspec_genie_fd[4][0]->Clone();
123  TH1D* hgenie_peri_preselcvn_data = (TH1D*)hspec_genie_fd[5][0]->Clone();
124  TH1D* hgenie_peri_preselen_data = (TH1D*)hspec_genie_fd[6][0]->Clone();
125 
126  hgenie_core_presel->Scale(hspec_mrbrem_cry[0][0]->Integral()/hspec_genie_fd[0][0]->Integral());
127  hgenie_core_presel->Divide(hspec_mrbrem_cry[0][0]);
128 
129  hgenie_peri_presel->Scale(hspec_mrbrem_cry[1][0]->Integral()/hspec_genie_fd[1][0]->Integral());
130  hgenie_peri_presel->Divide(hspec_mrbrem_cry[1][0]);
131 
132  hgenie_peri_preselbdt->Scale(hspec_mrbrem_cry[4][0]->Integral()/hspec_genie_fd[4][0]->Integral());
133  hgenie_peri_preselbdt->Divide(hspec_mrbrem_cry[4][0]);
134 
135  hgenie_peri_preselcvn->Scale(hspec_mrbrem_cry[5][0]->Integral()/hspec_genie_fd[5][0]->Integral());
136  hgenie_peri_preselcvn->Divide(hspec_mrbrem_cry[5][0]);
137 
138  hgenie_peri_preselen->Scale(hspec_mrbrem_cry[6][0]->Integral()/hspec_genie_fd[6][0]->Integral());
139  hgenie_peri_preselen->Divide(hspec_mrbrem_cry[6][0]);
140 
141  hgenie_core_presel_data->Scale(hspec_mrbrem_data[0][0]->Integral()/hspec_genie_fd[0][0]->Integral());
142  hgenie_core_presel_data->Divide(hspec_mrbrem_data[0][0]);
143 
144  hgenie_peri_presel_data->Scale(hspec_mrbrem_data[1][0]->Integral()/hspec_genie_fd[1][0]->Integral());
145  hgenie_peri_presel_data->Divide(hspec_mrbrem_data[1][0]);
146 
147  hgenie_peri_preselbdt_data->Scale(hspec_mrbrem_data[4][0]->Integral()/hspec_genie_fd[4][0]->Integral());
148  hgenie_peri_preselbdt_data->Divide(hspec_mrbrem_data[4][0]);
149 
150  hgenie_peri_preselcvn_data->Scale(hspec_mrbrem_data[5][0]->Integral()/hspec_genie_fd[5][0]->Integral());
151  hgenie_peri_preselcvn_data->Divide(hspec_mrbrem_data[5][0]);
152 
153  hgenie_peri_preselen_data->Scale(hspec_mrbrem_data[6][0]->Integral()/hspec_genie_fd[6][0]->Integral());
154  hgenie_peri_preselen_data->Divide(hspec_mrbrem_data[6][0]);
155 
156  std::string filenameCosmicsData = "prod_mrbremcaf_R19-11-18-prod5reco.i_fd_cosmic_fhc_full_v1_goodruns_underP9";
157  std::string filenameCRYMC = "prod_mrbremcaf_R19-11-18-prod5reco.m_fd_cry_fhc_full_v3";
158  std::string filenameGENIEFluxswap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1";
159 
160  if (mode == "rhc"){
161  filenameCosmicsData = "prod_mrbremcaf_R19-11-18-prod5reco.i_fd_cosmic_rhc_full_v1_goodruns";
162  filenameCRYMC = "prod_mrbremcaf_R19-11-18-prod5reco.m_fd_cry_rhc_full_v3";
163  filenameGENIEFluxswap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_rhc_nova_v08_full_v1";
164  }
165 
166  //CorePresel and PeripheralPresel weights
167  const Var kShwAngleCorePresel1Dweights( [hgenie_core_presel](const caf::SRProxy* sr)
168  {
169  double myweight = 1.0;
170  double myShwAngle = kShwAngle(sr);
171  int bin = hgenie_core_presel->FindBin(myShwAngle);
172  myweight = hgenie_core_presel->GetBinContent(bin);
173  if(myweight>0) return myweight;
174  else return 1.0;
175  });
176 
177 
178  const Var kShwAnglePeripheralPresel1Dweights( [hgenie_peri_presel](const caf::SRProxy* sr)
179  {
180  double myweight = 1.0;
181  double myShwAngle = kShwAngle(sr);
182  int bin = hgenie_peri_presel->FindBin(myShwAngle);
183  myweight = hgenie_peri_presel->GetBinContent(bin);
184  if(myweight>0) return myweight;
185  else return 1.0;
186  });
187 
188  const Var kShwAnglePeripheralPreselBDT1Dweights( [hgenie_peri_preselbdt](const caf::SRProxy* sr)
189  {
190  double myweight = 1.0;
191  double myShwAngle = kShwAngle(sr);
192  int bin = hgenie_peri_preselbdt->FindBin(myShwAngle);
193  myweight = hgenie_peri_preselbdt->GetBinContent(bin);
194  if(myweight>0) return myweight;
195  else return 1.0;
196  });
197 
198  const Var kShwAnglePeripheralPreselCVN1Dweights( [hgenie_peri_preselcvn](const caf::SRProxy* sr)
199  {
200  double myweight = 1.0;
201  double myShwAngle = kShwAngle(sr);
202  int bin = hgenie_peri_preselcvn->FindBin(myShwAngle);
203  myweight = hgenie_peri_preselcvn->GetBinContent(bin);
204  if(myweight>0) return myweight;
205  else return 1.0;
206  });
207 
208  const Var kShwAnglePeripheralPreselEn1Dweights( [hgenie_peri_preselen](const caf::SRProxy* sr)
209  {
210  double myweight = 1.0;
211  double myShwAngle = kShwAngle(sr);
212  int bin = hgenie_peri_preselen->FindBin(myShwAngle);
213  myweight = hgenie_peri_preselen->GetBinContent(bin);
214  if(myweight>0) return myweight;
215  else return 1.0;
216  });
217 
218  const Var kShwAngleCorePreselData1Dweights( [hgenie_core_presel_data](const caf::SRProxy* sr)
219  {
220  double myweight = 1.0;
221  double myShwAngle = kShwAngle(sr);
222  int bin = hgenie_core_presel_data->FindBin(myShwAngle);
223  myweight = hgenie_core_presel_data->GetBinContent(bin);
224  if(myweight>0) return myweight;
225  else return 1.0;
226  });
227 
228 
229  const Var kShwAnglePeripheralPreselData1Dweights( [hgenie_peri_presel_data](const caf::SRProxy* sr)
230  {
231  double myweight = 1.0;
232  double myShwAngle = kShwAngle(sr);
233  int bin = hgenie_peri_presel_data->FindBin(myShwAngle);
234  myweight = hgenie_peri_presel_data->GetBinContent(bin);
235  if(myweight>0) return myweight;
236  else return 1.0;
237  });
238 
239  const Var kShwAnglePeripheralPreselBDTData1Dweights( [hgenie_peri_preselbdt_data](const caf::SRProxy* sr)
240  {
241  double myweight = 1.0;
242  double myShwAngle = kShwAngle(sr);
243  int bin = hgenie_peri_preselbdt_data->FindBin(myShwAngle);
244  myweight = hgenie_peri_preselbdt_data->GetBinContent(bin);
245  if(myweight>0) return myweight;
246  else return 1.0;
247  });
248 
249  const Var kShwAnglePeripheralPreselCVNData1Dweights( [hgenie_peri_preselcvn_data](const caf::SRProxy* sr)
250  {
251  double myweight = 1.0;
252  double myShwAngle = kShwAngle(sr);
253  int bin = hgenie_peri_preselcvn_data->FindBin(myShwAngle);
254  myweight = hgenie_peri_preselcvn_data->GetBinContent(bin);
255  if(myweight>0) return myweight;
256  else return 1.0;
257  });
258 
259  const Var kShwAnglePeripheralPreselEnData1Dweights( [hgenie_peri_preselen_data](const caf::SRProxy* sr)
260  {
261  double myweight = 1.0;
262  double myShwAngle = kShwAngle(sr);
263  int bin = hgenie_peri_preselen_data->FindBin(myShwAngle);
264  myweight = hgenie_peri_preselen_data->GetBinContent(bin);
265  if(myweight>0) return myweight;
266  else return 1.0;
267  });
268 
269  SpectrumLoader loaderCosmicsData(filenameCosmicsData, kCosmic);
270  SpectrumLoader loaderCRYMC(filenameCRYMC, kCosmic);
271  SpectrumLoader loaderGENIEFluxswap(filenameGENIEFluxswap);
272  loaderGENIEFluxswap.SetSpillCut(kStandardSpillCuts);
273  loaderCosmicsData.SetSpillCut(kStandardSpillCuts_FD_Prod4MotivatedDQ);
274 
275  const int kNumVars2 = 14;
276  const HistDef defs_2round[kNumVars2] = {
277  {"shwangle", {"Cos(#theta_{Z})", Binning::Simple(60,0,1.0), kShwAngle}},
278  {"cvne", {"CVNe", Binning::Simple(120, 0.0, 1.0), kCVNe_looseptp}},
279  {"corebdt", {"Core BDT", Binning::Simple(120, 0.0, 1.0), kCosPIDCoreBDT}},
280  {"peribdt", {"Peripheral BDT", Binning::Simple(120, 0.0, 1.0), kCosPIDPeriBDT}},
281  {"shwe", {"Shower Energy (GeV)", Binning::Simple(120, 0.0, 5.0), kShwE}},
282  {"shwidth", {"Shower Width (cm)", Binning::Simple(100, 0.0, 10.0), kShwWidth}},
283  {"shwlen", {"Shower Length (cm)", Binning::Simple(100, 0.0, 1000.0), kShwLen}},
284  {"shwstx", {"Shower Start position X (cm)", Binning::Simple(64, -800, 800), kShwStartX}},
285  {"shwsty", {"Shower Start position Y (cm)", Binning::Simple(64, -800, 800), kShwStartY}},
286  {"shwstz", {"Shower Start position Z (cm)", Binning::Simple(104,0,5962), kShwStartZ}},
287  {"nhit", {"NHit", Binning::Simple(120,0.0,150), kNHit}},
288  {"ptp", {"pTp", Binning::Simple(120,0.0,1.0), kPtP}},
289  {"asym", {"SparsenessAsymm", Binning::Simple(60,-1.0,1.0), kSparsenessAsymm}},
290  {"dist", {"DistNearestWall (cm)", Binning::Simple(8,0,800), kDistNearestWall}},
291  };
292 
293  struct CutDef2round
294  {
296  Cut cut;
297  Var weight;
298  Var weightdata;
299  };
300 
301  const int kNumSels2 = 10;
302 
303  const CutDef2round sels2[kNumSels2] = {
304  {"core_presel", kNue2020CorePresel_MRBrem, kShwAngleCorePresel1Dweights, kShwAngleCorePreselData1Dweights},
305  {"periph_presel", kNue2020PeripheralPresel_MRBrem, kShwAnglePeripheralPresel1Dweights, kShwAnglePeripheralPreselData1Dweights},
306  {"core_full", kNue2020FD_MRBrem, kShwAngleCorePresel1Dweights, kShwAngleCorePreselData1Dweights },
307  {"periph_full", kNue2020FDPeripheral_MRBrem, kShwAnglePeripheralPresel1Dweights, kShwAnglePeripheralPreselData1Dweights},
308  {"periph_preselbdt", kNue2020PeripheralPresel_MRBrem && kCosPIDPeriBDT > 0.57, kShwAnglePeripheralPreselBDT1Dweights, kShwAnglePeripheralPreselBDTData1Dweights},
309  {"periph_fullbdt", kNue2020FDPeripheral_MRBrem, kShwAnglePeripheralPreselBDT1Dweights, kShwAnglePeripheralPreselBDTData1Dweights},
310  {"periph_preselcvn", kNue2020PeripheralPresel_MRBrem && kCVNe_looseptp >= 0.97, kShwAnglePeripheralPreselCVN1Dweights, kShwAnglePeripheralPreselCVNData1Dweights},
311  {"periph_fullcvn", kNue2020FDPeripheral_MRBrem, kShwAnglePeripheralPreselCVN1Dweights, kShwAnglePeripheralPreselCVNData1Dweights},
312  {"periph_preselen", kNue2020PeripheralPresel_MRBrem && kShwE > 1, kShwAnglePeripheralPreselEn1Dweights, kShwAnglePeripheralPreselEnData1Dweights},
313  {"periph_fullen", kNue2020FDPeripheral_MRBrem && kShwE > 1, kShwAnglePeripheralPreselEn1Dweights, kShwAnglePeripheralPreselEnData1Dweights},
314  };
315 
316  Spectrum* spec_mrbrem_data_wo_weight[kNumSels2][kNumVars2];
317  Spectrum* spec_mrbrem_cry_wo_weight[kNumSels2][kNumVars2];
318  Spectrum* spec_genie_fd_wo_weight[kNumSels2][kNumVars2];
319 
320  Spectrum* spec_mrbrem_data_w_weight[kNumSels2][kNumVars2];
321  Spectrum* spec_mrbrem_cry_w_weight[kNumSels2][kNumVars2];
322 
323  for(int selIdx = 0; selIdx < kNumSels2; ++selIdx){
324  for (int varIdx=0; varIdx<kNumVars2;varIdx++){
325  const HistAxis& axis = defs_2round[varIdx].axis;
326  spec_mrbrem_data_w_weight[selIdx][varIdx] = new Spectrum(loaderCosmicsData, axis, sels2[selIdx].cut && kInCosmicTimingWindow_FD_MR, kNoShift, sels2[selIdx].weightdata);
327  spec_mrbrem_cry_w_weight[selIdx][varIdx] = new Spectrum(loaderCRYMC, axis, sels2[selIdx].cut && kInCosmicTimingWindow_FD_MR, kNoShift, sels2[selIdx].weight);
328  spec_mrbrem_data_wo_weight[selIdx][varIdx] = new Spectrum(loaderCosmicsData, axis, sels2[selIdx].cut && kInCosmicTimingWindow_FD_MR);
329  spec_mrbrem_cry_wo_weight[selIdx][varIdx] = new Spectrum(loaderCRYMC, axis, sels2[selIdx].cut && kInCosmicTimingWindow_FD_MR);
330  spec_genie_fd_wo_weight[selIdx][varIdx] = new Spectrum(loaderGENIEFluxswap, axis, sels2[selIdx].cut, kNoShift, kPPFXFluxCVWgt*kXSecCVWgt2020);
331  }
332  }
333 
334  loaderCosmicsData.Go();
335  loaderCRYMC.Go();
336  loaderGENIEFluxswap.Go();
337 
338  TFile *file = new TFile(("MRbrem_spectra_with_weights_"+mode+".root").c_str(), "recreate");
339  for(int selIdx = 0; selIdx < kNumSels2; ++selIdx){
340  TDirectory* d = file->mkdir(sels2[selIdx].name.c_str());
341  for (int varIdx=0; varIdx<kNumVars2;varIdx++){
342  const char* name = defs_2round[varIdx].name.c_str();
343  spec_mrbrem_data_wo_weight[selIdx][varIdx]->SaveTo(d, TString::Format("mrbrem_data_%s", name));
344  spec_mrbrem_cry_wo_weight[selIdx][varIdx]->SaveTo(d, TString::Format("mrbrem_mc_%s", name));
345  spec_genie_fd_wo_weight[selIdx][varIdx]->SaveTo(d, TString::Format("genie_fd_%s", name));
346  spec_mrbrem_data_w_weight[selIdx][varIdx]->SaveTo(d, TString::Format("mrbrem_data_w_weight_%s", name));
347  spec_mrbrem_cry_w_weight[selIdx][varIdx]->SaveTo(d, TString::Format("mrbrem_mc_w_weight_%s", name));
348  }
349  }
350 
351  file->Close();
352  return;
353 
354 }
const SpillCut kStandardSpillCuts_FD_Prod4MotivatedDQ
Definition: SpillCuts.h:69
const Var kShwE([](const caf::SRProxy *sr){double maxe=-99.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;}}return maxe;})
Definition: MRVars.h:9
const XML_Char * name
Definition: expat.h:151
const int kNumVars
Definition: vars.h:14
const int kNumSels2
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:148
const Cut kNue2020FD_MRBrem
Definition: NueCuts2020.h:144
const Var weight
double Integral(const Spectrum &s, const double pot, int cvnregion)
const TString name
const Cut kNue2020CorePresel_MRBrem
Definition: NueCuts2020.h:143
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2085
std::string name
Definition: NuePlotLists.h:12
const Var kShwStartY
string filename
Definition: shutoffs.py:106
const Var kDistNearestWall([](const caf::SRProxy *sr){float disttonearestwall=std::min(float(kDistAllTop(sr)), float(kDistNotTop(sr)));return disttonearestwall;})
Definition: MRVars.h:10
void SetSpillCut(const SpillCut &cut)
const Var kSparsenessAsymm
Definition: NueVars.cxx:92
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const Var kShwWidth
const Var kPtP
Transverse momentum fraction in slice.
Definition: NueVars.cxx:90
const Var kShwStartX
const Cut sels[kNumSels]
Definition: vars.h:44
const Var kNHit
Definition: Vars.cxx:71
void mrbrem_get_reweighted_spectra(std::string mode="fhc")
#define pot
Struct to hold cut information.
Float_t d
Definition: plot.C:236
caf::StandardRecord * sr
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
Definition: Spectrum.cxx:517
const HistDef defs[kNumVars]
Definition: vars.h:15
const Cut kNue2020FDPeripheral_MRBrem(kNue2020FDPeripheralFunc_MRBrem)
const int kNumSels
Definition: vars.h:43
float bin[41]
Definition: plottest35.C:14
std::vector< float > Spectrum
Definition: Constants.h:570
double POT() const
Definition: Spectrum.h:219
HistAxis axis
Definition: NuePlotLists.h:13
const SystShifts kNoShift
Definition: SystShifts.cxx:21
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
const Cut cut
Definition: exporter_fd.C:30
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
double livetime
Definition: saveFDMCHists.C:21
TFile * file
Definition: cellShifts.C:17
const Cut kInCosmicTimingWindow_FD_MR
Definition: TimingCuts.cxx:170
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
const Var kShwAngle([](const caf::SRProxy *sr){double maxe=-99.0;double cosz=-1.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;cosz=sr->vtx.elastic.fuzzyk.png[i].shwlid.dir.z;}}return cosz;})
Definition: MRVars.h:8
const Var kShwStartZ
const Var kShwLen
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:114
const Var kCVNe_looseptp
Definition: Vars.cxx:36
double Livetime() const
Seconds. For informational purposes only. No calculations use this.
Definition: Spectrum.h:222
const Var kCosPIDCoreBDT
2020 nue cosmic rejection BDT variable - core
Definition: NueVars.cxx:112
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral
Definition: NueVars.cxx:113
const Var kXSecCVWgt2020
Definition: XsecTunes.h:106