NusLoadProd3.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdio.h>
4 #include <string>
5 
6 #include "CAFAna/Core/Binning.h"
7 #include "CAFAna/Core/Cut.h"
8 #include "CAFAna/Core/Spectrum.h"
10 #include "CAFAna/Cuts/Cuts.h"
11 #include "NuXAna/Cuts/NusCuts.h"
12 #include "CAFAna/Cuts/TruthCuts.h"
13 #include "CAFAna/Vars/Vars.h"
14 #include "OscLib/IOscCalc.h"
15 
16 #include "TVector3.h"
17 
18 #define MAXSPEC 5
19 
20 class TDirectory;
21 
22 void Preliminary();
23 void Simulation();
24 void CenterTitles(TH1* histo);
25 
26 namespace ana
27 {
28  // Strings to file paths
29  const std::string fNDdataCAF = "prod_caf_R17-03-01-prod3reco.d_nd_numi_fhc_full_v1_goodruns";
30  const std::string fNDmcCAF = "prod_caf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1";
31  const std::string fNDdataConcat = "prod_sumdecaf_R17-03-01-prod3reco.h_nd_numi_fhc_full_nue_or_numu_or_nus_contain_v1_goodruns";
32  const std::string fNDmcConcat = "prod_sumdecaf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1";
33 
34 
35  const std::string fFDmcCAF = "prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1";
36  const std::string fFDmcCAFt = "defname: prod_caf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1 with limit 10";
37  const std::string fFDswapCAF = "prod_caf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1";
38  const std::string fFDswapCAFt = "defname: prod_caf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1 with limit 10";
39  const std::string fFDtauCAF = "prod_caf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1";
40 
41 
42 
43  const std::string fFDmcDECAF = "prod_decaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1";
44  const std::string fFDmcDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1 with limit 10";
45  const std::string fFDswapDECAF = "prod_decaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1";
46  const std::string fFDswapDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1 with limit 10";
47  const std::string fFDtauDECAF = "prod_decaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1";
48  const std::string fFDtauDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1 with limit 10";
49 
50 
51  const std::string fFDcosmicdata = "prod_caf_R17-03-01-prod3reco.h_fd_cosmic_full_v1_goodruns";
52  const std::string fFDcosmicdataDECAF = "prod_decaf_R17-03-01-prod3reco.h_fd_cosmic_full_nue_or_numu_or_nus_contain_v1_goodruns";
53  const std::string fFDcosmicdataDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.h_fd_cosmic_full_nue_or_numu_or_nus_contain_v1_goodruns with limit 10000";
54 
55  const std::string fFDcosmicdata_test = "defname: prod_caf_R17-03-01-prod3reco.h_fd_cosmic_full_v1_goodruns with stride 10000";
56 
57 
58  const std::string fFDmc_concat = "prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_nonswap_fhc_nova_v08_full_v1_nus2017";
59  const std::string fFDswap_concat = "prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_fluxswap_fhc_nova_v08_full_v1_nus2017";
60  const std::string fFDtau_concat = "prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie_tau_fhc_nova_v08_full_v1_nus2017";
61 
62  // small samples for testing
63  const std::string fNDdataDECAF = "prod_decaf_R17-03-01-prod3reco.d_nd_numi_fhc_full_nue_or_numu_or_nus_contain_v1_goodruns";
64  const std::string fNDdataDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.d_nd_numi_fhc_full_nue_or_numu_or_nus_contain_v1_goodruns with limit 10";
65 
66  const std::string fNDmcDECAF = "prod_decaf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1";
67  const std::string fNDmcDECAFt = "defname: prod_decaf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_nue_or_numu_or_nus_contain_v1 with limit 10";
68 
69  const std::string pnfsdir = "/pnfs/nova/persistent/users/gsdavies/nus/prod3/concat/";
70 
71  std::vector<std::string> fnumi_period1 = Wildcard(
72  pnfsdir + "prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_period1_v1_goodruns_nus2017/*.root"
73  );
74  std::vector<std::string> fnumi_period2 = Wildcard(
75  pnfsdir + "prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_period2_v1_goodruns_nus2017/*.root"
76  );
77  std::vector<std::string> fnumi_period3 = Wildcard(
78  pnfsdir + "prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_period3_v1_goodruns_nus2017/*.root"
79  );
80  std::vector<std::string> fnumi_period5 = Wildcard(
81  pnfsdir + "prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_period5_v1_goodruns_nus2017/*.root"
82  );
83 
84  std::vector<std::string> MakeNumiUnblindList()
85  {
86  std::vector<std::string> ret;
87  for(const auto& file : fnumi_period1) {ret.push_back(file);}
88  for(const auto& file : fnumi_period2) {ret.push_back(file);}
89  for(const auto& file : fnumi_period3) {ret.push_back(file);}
90  for(const auto& file : fnumi_period5) {ret.push_back(file);}
91  return ret;
92  }
93 
94  //......................................................................
95  const Binning kAngleCosBins = Binning::Simple(200, -1., 1.); // Binning for -1 to 1 in CosTheta
96  const Binning kAngleDegBins = Binning::Simple(360, 0., 360.); // Binning for angles in degrees
97 
98  const Binning kBooleanBins = Binning::Simple(3, -1.5, 1.5);
99 
100  const Binning kExtendedEBins = Binning::Simple(300, 0., 30.); // Binning for going to higher energies
101 
102  const Binning kFinePIDBins = Binning::Simple(100, 0., 1.); // Binning for PID plots (BUT NOT REMID!!!)
103 
104  const Binning kRatioBins = Binning::Simple(100, 0., 1.);
105 
106  // Short hand for following macros
108 
109 
110 }
const std::string fFDswap_concat
Definition: NusLoadProd3.h:59
const std::string fNDdataDECAF
Definition: NusLoadProd3.h:63
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const std::string fFDtauDECAFt
Definition: NusLoadProd3.h:48
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const std::string fNDmcConcat
Definition: NusLoadProd3.h:32
const std::string fFDtauDECAF
Definition: NusLoadProd3.h:47
const std::string fNDdataCAF
Definition: NusLoadProd3.h:29
std::vector< std::string > fnumi_period3
Definition: NusLoadProd3.h:77
const std::string fFDmc_concat
Definition: NusLoadProd3.h:58
const Cut kIsBeamNue(CCFlavSel(12, 12))
Select CC .
const Cut kIsNumuApp(CCFlavSel(14, 12))
Select CC .
std::vector< std::string > MakeNumiUnblindList()
Definition: NusLoadProd3.h:84
const std::string fFDswapCAF
Definition: NusLoadProd3.h:37
const Binning kAngleDegBins
Definition: NusLoadProd3.h:96
const std::string fNDmcDECAF
Definition: NusLoadProd3.h:66
std::vector< std::string > fnumi_period1
Definition: NusLoadProd3.h:71
const Binning kExtendedEBins
Definition: NusLoadProd3.h:100
void CenterTitles(TH1 *histo)
std::vector< std::string > Wildcard(const std::string &wildcardString)
Find files matching a UNIX glob, plus expand environment variables.
Definition: UtilsExt.cxx:268
const Cut kIsNC([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return!sr->mc.nu[0].iscc;})
Is this a Neutral Current event?
Definition: TruthCuts.h:8
const std::string fFDmcCAFt
Definition: NusLoadProd3.h:36
const std::string fFDmcCAF
Definition: NusLoadProd3.h:35
const std::string fNDmcCAF
Definition: NusLoadProd3.h:30
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
const std::string pnfsdir
Definition: NusLoadProd3.h:69
const Binning kBooleanBins
Definition: NusLoadProd3.h:98
TH2D * histo
const std::string fNDmcDECAFt
Definition: NusLoadProd3.h:67
std::vector< std::string > fnumi_period2
Definition: NusLoadProd3.h:74
const std::string fFDcosmicdataDECAF
Definition: NusLoadProd3.h:52
const std::string fFDswapDECAFt
Definition: NusLoadProd3.h:46
const std::string fFDtauCAF
Definition: NusLoadProd3.h:39
const std::string fFDcosmicdata_test
Definition: NusLoadProd3.h:55
const std::string fFDmcDECAF
Definition: NusLoadProd3.h:43
const Binning kRatioBins
Definition: NusLoadProd3.h:104
const std::string fFDswapCAFt
Definition: NusLoadProd3.h:38
std::vector< std::string > fnumi_period5
Definition: NusLoadProd3.h:80
void Simulation()
Definition: tools.h:16
const Binning kFinePIDBins
Definition: NusLoadProd3.h:102
const std::string fNDdataDECAFt
Definition: NusLoadProd3.h:64
TFile * file
Definition: cellShifts.C:17
const std::string fFDcosmicdataDECAFt
Definition: NusLoadProd3.h:53
const std::string fFDcosmicdata
Definition: NusLoadProd3.h:51
const Cut FlavSel[4]
Definition: NusLoadProd3.h:107
const std::string fFDtau_concat
Definition: NusLoadProd3.h:60
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:107
const std::string fFDswapDECAF
Definition: NusLoadProd3.h:45
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:109
const Binning kAngleCosBins
Definition: NusLoadProd3.h:95
const std::string fFDmcDECAFt
Definition: NusLoadProd3.h:44
const std::string fNDdataConcat
Definition: NusLoadProd3.h:31
void Preliminary()
Put NOvA Preliminary on plots.
enum BeamMode string