LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TCHist.cxx
Go to the documentation of this file.
2 
3 namespace tca {
4 
6  {
7 
8  // study electrons
9  fChgRMS[0] = tfs.make<TH1F>("ChgRMS0","ChgRMS - Electrons", 50, 0, 1);
10  fChgRMS[1] = tfs.make<TH1F>("ChgRMS1","ChgRMS - Muons", 50, 0, 1);
11  fChgRMS[2] = tfs.make<TH1F>("ChgRMS2","ChgRMS - Pions", 50, 0, 1);
12  fChgRMS[3] = tfs.make<TH1F>("ChgRMS3","ChgRMS - Kaons", 50, 0, 1);
13  fChgRMS[4] = tfs.make<TH1F>("ChgRMS4","ChgRMS - Protons", 50, 0, 1);
14 
15  fMomAsym[0] = tfs.make<TH1F>("MomAsym0","MomAsym - Electrons", 50, 0, 1);
16  fMomAsym[1] = tfs.make<TH1F>("MomAsym1","MomAsym - Muons", 50, 0, 1);
17  fMomAsym[2] = tfs.make<TH1F>("MomAsym2","MomAsym - Pions", 50, 0, 1);
18  fMomAsym[3] = tfs.make<TH1F>("MomAsym3","MomAsym - Kaons", 50, 0, 1);
19  fMomAsym[4] = tfs.make<TH1F>("MomAsym4","MomAsym - Protons", 50, 0, 1);
20 
21  fElectronLike[0] = tfs.make<TH1F>("ElectronLike0","ElectronLike - Electrons", 50, 0, 1);
22  fElectronLike[1] = tfs.make<TH1F>("ElectronLike1","ElectronLike - Muons", 50, 0, 1);
23  fElectronLike[2] = tfs.make<TH1F>("ElectronLike2","ElectronLike - Pions", 50, 0, 1);
24  fElectronLike[3] = tfs.make<TH1F>("ElectronLike3","ElectronLike - Kaons", 50, 0, 1);
25  fElectronLike[4] = tfs.make<TH1F>("ElectronLike4","ElectronLike - Protons", 50, 0, 1);
26 
27  fElectronLike_Len[0] = tfs.make<TH2F>("ElectronLike_Len0","ElectronLike vs length - Electrons", 100, 0, 100, 100, 0, 1);
28  fElectronLike_Len[1] = tfs.make<TH2F>("ElectronLike_Len1","ElectronLike vs length - Muons", 100, 0, 100, 100, 0, 1);
29  fElectronLike_Len[2] = tfs.make<TH2F>("ElectronLike_Len2","ElectronLike vs length - Pions", 100, 0, 100, 100, 0, 1);
30  fElectronLike_Len[3] = tfs.make<TH2F>("ElectronLike_Len3","ElectronLike vs length - Kaons", 100, 0, 100, 100, 0, 1);
31  fElectronLike_Len[4] = tfs.make<TH2F>("ElectronLike_Len4","ElectronLike vs length - Protons", 100, 0, 100, 100, 0, 1);
32 
33  // study showers
34  AlongTrans1 = tfs.make<TH2F>("AlongTrans1","Trans vs Along 100 MeV",400, -50, 150, 40, 0, 20);
35  AlongTrans5 = tfs.make<TH2F>("AlongTrans5","Trans vs Along 500 MeV",400, -50, 150, 40, 0, 20);
36  AlongTrans9 = tfs.make<TH2F>("AlongTrans9","Trans vs Along 900 MeV",400, -50, 150, 40, 0, 20);
37 
38  fChgToMeV[0] = tfs.make<TH1F>("ChgToMeV0","ChgToMeV Pln 0", 80, 0, 0.04);
39  fChgToMeV[1] = tfs.make<TH1F>("ChgToMeV1","ChgToMeV Pln 1", 80, 0, 0.04);
40  fChgToMeV[2] = tfs.make<TH1F>("ChgToMeV2","ChgToMeV Pln 2", 80, 0, 0.04);
41  fChgToMeV_Etru = tfs.make<TProfile>("ChgToMeV_Etru","ChgToMeV vs Etru Pln 0", 10, 0, 1000);
42 
43  // True - Reco unmatched hit fraction
44  fUnMatchedHitFrac = tfs.make<TH1F>("UnMatchedHitFrac","True-Reco Unmatched Hit Fraction", 200, 0, 0.2);
45 
46  // True - Reco vertex difference
47  fNuVtx_dx = tfs.make<TH1F>("Vtx dx","Vtx dx",80,-10,10);
48  fNuVtx_dy = tfs.make<TH1F>("Vtx dy","Vtx dy",80,-10,10);
49  fNuVtx_dz = tfs.make<TH1F>("Vtx dz","Vtx dz",80,-10,10);
50 
51  // Score of all 2D and 3D vertices
52  fVx2Score = tfs.make<TH1F>("Vx2_Score","Vx2 Score",80, 0, 100);
53  fVx3Score = tfs.make<TH1F>("Vx3_Score","Vx2 Score",100, 0, 100);
54  // Score of vertices that are matched to a true neutrino interaction vertex
55  fNuVx3Score = tfs.make<TH1F>("NuVx3Score","Vx3Score - TruNuVx matched",80, 0, 80);
56  fNuVx2Score = tfs.make<TH1F>("NuVx2Score","Vx2Score - TruNuVx matched",80, 0, 80);
57  // Difference in score between all others and the one matched to the true neutrino vertex
58  // Score(True matched) - Score(all others). Ideally the one matched to the true neutrino
59  // has the highest score resulting in all entries begin negative in this histogram
60  fNuVx3ScoreDiff = tfs.make<TH1F>("NuVx3ScoreDiff","Vx3Score - TruNuVx matched", 100, -100, 100);
61 
62  fVxTopoMat = tfs.make<TH1F>("VxTopoMat","VxTopo - True Vtx match",10, 0, 10);
63  fVxTopoNoMat = tfs.make<TH1F>("VxTopoNoMat","VxTopo - No MC match",10, 0, 10);
64 
65  fdWire[0] = tfs.make<TH1F>("dWireEl","dWire - Electrons",21,-10,10);
66  fdWire[1] = tfs.make<TH1F>("dWireMu","dWire - Muons",21,-10,10);
67  fdWire[2] = tfs.make<TH1F>("dWirePi","dWire - Pions",21,-10,10);
68  fdWire[3] = tfs.make<TH1F>("dWireKa","dWire - Kaons",21,-10,10);
69  fdWire[4] = tfs.make<TH1F>("dWirePr","dWire - Protons",21,-10,10);
70 
71  fTruT[0] = tfs.make<TH1F>("TruT_El","True KE (MeV) - Electrons", 100, 0, 1000);
72  fTruT[1] = tfs.make<TH1F>("TruT_Mu","True KE (MeV) - Muons", 100, 0, 1000);
73  fTruT[2] = tfs.make<TH1F>("TruT_Pi","True KE (MeV) - Pions", 100, 0, 1000);
74  fTruT[3] = tfs.make<TH1F>("TruT_Ka","True KE (MeV) - Kaons", 100, 0, 1000);
75  fTruT[4] = tfs.make<TH1F>("TruT_Pr","True KE (MeV) - Protons", 100, 0, 1000);
76 
77  fEP_T[0] = tfs.make<TProfile>("EP_T_El","EP vs T(MeV) - Electrons", 20, 0, 100);
78  fEP_T[1] = tfs.make<TProfile>("EP_T_Mu","EP vs T(MeV) - Muons", 20, 0, 1000);
79  fEP_T[2] = tfs.make<TProfile>("EP_T_Pi","EP vs T(MeV) - Pions", 20, 0, 1000);
80  fEP_T[3] = tfs.make<TProfile>("EP_T_Ka","EP vs T(MeV) - Kaons", 20, 0, 1000);
81  fEP_T[4] = tfs.make<TProfile>("EP_T_Pr","EP vs T(MeV) - Protons", 20, 0, 1000);
82 
83  fMCSMom_TruMom_e = tfs.make<TH2F>("MCSMom_TruMom_e","MCSMom vs Tru Mom electrons", 50, 0, 100, 50, 0, 1000);
84  fMCSMom_TruMom_mu = tfs.make<TH2F>("MCSMom_TruMom_mu","MCSMom vs Tru Mom electrons", 50, 0, 1000, 50, 0, 1000);
85  fMCSMom_TruMom_pi = tfs.make<TH2F>("MCSMom_TruMom_pi","MCSMom vs Tru Mom electrons", 50, 0, 1000, 50, 0, 1000);
86  fMCSMom_TruMom_p = tfs.make<TH2F>("MCSMom_TruMom_p","MCSMom vs Tru Mom electrons", 50, 0, 1000, 50, 0, 1000);
87 
88  // Same as above but with good Efficiency * Purity
89  fMCSMomEP_TruMom_e = tfs.make<TH2F>("MCSMomEP_TruMom_e","MCSMom vs Tru Mom electrons", 50, 0, 100, 50, 0, 1000);
90 
91  fNearTj[0] = tfs.make<TProfile>("fNearTj0","Frac Tps NearTj - Electrons", 5, 0, 500);
92  fNearTj[1] = tfs.make<TProfile>("fNearTj1","Frac Tps NearTj - Muons", 5, 0, 500);
93  fNearTj[2] = tfs.make<TProfile>("fNearTj2","Frac Tps NearTj - Pions", 5, 0, 500);
94  fNearTj[3] = tfs.make<TProfile>("fNearTj3","Frac Tps NearTj - Kaons", 5, 0, 500);
95  fNearTj[4] = tfs.make<TProfile>("fNearTj4","Frac Tps NearTj - Protons", 5, 0, 500);
96 
97 
98  PDGCode_reco_true = tfs.make<TH2F>("PDGCode_reco_true", "PDGCode Reco vs True", 5, -0.5, 4.5, 5, -0.5, 4.5);
99  // PFParticle start position reco - true
100  fPFPStartdX[0] = tfs.make<TH1F>("PFPStartdX0","PFP Start dX Reco-MC - Electrons", 100, -10, 10);
101  fPFPStartdX[1] = tfs.make<TH1F>("PFPStartdX1","PFP Start dX Reco-MC - Muons", 100, -10, 10);
102  fPFPStartdX[2] = tfs.make<TH1F>("PFPStartdX2","PFP Start dX Reco-MC - Pions", 100, -10, 10);
103  fPFPStartdX[3] = tfs.make<TH1F>("PFPStartdX3","PFP Start dX Reco-MC - Kaons", 100, -10, 10);
104  fPFPStartdX[4] = tfs.make<TH1F>("PFPStartdX4","PFP Start dX Reco-MC - Protons", 100, -10, 10);
105  fPFPStartdY[0] = tfs.make<TH1F>("PFPStartdY0","PFP Start dY Reco-MC - Electrons", 100, -10, 10);
106  fPFPStartdY[1] = tfs.make<TH1F>("PFPStartdY1","PFP Start dY Reco-MC - Muons", 100, -10, 10);
107  fPFPStartdY[2] = tfs.make<TH1F>("PFPStartdY2","PFP Start dY Reco-MC - Pions", 100, -10, 10);
108  fPFPStartdY[3] = tfs.make<TH1F>("PFPStartdY3","PFP Start dY Reco-MC - Kaons", 100, -10, 10);
109  fPFPStartdY[4] = tfs.make<TH1F>("PFPStartdY4","PFP Start dY Reco-MC - Protons", 100, -10, 10);
110  fPFPStartdZ[0] = tfs.make<TH1F>("PFPStartdZ0","PFP Start dZ Reco-MC - Electrons", 100, -10, 10);
111  fPFPStartdZ[1] = tfs.make<TH1F>("PFPStartdZ1","PFP Start dZ Reco-MC - Muons", 100, -10, 10);
112  fPFPStartdZ[2] = tfs.make<TH1F>("PFPStartdZ2","PFP Start dZ Reco-MC - Pions", 100, -10, 10);
113  fPFPStartdZ[3] = tfs.make<TH1F>("PFPStartdZ3","PFP Start dZ Reco-MC - Kaons", 100, -10, 10);
114  fPFPStartdZ[4] = tfs.make<TH1F>("PFPStartdZ4","PFP Start dZ Reco-MC - Protons", 100, -10, 10);
115  fPFPStartEnd = tfs.make<TH1F>("PFPStartEnd","PFP Start End", 2, -0.001, 1.001);
116  // PFParticle start direction reco - true
117  fPFPStartAngDiff[0] = tfs.make<TH1F>("PFPStartAngDiff0","PFP Start Ang Reco-MC - Electrons", 100, 0, M_PI);
118  fPFPStartAngDiff[1] = tfs.make<TH1F>("PFPStartAngDiff1","PFP Start Ang Reco-MC - Muons", 100, 0, M_PI);
119  fPFPStartAngDiff[2] = tfs.make<TH1F>("PFPStartAngDiff2","PFP Start Ang Reco-MC - Pions", 100, 0, M_PI);
120  fPFPStartAngDiff[3] = tfs.make<TH1F>("PFPStartAngDiff3","PFP Start Ang Reco-MC - Kaons", 100, 0, M_PI);
121  fPFPStartAngDiff[4] = tfs.make<TH1F>("PFPStartAngDiff4","PFP Start Ang Reco-MC - Protons", 100, 0, M_PI);
122 
123  fEff = tfs.make<TH1F>("Eff","Efficiency", 50, 0, 1);
124  fPur = tfs.make<TH1F>("Pur","Purity", 50, 0, 1);
125 /* TTree used to develop the TMVA showerParentReader
126  fShowerParentSig = tfs.make<TTree>("shwr_parent_tree_sig", "shwr_parent_tree_sig");
127  fShowerParentSig->Branch("fShEnergy", &fShEnergy, "fShEnergy/F");
128  fShowerParentSig->Branch("fPfpEnergy", &fPfpEnergy, "fPfpEnergy/F");
129  fShowerParentSig->Branch("fMCSMom", &fMCSMom, "fMCSMom/F");
130  fShowerParentSig->Branch("fPfpLen", &fPfpLen, "fPfpLen/F");
131  fShowerParentSig->Branch("fSep", &fSep, "fSep/F");
132  fShowerParentSig->Branch("fDang1", &fDang1, "fDang1/F");
133  fShowerParentSig->Branch("fDang2", &fDang2, "fDang2/F");
134  fShowerParentSig->Branch("fChgFrac", &fChgFrac, "fChgFrac/F");
135  fShowerParentSig->Branch("fAlong", &fAlong, "fAlong/F");
136  fShowerParentSig->Branch("fTrans", &fTrans, "fTrans/F");
137  fShowerParentSig->Branch("fInShwrProb", &fInShwrProb, "fInShwrProb/F");
138 
139  fShowerParentBkg = tfs.make<TTree>("shwr_parent_tree_bkg", "shwr_parent_tree_bkg");
140  fShowerParentBkg->Branch("fShEnergy", &fShEnergy, "fShEnergy/F");
141  fShowerParentBkg->Branch("fPfpEnergy", &fPfpEnergy, "fPfpEnergy/F");
142  fShowerParentBkg->Branch("fMCSMom", &fMCSMom, "fMCSMom/F");
143  fShowerParentBkg->Branch("fPfpLen", &fPfpLen, "fPfpLen/F");
144  fShowerParentBkg->Branch("fSep", &fSep, "fSep/F");
145  fShowerParentBkg->Branch("fDang1", &fDang1, "fDang1/F");
146  fShowerParentBkg->Branch("fDang2", &fDang2, "fDang2/F");
147  fShowerParentBkg->Branch("fChgFrac", &fChgFrac, "fChgFrac/F");
148  fShowerParentBkg->Branch("fAlong", &fAlong, "fAlong/F");
149  fShowerParentBkg->Branch("fTrans", &fTrans, "fTrans/F");
150  fShowerParentBkg->Branch("fInShwrProb", &fInShwrProb, "fInShwrProb/F");
151 */
152  }
153 
154 
155 } // tca
TH1F * fTruT[5]
Definition: TCHist.h:40
TH2F * fMCSMom_TruMom_p
Definition: TCHist.h:45
TProfile * fNearTj[5]
Definition: TCHist.h:70
TH2F * fMCSMom_TruMom_mu
Definition: TCHist.h:43
TH2F * fMCSMomEP_TruMom_e
Definition: TCHist.h:47
TH2F * fMCSMom_TruMom_pi
Definition: TCHist.h:44
TH1F * fPur
Definition: TCHist.h:81
TH1F * fElectronLike[5]
Definition: TCHist.h:28
TH1F * fPFPStartEnd
Definition: TCHist.h:74
TProfile * fEP_T[5]
Definition: TCHist.h:67
TH2F * PDGCode_reco_true
Definition: TCHist.h:73
void CreateHists(art::TFileService &tfs)
Definition: TCHist.cxx:5
TH1F * fNuVtx_dy
Definition: TCHist.h:51
TH1F * fMomAsym[5]
Definition: TCHist.h:27
TH1F * fPFPStartdZ[5]
Definition: TCHist.h:77
TH1F * fNuVx3ScoreDiff
Definition: TCHist.h:57
TH2F * fElectronLike_Len[5]
Definition: TCHist.h:29
TH1F * fPFPStartAngDiff[5]
Definition: TCHist.h:78
TH2F * AlongTrans5
Definition: TCHist.h:34
TH1F * fChgToMeV[3]
Definition: TCHist.h:31
TH1F * fVx2Score
Definition: TCHist.h:61
TH2F * fMCSMom_TruMom_e
Definition: TCHist.h:42
TH1F * fEff
Definition: TCHist.h:80
TH1F * fVxTopoMat
Definition: TCHist.h:58
TH1F * fUnMatchedHitFrac
Definition: TCHist.h:37
TH1F * fNuVtx_dx
Definition: TCHist.h:50
TH2F * AlongTrans9
Definition: TCHist.h:35
TH1F * fChgRMS[5]
Definition: TCHist.h:26
TH2F * AlongTrans1
Definition: TCHist.h:33
T * make(ARGS...args) const
TH1F * fVxTopoNoMat
Definition: TCHist.h:59
TProfile * fChgToMeV_Etru
Definition: TCHist.h:32
TH1F * fPFPStartdY[5]
Definition: TCHist.h:76
TH1F * fVx3Score
Definition: TCHist.h:62
TH1F * fPFPStartdX[5]
Definition: TCHist.h:75
TH1F * fNuVx3Score
Definition: TCHist.h:55
TH1F * fdWire[5]
Definition: TCHist.h:65
TH1F * fNuVx2Score
Definition: TCHist.h:56
TH1F * fNuVtx_dz
Definition: TCHist.h:52