CalibAnaPlot.h
Go to the documentation of this file.
1 #include "TFile.h"
2 #include "TTree.h"
3 #include "TStyle.h"
4 #include "TVector3.h"
5 
6 #include <map>
7 #include <iostream>
8 #include <iomanip>
9 #include <fstream>
10 
11 #include "DrawUtils.h" // most of the usual ROOT includes
12 #include "Detector.h"
13 
14 class CalibAnaPlot {
15 
16  public:
17  CalibAnaPlot( std::string outpath );
18  virtual void SchedulePlots(){};
19  virtual void ScheduleSamples(){};
20  virtual void ScheduleEventVars(){};
21  virtual void ScheduleTrackVars(){};
22  virtual void ScheduleHitVars(){};
23  virtual void FillEventPlots(){};
24  virtual void FillTrackPlots(){};
25  virtual void FillHitPlots(){};
26  //virtual void Draw();
27 
28  std::map<std::string, std::string> GetSamples(){return fSamples;}
29 
30  void Initialize();
31  void SetTreeLoopLimit (unsigned int limit) {fLimit=limit;}
32  void SetTreeLoopStride(unsigned int stride){fStride=stride;}
33 
34  void Draw( std::string pdfdir,
35  std::vector< Plot > plots,
36  Plot denom_plot,
37  std::string ratio_title="" );
38 
39  void DrawPeriodLines(float ymin, float ymax, bool withEpochs=false);
40 
41  void PrintUnderOverFlow( TH1 * h,
42  std::string plotname,
43  std::string samp );
44 
45  void ProcessTrees(std::string sample);
46 
47  void MakeDir(std::string path);
48 
50 
51  void HaddAllDataFile();
52  bool ProcessedAllData();
53  void PrintEpochLengths();
54 
55  protected:
56 
57  std::map< std::string, TH1* > fPlots; // cleared every sample
58  std::map< std::string, TH2* > f2dPlots; // cleared every sample
59  std::map<std::string, std::string> fSamples;
61  std::vector< std::string > fProcessedSamples;
63  unsigned int fLimit;
64  unsigned int fStride;
69 
70 
71  void SetEventBranches(TTree * t);
72  void SetTrackBranches(TTree * t);
73  void SetHitBranches(TTree * t);
74  bool UseEVar(std::string var);
75  bool UseTVar(std::string var);
76  bool UseHVar(std::string var);
77 
78  // Track Event Branches
79  int run, subrun, event;
80  uint32_t evt_time;
85 
86  // Track Tree Branches
90  int trk_pdg;
96  TVector3 trk_startpos;
97  TVector3 trk_endpos;
98 
99  // Hit Tree Branches
100  bool istricell;
101  bool istraj;
102  bool isavg;
103  bool isz;
104  int diblock;
105  int dcm;
106  int apd;
107  int pixel;
108  int plane;
109  int cell;
110  int view;
111  float w;
112  float readdist;
114  float pe;
115  float pecorr;
116  float pecorrtomev;
117  float recoMeV;
118  float path;
119  float flightLen;
120  float cmFromEnd;
121  float tns;
122  float truepath;
123  float truepe;
124  float truew;
125  float trueMeV;
128  int tdc;
129  int adc;
130 
131  private:
133  void progbar(int current, float max_inv);
134 
135 };
136 
137 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
139 {
140  // initialize things that shouldn't be reset in ProcessTrees
141  ScheduleHitVars();
144  ScheduleSamples();
145  for(auto& samp : fSamples) MakeDir(fOutPath+"/"+samp.first);
146 }
147 
148 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
150 : fOutPath(outpath),
151  fStride(1),
152  fLimit(0),
153  fCurrentPercProg(-1)
154 {
155  MakeDir(outpath);
156  if (outpath.find("nd_")!=std::string::npos){ fDet = new Detector("nd"); }
157  else if(outpath.find("fd_")!=std::string::npos){ fDet = new Detector("fd"); }
158  else if(outpath.find("tb_")!=std::string::npos){ fDet = new Detector("tb"); }
159  else{
160  std::cout << "Outpath \"" <<outpath<< "\" does not denote detector." << std::endl;
161  std::abort(); }
162 
163  std::cout << "\nSet detector to " << fDet->FullName() << std::endl << std::endl;
164 }
165 
166 
167 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
169  std::vector< Plot > plots,
170  Plot denom_plot,
171  std::string ratio_title )
172 {
173  // Protect sample directories
174  if( fSamples.count(pdfdir) ){
175  std::cout << "Sample names reserved for their own directory, change output dir: "
176  << pdfdir << std::endl; return; }
177  MakeDir(fOutPath+"/"+pdfdir);
178 
179 
180  DrawUtils dutil;
181  // Manage our own canvases
182  TCanvas* c = new TCanvas("c","c");
183  TCanvas* cleg = new TCanvas( "cleg","cleg", 1800, 600);
184  dutil.DrawPlotStack( c, cleg, plots, denom_plot, ratio_title );
185  if(cleg){
186  cleg->Print(Form("%s/%s/legend.pdf",
187  fOutPath.c_str(),
188  pdfdir.c_str()));
189  }
190 
191  // plots vs time should denote period divisions
192  c->cd();
193  if(denom_plot.name.find("_time_")!=std::string::npos)
194  DrawPeriodLines( dutil.GetLastYMin(),
195  dutil.GetLastYMax(), true);
196 
197  c->Print(Form("%s/%s/%s.pdf",
198  fOutPath.c_str(),
199  pdfdir.c_str(),
200  denom_plot.name.c_str())); // does this need to be more specific?
201  delete c;
202  delete cleg;
203 
204  /*
205 
206  // 2d plots: Make colz plot for each sample
207  gStyle->SetPalette(kBird);
208  for( auto& pname : f2dPlots ){
209  std::string plotname = pname.first;
210  for( auto& samp : samples ){
211 
212  TH2* h2;
213  histfiles[samp]->GetObject( plotname.c_str(), h2);
214  if(!h2){ std::cout << "did not find " << plotname
215  << " in " << samp << std::endl; continue; }
216 
217  // Keep these separate from the pdfdir group of samples
218  // since we can only draw one sample at a time.
219  std::string pdf = Form("%s/%s/%s.pdf",
220  fOutPath.c_str(),
221  samp.c_str(),
222  plotname.c_str());
223 
224 
225  //if(FileMade(pdf)) continue; // dont redo this sample
226 
227  dutil.Draw2DPlot( c, h2 );
228  c->Print(pdf.c_str());
229  c->Clear();
230  //gROOT->SetStyle("novaStyle");
231  }
232  } // 2d plot loop
233 
234  */
235 
236 } // Draw
237 
238 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
240 {
241  if( key=="nd_data_ep4b.1" ) return "Data: Epoch 4b.1";
242  if( key=="nd_data_ep4b.2" ) return "Data: Epoch 4b.2";
243 
244  if( key=="fd_mc_p2" ) return "MC P.2 Low Gain";
245  if( key=="fd_mc_p3" ) return "MC P.3 High Gain";
246  if( key=="fd_mc_p5" ) return "MC P.5 High Gain";
247  if( key=="fd_mc_p2_2016" ) return "MC P.2 Low Gain (2016)";
248  if( key=="fd_mc_p3_2016" ) return "MC P.3 High Gain (2016)";
249 
250  std::string label = key.find("mc")!=std::string::npos ? "MC" : "Data";
251 
252  if(key.find("ep")!=std::string::npos)
253  label += ": Epoch " + key.substr(key.length()-2, 2);
254  return label;
255 }
256 
257 
258 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
260  std::string plotname,
261  std::string samp )
262 {
263  float underflow = 100.*h->GetBinContent(0)/h->Integral(0,h->GetNbinsX()+1);
264  float overflow = 100.*h->GetBinContent(h->GetNbinsX()+1)/h->Integral(0,h->GetNbinsX()+1);
265  if(underflow>1e-2)
266  std::cout << plotname << " " << samp << " underflow %: " << underflow << std::endl;
267  if(overflow>1e-2)
268  std::cout << plotname << " " << samp << " overflow %: " << overflow << std::endl;
269  return;
270 }
271 
272 
273 
274 
275 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
277 {
278  if(UseEVar("evt_nhits_tricell")) t->SetBranchAddress( "evt_nhits_tricell", &evt_nhits_tricell );
279 }
280 
281 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
283 {
284  if(UseTVar("trk_nhits_tricell")) t->SetBranchAddress( "trk_nhits_tricell", &trk_nhits_tricell );
285 }
286 
287 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
289 {
290  // Set branches for all variables we want to use
291  // Speed things up by not filling variables not intended to use
292  if(UseHVar("run")) t->SetBranchAddress( "run", &run );
293  if(UseHVar("subrun")) t->SetBranchAddress( "run", &subrun );
294  if(UseHVar("event")) t->SetBranchAddress( "event", &run );
295  if(UseHVar("view")) t->SetBranchAddress( "view", &view );
296  if(UseHVar("diblock")) t->SetBranchAddress( "diblock", &diblock );
297  if(UseHVar("pe")) t->SetBranchAddress( "pe", &pe );
298  if(UseHVar("pecorr")) t->SetBranchAddress( "pecorr", &pecorr );
299  if(UseHVar("path")) t->SetBranchAddress( "path", &path );
300  if(UseHVar("w")) t->SetBranchAddress( "w", &w );
301  if(UseHVar("cmFromEnd")) t->SetBranchAddress( "cmFromEnd", &cmFromEnd );
302  if(UseHVar("plane")) t->SetBranchAddress( "plane", &plane );
303  if(UseHVar("cell")) t->SetBranchAddress( "cell", &cell );
304  if(UseHVar("recoMeV")) t->SetBranchAddress( "recoMeV", &trueMeV );
305  if(UseHVar("trueMeV")) t->SetBranchAddress( "trueMeV", &trueMeV );
306  if(UseHVar("truepath")) t->SetBranchAddress( "truepath", &truepath );
307  if(UseHVar("brightbin")) t->SetBranchAddress( "brightbin", &brightbin );
308  if(UseHVar("evt_time")) t->SetBranchAddress( "evt_time", &evt_time ); // drift studies
309 }
310 
311 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
313 {
314  return ( fEventVars.find(var+",")!=std::string::npos );
315 }
316 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
318 {
319  return ( fTrackVars.find(var+",")!=std::string::npos );
320 }
321 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
323 {
324  return ( fHitVars.find(var+",")!=std::string::npos );
325 }
326 
327 
328 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
330 {
331  fCurrentSample = samp;
332 
333  if(fSamples.count(samp)==0){
334  std::cout << "\nNo sample scheduled with name \"" << samp
335  << "\". Possible samples:" << std::endl;
336  for(auto& s : fSamples) std::cout << s.first << ": " << s.second << std::endl;
337  std::abort();
338  } else {
339  std::cout << "\nProcessing " << samp << " from " << fSamples[samp] << std::endl;
340  }
341 
342  bool isMC = samp.find("mc")!=std::string::npos;
343 
344  TFile* f = new TFile(fSamples[samp].c_str());
345  if(!f){ std::cout << "did not find " << fSamples[samp] << std::endl; return; }
346 
347  SchedulePlots();
348 
349  /*
350  // Get information about the calibration
351  TTree* t_meta;
352  f->GetObject("calibana/file_tree",t_meta);
353  std::string csvpath_atten;
354  t_meta->SetBranchAddress( "csvpath_atten", &csvpath_atten );
355  t_meta->GetEntry(0);
356  std::cout << t_meta->GetEntries() << " files calibrated with: \n"
357  << " Atten: " << csvpath_atten << std::endl;
358  */
359 
360 
361  if(fEventVars!=""){
362  TTree* eventTree;
363  f->GetObject("calibana/event_tree",eventTree);
364  if(!eventTree) std::cout << "Did not find calibana/event_tree" << std::endl;
365  SetEventBranches(eventTree);
366  std::cout << " ... Event Tree" << std::endl;
367  size_t n = eventTree->GetEntries();
368  if(fLimit && n>fLimit) n = fLimit;
369  size_t e=0;
370  while(e<n){
371  eventTree->GetEntry(e);
372  if(e%1000000==0) std::cout << e << "/" << n << std::endl;
373  FillEventPlots();
374  e += 1; // e += fStride; shouldn't need stride for event loop
375  }
376  }
377 
378 
379  if(fTrackVars!=""){
380  TTree* trackTree;
381  f->GetObject("calibana/track_tree",trackTree);
382  if(!trackTree) std::cout << "Did not find calibana/track_tree" << std::endl;
383  SetTrackBranches(trackTree);
384  std::cout << " ... Track Tree" << std::endl;
385  size_t n = trackTree->GetEntries();
386  if(fLimit && n>fLimit) n = fLimit;
387  size_t e=0;
388  while(e<n){
389  trackTree->GetEntry(e);
390  if(e%1000000==0) std::cout << e << "/" << n << std::endl;
391  FillTrackPlots();
392  e += 1; // e += fStride; shouldn't need stride for track loop
393  }
394  }
395 
396  if(fHitVars!=""){
397  TTree* tricellTree;
398  f->GetObject("calibana/tricell_tree",tricellTree);
399  if(!tricellTree) std::cout << "Did not find calibana/tricell_tree" << std::endl;
400  SetHitBranches(tricellTree);
401  size_t n = tricellTree->GetEntries();
402  std::cout << " ... Tricell Hits Tree: " << n << " entries" << std::endl;
403  if(fStride>1){
404  std::cout << " Using stride " << fStride
405  << ", for about " << (int)n/fStride << " hits processed." << std::endl;
406  } else if(fLimit && n>fLimit){
407  n = fLimit;
408  std::cout << " Limiting to " << fLimit
409  << " hits.\nWarning: Prefer stride over limit for getting a better sweep of runs."
410  << std::endl;
411  }
412  size_t e=0;
413  float nverse=1./n;
414  while(e<n){
415  tricellTree->GetEntry(e);
416  progbar(e,nverse);
417  FillHitPlots();
418  e += fStride;
419  }
420  progbar(n+1,nverse); // ensure last print, floor((n+1)/n)=1.
421 
422  }
423 
424 
425  // Dump everything to an output file to be read in by Draw
426  TFile* outf = new TFile(Form("%s/%s.root",
427  fOutPath.c_str(), samp.c_str()),"recreate");
428  for( auto it=fPlots.begin(); it!=fPlots.end(); it++ ) it->second->Write();
429  for( auto it=f2dPlots.begin(); it!=f2dPlots.end(); it++ ) it->second->Write();
430  outf->Close();
431 
432  // Log sample as processed and hadd into total sample if done
433  fProcessedSamples.push_back(samp);
435 
436  // Need to empty and remake these every sample
437  fPlots.clear();
438  f2dPlots.clear();
439 
440 } // Process Trees
441 
442 
443 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
444 void CalibAnaPlot::progbar(int current, float max_inv) {
445  float prog = current * max_inv; // fractional progress
446  unsigned short prog_perc_floor = (unsigned short)std::floor(100*prog);
447  if( prog_perc_floor == fCurrentPercProg ) return; // dont waste time printing every entry
448 
449  fCurrentPercProg = prog_perc_floor;
450  std::cout << std::fixed << std::setprecision(2)
451  << "\r [" << std::string(prog_perc_floor, '.')
452  << std::string(100 - prog_perc_floor, ' ') << "] " << prog_perc_floor << "%";
453  if (prog_perc_floor == 100){ std::cout << std::endl; fCurrentPercProg=-1; }
454  else{ std::cout.flush(); }
455 }
456 
457 
458 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
460 {
461  std::string all_data_merge = fOutPath+"/"+fDet->name()+"_all_data.root";
462  std::string all_data_files = fOutPath+"/"+fDet->name()+"_data_ep*.root";
463  std::system(( "rm " + all_data_merge ).c_str() );
464  std::system(( "hadd " + all_data_merge + " " + all_data_files ).c_str() );
465 }
466 
467 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
469 {
470  // for every data sample, check if it has been processed
471  for(auto& samp : fSamples){
472  if(samp.first.find("data")!=std::string::npos) continue;
473  bool processed = false;
474  for(auto& done : fProcessedSamples)
475  if(samp.first==done) processed = true;
476  if(!processed) return false;
477  }
478  return true;
479 }
480 
481 
482 
483 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
485  if( -1 == std::system(( "mkdir -p " + path ).c_str() ) ){
486  std::cout << "Error creating directory: " << path << std::endl; exit(1); }
487 }
488 
489 
490 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
491 void CalibAnaPlot::DrawPeriodLines(float ymin, float ymax, bool withEpochs)
492 {
493 
494  for( auto& p : fDet->EndOfPeriodMap() ){
495  TLine* l = new TLine(p.second, ymin, p.second,
496  ymin + 0.2*(ymax-ymin));
497  //l->SetLineColorAlpha(16,0.8);
498  l->SetLineColor(14);
499  l->SetLineWidth(3);
500  //l->SetLineStyle(9);
501  l->Draw();
502  }
503 
504  if( withEpochs ){
505  for( auto& e : fDet->EndOfEpochMap() ){
506  TLine* l = new TLine( e.second, ymin ,e.second,
507  ymin + 0.15*(ymax-ymin) );
508  l->SetLineColor(kCyan+3);
509  l->SetLineWidth(2);
510  l->Draw();
511  }
512  }
513 
514 }
515 
516 //^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
518 {
519  std::string prev_epoch="2a";
520  std::map< std::string, uint32_t > epoch_end_map = fDet->EndOfEpochMap();
521  for( auto& e : epoch_end_map ){
522  if(e.first=="2a") continue;
523  std::cout << prev_epoch << " end -- " << e.first << " end: "
524  << 1.*(e.second-epoch_end_map[prev_epoch])/86400
525  << " days" << std::endl;
526  prev_epoch=e.first;
527  }
528 }
529 
void DrawPeriodLines(float ymin, float ymax, bool withEpochs=false)
Definition: CalibAnaPlot.h:491
std::map< std::string, TH1 * > fPlots
Definition: CalibAnaPlot.h:57
std::map< std::string, std::string > GetSamples()
Definition: CalibAnaPlot.h:28
TVector3 trk_endpos
Definition: CalibAnaPlot.h:97
system("rm -rf microbeam.root")
bool UseHVar(std::string var)
Definition: CalibAnaPlot.h:322
float GetLastYMax()
Definition: DrawUtils.h:108
std::vector< std::string > fProcessedSamples
Definition: CalibAnaPlot.h:61
set< int >::iterator it
void PrintUnderOverFlow(TH1 *h, std::string plotname, std::string samp)
Definition: CalibAnaPlot.h:259
bool ProcessedAllData()
Definition: CalibAnaPlot.h:468
std::map< std::string, TH2 * > f2dPlots
Definition: CalibAnaPlot.h:58
void PrintEpochLengths()
Definition: CalibAnaPlot.h:517
std::map< std::string, uint32_t > EndOfPeriodMap()
Definition: Detector.h:23
std::string fOutPath
Definition: CalibAnaPlot.h:62
const char * p
Definition: xmltok.h:285
void SetTrackBranches(TTree *t)
Definition: CalibAnaPlot.h:282
int trk_nhits_traj
Definition: CalibAnaPlot.h:95
int fCurrentPercProg
Definition: CalibAnaPlot.h:132
float trk_totlength
Definition: CalibAnaPlot.h:88
std::map< std::string, uint32_t > EndOfEpochMap()
Definition: Detector.h:24
CalibAnaPlot(std::string outpath)
Definition: CalibAnaPlot.h:149
void SetHitBranches(TTree *t)
Definition: CalibAnaPlot.h:288
float trk_dcosy
Definition: CalibAnaPlot.h:87
void MakeDir(std::string path)
Definition: CalibAnaPlot.h:484
uint32_t evt_time
Definition: CalibAnaPlot.h:80
std::string LegendLabel(std::string key)
Definition: CalibAnaPlot.h:239
void Initialize()
Definition: CalibAnaPlot.h:138
void SetEventBranches(TTree *t)
Definition: CalibAnaPlot.h:276
void SetTreeLoopLimit(unsigned int limit)
Definition: CalibAnaPlot.h:31
const char * label
virtual void SchedulePlots()
Definition: CalibAnaPlot.h:18
Double_t ymax
Definition: plot.C:25
const XML_Char * s
Definition: expat.h:262
std::string fHitVars
Definition: CalibAnaPlot.h:67
virtual void FillEventPlots()
Definition: CalibAnaPlot.h:23
virtual void ScheduleTrackVars()
Definition: CalibAnaPlot.h:21
====================================================================== ///
Definition: CutFlow_Data.C:28
void DrawPlotStack(TCanvas *&canv, TCanvas *&canvleg, const std::vector< Plot > &plot_vec, const Plot &plot_denom, std::string ratio_title="")
Definition: DrawUtils.h:145
unsigned int fStride
Definition: CalibAnaPlot.h:64
virtual void ScheduleEventVars()
Definition: CalibAnaPlot.h:20
float poissonlambda
Definition: CalibAnaPlot.h:126
unsigned int fLimit
Definition: CalibAnaPlot.h:63
const std::vector< Plot > plots
float trk_dcosz
Definition: CalibAnaPlot.h:87
int evt_nhits_tricell
Definition: CalibAnaPlot.h:83
std::string fEventVars
Definition: CalibAnaPlot.h:65
TFile * outf
Definition: testXsec.C:51
void ProcessTrees(std::string sample)
Definition: CalibAnaPlot.h:329
TVector3 trk_startpos
Definition: CalibAnaPlot.h:96
float pecorrtomev
Definition: CalibAnaPlot.h:116
int evt_nhits_traj
Definition: CalibAnaPlot.h:84
float trk_dcosx
Definition: CalibAnaPlot.h:87
virtual void ScheduleHitVars()
Definition: CalibAnaPlot.h:22
std::string name()
Definition: Detector.h:9
bool UseEVar(std::string var)
Definition: CalibAnaPlot.h:312
virtual void FillTrackPlots()
Definition: CalibAnaPlot.h:24
bool UseTVar(std::string var)
Definition: CalibAnaPlot.h:317
float GetLastYMin()
Definition: DrawUtils.h:107
Definition: run.py:1
void SetTreeLoopStride(unsigned int stride)
Definition: CalibAnaPlot.h:32
OStream cout
Definition: OStream.cxx:6
std::string fTrackVars
Definition: CalibAnaPlot.h:66
void HaddAllDataFile()
Definition: CalibAnaPlot.h:459
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
void Draw(std::string pdfdir, std::vector< Plot > plots, Plot denom_plot, std::string ratio_title="")
Definition: CalibAnaPlot.h:168
fvar< T > floor(const fvar< T > &x)
Definition: floor.hpp:11
exit(0)
float trk_totdisplace
Definition: CalibAnaPlot.h:89
Double_t ymin
Definition: plot.C:24
int trk_nhits_tricell
Definition: CalibAnaPlot.h:92
Float_t e
Definition: plot.C:35
std::map< std::string, std::string > fSamples
Definition: CalibAnaPlot.h:59
std::string FullName()
Definition: Detector.h:11
void progbar(int current, float max_inv)
Definition: CalibAnaPlot.h:444
std::string fCurrentSample
Definition: CalibAnaPlot.h:60
std::string name
Definition: DrawUtils.h:18
virtual void ScheduleSamples()
Definition: CalibAnaPlot.h:19
virtual void FillHitPlots()
Definition: CalibAnaPlot.h:25
Detector * fDet
Definition: CalibAnaPlot.h:68