30 float inel, hpp, wshw, lidcos;
32 float starty, stopy, cosang,
maxy, efrac, nplfr, lid;
37 float cvne,
remid, cvnsse, cvnprelec, cvnprmuon, lidmulll, lidelll, lidemullt, lidemulll;
39 float prongl,sparseassym,costhetaZ,ptp,pxp,pyp,
vtxx,
vtxy,
vtxz, xyhit_assym;
41 float disttop,distbottom,distfront,distback,disteast,distwest,distnottop;
51 TFile*
outFile = TFile::Open(out.c_str(),
"recreate");
54 TH1F *
pot =
new TH1F(
"pot",
"",1,0,1);
55 TH1F *
livetime =
new TH1F(
"livetime",
"",1,0,1);
56 TTree *sigTree =
new TTree(
"sigTree",
"");
57 TTree *bkgTree =
new TTree(
"bkgTree",
"");
61 sigTree->Branch(
"nhit", &nhit);
62 sigTree->Branch(
"hitsperpl", &hpp);
63 sigTree->Branch(
"calE", &calE);
64 sigTree->Branch(
"inelast", &inel);
65 sigTree->Branch(
"costheta", &lidcos);
66 sigTree->Branch(
"cosang", &cosang);
67 sigTree->Branch(
"costhetaZ", &costhetaZ);
68 sigTree->Branch(
"numofshow", &nshw);
69 sigTree->Branch(
"widthofshow", &wshw);
70 sigTree->Branch(
"efrac", &efrac);
71 sigTree->Branch(
"xyhitassym", &xyhit_assym);
72 sigTree->Branch(
"prongl", &prongl);
73 sigTree->Branch(
"costhetaZ", &costhetaZ);
75 sigTree->Branch(
"cvne", &cvne);
76 sigTree->Branch(
"remid", &remid);
77 sigTree->Branch(
"lid", &lid);
78 sigTree->Branch(
"cvnsse", &cvnsse);
79 sigTree->Branch(
"cvnprelec", &cvnprelec);
80 sigTree->Branch(
"cvnprmuon", &cvnprmuon);
81 sigTree->Branch(
"lidmulll", &lidmulll);
82 sigTree->Branch(
"lidelll", &lidelll);
83 sigTree->Branch(
"lidemullt", &lidemullt);
84 sigTree->Branch(
"lidemulll", &lidemulll);
86 sigTree->Branch(
"sparseassym", &sparseassym);
87 sigTree->Branch(
"ptp", &ptp);
88 sigTree->Branch(
"pxp", &pxp);
89 sigTree->Branch(
"pyp", &pyp);
91 sigTree->Branch(
"starty", &starty);
92 sigTree->Branch(
"stopy", &stopy);
93 sigTree->Branch(
"maxy", &maxy);
94 sigTree->Branch(
"nplfr", &nplfr);
95 sigTree->Branch(
"vtxx", &vtxx);
96 sigTree->Branch(
"vtxy", &vtxy);
97 sigTree->Branch(
"vtxz", &vtxz);
98 sigTree->Branch(
"disttop", &disttop);
99 sigTree->Branch(
"distbottom", &distbottom);
100 sigTree->Branch(
"distfront", &distfront);
101 sigTree->Branch(
"distback", &distback);
102 sigTree->Branch(
"disteast", &disteast);
103 sigTree->Branch(
"distwest", &distwest);
104 sigTree->Branch(
"distnottop", &distnottop);
106 sigTree->Branch(
"pdg", &pdg);
107 sigTree->Branch(
"pdgorig", &pdgorig);
108 sigTree->Branch(
"woscdumb", &woscdumb);
109 sigTree->Branch(
"isGENIE", &isGENIE);
110 sigTree->Branch(
"isCC", &isCC);
114 bkgTree->Branch(
"nhit", &nhit);
115 bkgTree->Branch(
"hitsperpl", &hpp);
116 bkgTree->Branch(
"calE", &calE);
117 bkgTree->Branch(
"inelast", &inel);
118 bkgTree->Branch(
"costheta", &lidcos);
119 bkgTree->Branch(
"cosang", &cosang);
120 bkgTree->Branch(
"costhetaZ", &costhetaZ);
121 bkgTree->Branch(
"numofshow", &nshw);
122 bkgTree->Branch(
"widthofshow", &wshw);
123 bkgTree->Branch(
"efrac", &efrac);
124 bkgTree->Branch(
"xyhitassym", &xyhit_assym);
125 bkgTree->Branch(
"prongl", &prongl);
126 bkgTree->Branch(
"costhetaZ", &costhetaZ);
128 bkgTree->Branch(
"cvne", &cvne);
129 bkgTree->Branch(
"remid", &remid);
130 bkgTree->Branch(
"lid", &lid);
131 bkgTree->Branch(
"cvnsse", &cvnsse);
132 bkgTree->Branch(
"cvnprelec", &cvnprelec);
133 bkgTree->Branch(
"cvnprmuon", &cvnprmuon);
134 bkgTree->Branch(
"lidmulll", &lidmulll);
135 bkgTree->Branch(
"lidelll", &lidelll);
136 bkgTree->Branch(
"lidemullt", &lidemullt);
137 bkgTree->Branch(
"lidemulll", &lidemulll);
139 bkgTree->Branch(
"sparseassym", &sparseassym);
140 bkgTree->Branch(
"ptp", &ptp);
141 bkgTree->Branch(
"pxp", &pxp);
142 bkgTree->Branch(
"pyp", &pyp);
144 bkgTree->Branch(
"starty", &starty);
145 bkgTree->Branch(
"stopy", &stopy);
146 bkgTree->Branch(
"maxy", &maxy);
147 bkgTree->Branch(
"nplfr", &nplfr);
148 bkgTree->Branch(
"vtxx", &vtxx);
149 bkgTree->Branch(
"vtxy", &vtxy);
150 bkgTree->Branch(
"vtxz", &vtxz);
151 bkgTree->Branch(
"disttop", &disttop);
152 bkgTree->Branch(
"distbottom", &distbottom);
153 bkgTree->Branch(
"distfront", &distfront);
154 bkgTree->Branch(
"distback", &distback);
155 bkgTree->Branch(
"disteast", &disteast);
156 bkgTree->Branch(
"distwest", &distwest);
157 bkgTree->Branch(
"distnottop", &distnottop);
159 bkgTree->Branch(
"pdg", &pdg);
160 bkgTree->Branch(
"pdgorig", &pdgorig);
161 bkgTree->Branch(
"woscdumb", &woscdumb);
162 bkgTree->Branch(
"isGENIE", &isGENIE);
163 bkgTree->Branch(
"isCC", &isCC);
180 TH1* curpot = (TH1*)
inFile->Get(
"TotalPOT");
181 pot->Fill(0.5,curpot->Integral());
183 isGENIE = curpot->Integral() > 0;
185 TH1* curlivetime = (TH1*)
inFile->Get(
"TotalLivetime");
186 livetime->Fill(0.5,curlivetime->Integral());
192 recTree->SetBranchAddress(
"rec", &sr);
195 for(
int i = 0;
i<recTree->GetEntries();
i++) {
197 recTree->GetEntry(
i);
200 if (sr->
sel.cvnProd3Train.nueid < 0.5)
265 float maxyall = -999.0;
278 cvne = sr->
sel.cvn2017.nueid;
279 cvnsse = sr->
sel.cvnProd3Train.nueid;
326 xyhit_assym = -1000.0;
333 if(xyhitsum>0) xyhit_assym = xyhitdiff/xyhitsum;
341 costhetaZ = dir.Dot(beamDir);
366 distnottop = distbottom;
367 if (distwest < distnottop) distnottop = distwest;
368 if (disteast < distnottop) distnottop = disteast;
369 if (distfront < distnottop) distnottop = distfront;
370 if (distback < distnottop) distnottop = distback;
374 if (sr->
mc.
nnu != 0){
375 pdg = sr->
mc.
nu[0].pdg;
376 pdgorig = sr->
mc.
nu[0].pdgorig;
377 isCC = sr->
mc.
nu[0].iscc;
378 woscdumb = sr->
mc.
nu[0].woscdumb;
T max(const caf::Proxy< T > &a, T b)
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
std::vector< SRFuzzyKProng > png
Vector of 3D prong objects.
SRKalman kalman
Tracks produced by KalmanTrack.
float pid
PID value output by kNN.
unsigned int nshwlid
number of shwlid showers - either 0 or number of 3d prongs
std::string getenv(std::string const &name)
SRNueCosRej nuecosrej
Output from NueCosRej (Nue Cosmic Rejection)
SRRemid remid
Output from RecoMuonID (ReMId) package.
float calE
Calorimetric energy of the cluster [GeV].
File source based on a SAM query or dataset (definition)
SRVector3D vtx
Vertex position in detector coordinates. [cm].
short nnu
Number of neutrinos in nu vector (0 or 1)
float ann
ann output for the slice, currently the same as most energetic shower
unsigned int nhit
number of hits
The StandardRecord is the primary top-level object in the Common Analysis File trees.
void make_dst_cosrejbdttrain(std::string fname, std::string out)
SRELid lid
Output from LIDBuilder (LID) package.
SRIDBranch sel
Selector (PID) branch.
SRElastic elastic
Single vertex found by Elastic Arms.
virtual TFile * GetNextFile() override
Returns the next file in sequence, ready for reading.
int nplanestofront
number of planes between the front of the detector (configuration dependent) and hit with the smalles...
SRSlice slc
Slice branch: nhit, extents, time, etc.
TVector3 NuMIBeamDirection(caf::Det_t det)
Average direction of NuMI neutrinos in a given detector This function is a copy of geo::GeometryBase:...
SRTruthBranch mc
Truth branch for MC: energy, flavor, etc.
SRFuzzyK fuzzyk
Primary 3D prong object.
SRVeto veto
Output from CosmicVeto (Preliminary preselection)
SRTrackBranch trk
Track branch: nhit, len, etc.
SRContain contain
Output from SRContain (containment related variables)
std::vector< SRNeutrino > nu
implemented as a vector to maintain mc.nu structure, i.e. not a pointer, but with 0 or 1 entries...
SRVertexBranch vtx
Vertex branch: location, time, etc.