ProtoDUNESelectionUtils.h
Go to the documentation of this file.
1 #ifndef PROTODUNESELECTIONUTILS_h
2 #define PROTODUNESELECTIONUTILS_h
3 
4 #include <iostream>
5 #include <vector>
6 #include <string>
7 
8 #include <TH1.h>
9 #include <TGraphAsymmErrors.h>
10 
11 namespace protoana{
12  namespace ProtoDUNESelectionUtils{
13 
14  // Fill signal and background histograms. The event selection is done at this stage.
16  std::string treename, std::vector<double> recoBins, std::string channel,
17  std::string topo, int toponum, double endZ_cut, double minval=0.0,
18  double maxval=100000.0, bool doNegativeReco=false, int doSyst=0,
19  std::string systName="", double weight=1.0,
20  std::pair<double, double> PiMuScale = {1., 1.});
21 
22  TH1* FillMCSignalHistogram_Pions(std::string filename, std::string treename,
23  std::vector<double> recoBins, std::string channel, std::string topo,
24  int toponum, double minval, double maxval, double endZ_cut,
25  bool doNegativeReco=false, int doSyst=0, std::string systName="",
26  double weight=1.0, std::pair<double, double> PiMuScale = {1., 1.});
27 
28  // Fill incident pions
30  std::vector<double> recoBins, std::string topo,
31  int toponum, double reco_beam_endZ_cut, double minval = 0.,
32  double maxval = 100000., bool doNegativeReco = false,
33  int doSyst = 0, std::string systName = "", double weight = 1.0,
34  std::pair<double, double> PiMuScale = {1., 1.});
35 
36  // Fill the number of truth beam pions
38  std::vector<double> truthBins, std::string channel, double weight=1.0);
39 
40  // Fill data
41  TH1* FillDataHistogram_Pions(std::string filename, std::string treename,
42  std::vector<double> recoBins, std::string channel,
43  double reco_beam_endZ_cut,
44  bool doNegativeReco = false, bool IsIncidentHisto = false);
45 
47  std::string filename, std::string treename,
48  std::string channel, std::string topo, int toponum, double endZ_cut,
49  std::vector<double> binning, double weight = 1.);
50 
52  std::string filename, std::string treename,
53  std::string channel, double endZ_cut,
54  std::vector<double> binning, double weight = 1.);
55 
56  // Pion flux
57  TH1* FillMCFlux_Pions(std::string filename, std::string treename,
58  std::vector<double> Bins, int mode = 1, double weight=1.0);
59 
60  // Get number of triggers
61  int GetNTriggers_Pions(std::string filename, std::string treename,
62  bool IsMC=true);
63 
64  // Remove the doSysts from the following?
65  std::pair<TH1 *, TH1 *> GetMCIncidentEfficiency(
67  std::vector<double> bins, double reco_beam_endZ_cut,
68  int doSyst = 0, double weight = 1.);
69 
70  std::pair<TH1 *, TH1 *> GetMCInteractingEfficiency(
71  std::string fileName, std::string treeName,
72  std::vector<double> bins, std::string channel,
73  std::string topo, int toponum, double endZ_cut, int doSyst = 0,
74  double weight = 1.);
75 
76  //Tool to find bin quickly
77  int FindBin(double value, std::vector<double> binning);
78 
79  }
80 }
81 
82 #endif
TH1 * FillMCFlux_Pions(std::string filename, std::string treename, std::vector< double > Bins, int mode=1, double weight=1.0)
TH1 * FillMCIncidentHistogram_Pions(std::string filename, std::string treename, std::vector< double > recoBins, std::string topo, int toponum, double reco_beam_endZ_cut, double minval=0., double maxval=100000., bool doNegativeReco=false, int doSyst=0, std::string systName="", double weight=1.0, std::pair< double, double > PiMuScale={1., 1.})
TH1 * FillMCBackgroundHistogram_Pions(std::string filename, std::string treename, std::vector< double > recoBins, std::string channel, std::string topo, int toponum, double endZ_cut, double minval=0.0, double maxval=100000.0, bool doNegativeReco=false, int doSyst=0, std::string systName="", double weight=1.0, std::pair< double, double > PiMuScale={1., 1.})
TH1 * FillDataHistogram_Pions(std::string filename, std::string treename, std::vector< double > recoBins, std::string channel, double reco_beam_endZ_cut, bool doNegativeReco=false, bool IsIncidentHisto=false)
std::string string
Definition: nybbler.cc:12
int FindBin(double value, std::vector< double > binning)
uint8_t channel
Definition: CRTFragment.hh:201
string filename
Definition: train.py:213
weight
Definition: test.py:257
fileName
Definition: dumpTree.py:9
std::pair< TH1 *, TH1 * > GetMCIncidentEfficiency(std::string fileName, std::string treeName, std::vector< double > bins, double reco_beam_endZ_cut, int doSyst=0, double weight=1.)
TH1 * FillMCTruthSignalHistogram_Pions(std::string filename, std::string treename, std::vector< double > truthBins, std::string channel, double weight=1.0)
TH1 * FillDataSidebandHistogram_Pions(std::string filename, std::string treename, std::string channel, double endZ_cut, std::vector< double > binning, double weight=1.)
std::pair< TH1 *, TH1 * > GetMCInteractingEfficiency(std::string fileName, std::string treeName, std::vector< double > bins, std::string channel, std::string topo, int toponum, double endZ_cut, int doSyst=0, double weight=1.)
TH1 * FillMCSignalHistogram_Pions(std::string filename, std::string treename, std::vector< double > recoBins, std::string channel, std::string topo, int toponum, double minval, double maxval, double endZ_cut, bool doNegativeReco=false, int doSyst=0, std::string systName="", double weight=1.0, std::pair< double, double > PiMuScale={1., 1.})
TH1 * FillMCSidebandHistogram_Pions(std::string filename, std::string treename, std::string channel, std::string topo, int toponum, double endZ_cut, std::vector< double > binning, double weight=1.)
int GetNTriggers_Pions(std::string filename, std::string treename, bool IsMC=true)