30 std::map< int, std::map < int, bool > >
fBadFeb;
71 "Tyler Alion, Alexander Booth, Yibing Zhang",
72 "Miniproduction 5 Data vs. MC. Tricell hits from Stopping Cosmics populate all plots, with Absolute Calibration cuts applied. Showing PE/cm and PECorr/cm broken down by cell group and view then further by FEB.");
77 std::vector< std::string > views = {
"x",
"y"};
78 std::vector< std::string > mods = {
"_0-31",
"_32-63",
"_64-95"};
79 std::vector< std::string > yaxes = {
"pecm",
"pecorrcm"};
80 for(
auto&
view : views){
81 size_t firstplane = 1;
82 if(
view==
"y") firstplane = 0;
83 for(
auto& modstr : mods){
84 for(
auto& yax : yaxes){
86 std::vector< std::string > drawplots;
88 for(
size_t p=firstplane;
p<np;
p+=2)
90 drawplots.push_back(yax+
"_time_"+
view+modstr);
91 drawplots.push_back(yax+
"_time_"+
view+modstr+
"_febcut");
94 yax+
"_time_"+
view+modstr+
"_febcut",
95 "Mean: "+
view+modstr);
97 for(
auto& plotname : drawplots){
98 std::vector< Plot > plotstack;
100 plotstack.push_back(
Plot(
fOutPath+
"/"+samp.first+
".root",
104 Draw( plotdir, plotstack, denom_plot,
"" );
122 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_0-31", plotdir+
"/pecm_time_y_0-31" }, {
"",
""}, {
"",
""});
123 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_32-63", plotdir+
"/pecm_time_y_32-63"}, {
"",
""}, {
"",
""});
124 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_64-95", plotdir+
"/pecm_time_y_64-95"}, {
"",
""}, {
"",
""});
127 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_0-31", plotdir+
"/pecorrcm_time_y_0-31" }, {
"",
""}, {
"",
""});
128 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_32-63", plotdir+
"/pecorrcm_time_y_32-63"}, {
"",
""}, {
"",
""});
129 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_64-95", plotdir+
"/pecorrcm_time_y_64-95"}, {
"",
""}, {
"",
""});
134 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_0-31_febcut", plotdir+
"/pecm_time_y_0-31_febcut" }, {
"",
""}, {
"",
""});
135 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_32-63_febcut", plotdir+
"/pecm_time_y_32-63_febcut"}, {
"",
""}, {
"",
""});
136 fTex->
AddFigureRow({plotdir+
"/pecm_time_x_64-95_febcut", plotdir+
"/pecm_time_y_64-95_febcut"}, {
"",
""}, {
"",
""});
139 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_0-31_febcut", plotdir+
"/pecorrcm_time_y_0-31_febcut" }, {
"",
""}, {
"",
""});
140 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_32-63_febcut", plotdir+
"/pecorrcm_time_y_32-63_febcut"}, {
"",
""}, {
"",
""});
141 fTex->
AddFigureRow({plotdir+
"/pecorrcm_time_x_64-95_febcut", plotdir+
"/pecorrcm_time_y_64-95_febcut"}, {
"",
""}, {
"",
""});
146 for(
unsigned int p = 0;
p < nPlanes;
p++)
151 fTex->
AddFigureRow({plotdir+
"/pecm_time_"+pstr+
"_0-31", plotdir+
"/pecorrcm_time_"+pstr+
"_0-31" }, {
"",
""}, {
"",
""});
152 fTex->
AddFigureRow({plotdir+
"/pecm_time_"+pstr+
"_32-63", plotdir+
"/pecorrcm_time_"+pstr+
"_32-63"}, {
"",
""}, {
"",
""});
153 fTex->
AddFigureRow({plotdir+
"/pecm_time_"+pstr+
"_64-95", plotdir+
"/pecorrcm_time_"+pstr+
"_64-95"}, {
"",
""}, {
"",
""});
164 bool abscal_hit = (
w > -100 &&
w < 100 &&
169 if( !abscal_hit )
return;
170 if(
plane > 191)
return;
173 if(
view==0){ vstr=
"x"; }
174 if(
view==1){ vstr=
"y"; }
199 fAllDataPlots[
"pecm_time_"+endGroup] ->Fill(
evt_time,pecm);
200 fAllDataPlots[
"pecorrcm_time_"+endGroup]->Fill(
evt_time,pecorrcm);
204 fPlots[
"pecorrcm_time_"+endGroup+
"_febcut" ]->Fill(
evt_time,pecorrcm);
205 fAllDataPlots[
"pecm_time_"+endGroup+
"_febcut" ]->Fill(
evt_time,pecm);
206 fAllDataPlots[
"pecorrcm_time_"+endGroup+
"_febcut" ]->Fill(
evt_time,pecorrcm);
214 if( !
fBadFeb.count(plane) )
return false;
228 std::vector< int > planes = { 2, 10, 14, 16, 24, 38, 46, 50, 66, 82, 88, 90, 94, 114, 140, 150, 152, 184 };
229 for(
auto&
p : planes)
231 planes = { 12, 20, 46, 110, 124, 130, 166 };
232 for(
auto&
p : planes)
236 planes = { 5, 63, 75, 77, 93, 95, 135, 149 };
237 for(
auto&
p : planes)
239 planes = { 17, 31, 35, 69, 91, 95, 129, 175 };
240 for(
auto&
p : planes)
248 fHitVars=
"w, view, plane, cell, pe, pecorr, path, evt_time, cmFromEnd,";
256 std::vector< PlotAxis > xaxes = {
257 {
"time",
"Unix Time (s)", 100, 14e8, 16e8}
260 std::vector< ContentAxis > yaxes = {
262 {
"pecorrcm",
"PECorr/cm"},
265 std::vector< std::string > cells = {
"0-31",
"32-63",
"64-95"};
266 std::vector<int> planes(nPlanes);
267 std::iota(planes.begin(), planes.end(), 0);
268 for(
auto&
p : planes){
271 for(
auto&
c : cells){
272 for(
auto& xax : xaxes){
273 for(
auto& yax : yaxes){
279 (vstr+
" View, Plane "+
std::to_string(
p)+
", Cells "+c+
";" + xax.title +
";"+ yax.title).c_str(),
280 xax.nbins, xax.min, xax.max );
283 name = yax.label +
"_"+ xax.label +
"_"+ v +
"_" +
c;
285 (vstr+
" View, Cells "+c+
";" + xax.title +
";"+ yax.title).c_str(),
286 xax.nbins, xax.min, xax.max );
287 name = name +
"_febcut";
289 (vstr+
" View, Cells "+c+
" + FEB Cut;" + xax.title +
";"+ yax.title).c_str(),
290 xax.nbins, xax.min, xax.max );
302 std::vector< PlotAxis > xaxes = {
303 {
"time",
"Unix Time (s)", 100, 14e8, 16e8}
306 std::vector< ContentAxis > yaxes = {
308 {
"pecorrcm",
"PECorr/cm"},
311 std::vector< std::string > cells = {
"0-31",
"32-63",
"64-95"};
312 std::vector< std::string > views = {
"x",
"y"};
313 for(
auto&
v : views){
314 for(
auto&
c : cells){
315 for(
auto& xax : xaxes){
316 for(
auto& yax : yaxes){
319 fAllDataPlots[
name] =
new TProfile( name.c_str(),
320 (vCap+
" View, Cells "+c+
";" + xax.title +
";"+ yax.title).c_str(),
321 xax.nbins, xax.min, xax.max );
322 name = name +
"_febcut";
323 fAllDataPlots[
name] =
new TProfile( name.c_str(),
324 (vCap+
" View, Cells "+c+
" + FEB Cut;" + xax.title +
";"+ yax.title).c_str(),
325 xax.nbins, xax.min, xax.max );
336 std::vector< std::string > epoch_list = {
338 "2a",
"2b",
"2c",
"2d",
"2e",
340 "4a",
"4b.1",
"4b.2",
"4c",
348 for(
auto&
ep : epoch_list ){
349 if(
ep==
"4b.1" ||
ep==
"4b.2")
350 fSamples[
"nd_data_ep"+
ep]=
"/nova/ana/users/talion/miniprod5/pcliststop_miniprod5.b/nd_data_epoch4b/calibana/merged.root";
352 fSamples[
"nd_data_ep"+
ep]=
"/nova/ana/users/talion/miniprod5/pcliststop_miniprod5.b/nd_data_epoch"+
ep+
"/calibana/merged.root";
std::map< std::string, TH1 * > fPlots
std::map< std::string, std::string > GetSamples()
void ScheduleAllDataPlots()
unsigned int CellToModule(int cell)
std::string LegendLabel(std::string key)
void MakeMEUPerFEB(std::string outpath, std::string sample, bool justdraw=false, unsigned int stride=0, unsigned int limit=0)
void SetTreeLoopLimit(unsigned int limit)
std::vector< std::string > fEpochList
====================================================================== ///
MEUPerFEB(std::string outpath)
std::map< int, std::map< int, bool > > fBadFeb
void ProcessTrees(std::string sample)
void SectionNoNum(std::string secname)
void SetTreeLoopStride(unsigned int stride)
void DriftTex(std::string plotdir)
void Draw(std::string pdfdir, std::vector< Plot > plots, Plot denom_plot, std::string ratio_title="")
bool BadFeb(int plane, int cell)
std::map< std::string, std::string > fSamples
void AddFigureRow(std::vector< std::string > figure, std::vector< std::string > caption, std::vector< std::string > label)
std::string to_string(ModuleType const mt)