KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDataQualityAuditReporting_INDRAFAZIA.h
Go to the documentation of this file.
1 #ifndef E789_DATA_QUALITY_AUDIT_REPORTING_H
2 #define E789_DATA_QUALITY_AUDIT_REPORTING_H
3 
4 #include "KVBase.h"
6 #include <TCanvas.h>
7 
38 
40  enum class canvas_t {
41  kLandscape,
42  kPortrait
43  };
44 
46 
48 
49  std::map<double, std::vector<KVDetector*>> fazia_map;
50  void make_fazia_map(double theta_bin);
51 
52  std::vector<int> markers {20, 24, 21, 25, 34, 28, 47, 46, 45, 44, 29, 30, 43, 42, 22, 26, 23, 32};
53 
54  std::pair<int, int> get_layout(size_t ntels)
55  {
56  assert(ntels <= 16);
57  if (ntels <= 8) return {4, 2};
58  else if (ntels <= 12) return {4, 3};
59  return {4, 4};
60  }
61  void fill_telescopes_of_group(TList& tels, std::vector<KVDetector*>& dets, const TString& idtype, double& theta_min, double& theta_max);
62  void draw_sidebar_legend();
64 
65 public:
67  : fReport{audit_name}, fAudit{fReport.GetAudit()}
68  {}
70 
71  void do_report();
72  void INDRA_ring_reporting_Z(int ring, const TString& idtype);
73  void INDRA_ring_mean_A_vs_Z(int ring, const TString& idtype, int& pad, int nx, int ny);
74  void INDRA_ring_Z_threshold_vs_Z(int ring, const TString& idtype, int& pad, int nx, int ny);
75  void FAZIA_group_reporting_Z(int group_num, std::vector<KVDetector*>&, const TString& idtype);
76  void FAZIA_group_mean_A_vs_Z(int group_num, std::vector<KVDetector*>&, const TString& idtype);
77  void FAZIA_group_Z_threshold_vs_Z(int group_num, std::vector<KVDetector*>& dets, const TString& idtype);
78  void FAZIA_group_A_threshold_vs_Z(int group_num, std::vector<KVDetector*>& dets, const TString& idtype);
79  template<typename TelescopeFunction>
80  void FAZIA_group_reporting_detail(const TString& pdf_file, const TString& title, int group_num, std::vector<KVDetector*>& dets, const TString& idtype, TelescopeFunction TF, Bool_t logY = kFALSE)
81  {
84 
85  myCanvas->Clear();
86  auto lay = get_layout(dets.size());
87  myCanvas->Divide(lay.first, lay.second);
88  int max_pad = lay.first * lay.second;
89 
90  TList tels;
91  double theta_min{360}, theta_max{0};
92  fill_telescopes_of_group(tels, dets, idtype, theta_min, theta_max);
93 
94  TIter next(&tels);
95  KVIDTelescope* tel;
96  int pad = 1;
97  while ((tel = (KVIDTelescope*)next())) {
98  myCanvas->cd(pad);
99  gPad->SetLogy(logY);
100  TF(fReport[tel->GetName()]);
101  ++pad;
102  if (pad > max_pad) {
103  myCanvas->Print(pdf_file, Form("Title:FAZIA %s Group %d : %s", idtype.Data(), group_num, title.Data()));
104  myCanvas->Clear();
105  myCanvas->Divide(lay.first, lay.second);
106  pad = 1;
107  }
108  }
109  if (pad != 1) myCanvas->Print(pdf_file, Form("Title:FAZIA %s Group %d : %s", idtype.Data(), group_num, title.Data()));
110  }
111 
112  void relabel_FAZIA_telescope_axis(TMultiGraph* graf, const TList* tels) const;
113 
115 };
116 
117 #endif // E789_DATA_QUALITY_AUDIT_REPORTING_H
bool Bool_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
#define gPad
Base class for KaliVeda framework.
Definition: KVBase.h:141
Produce graphs and histograms from KVDataQualityAudit.
Prepare PDF report on data quality audits for INDRA-FAZIA experiments.
void relabel_FAZIA_telescope_axis(TMultiGraph *graf, const TList *tels) const
void FAZIA_group_Z_threshold_vs_Z(int group_num, std::vector< KVDetector * > &dets, const TString &idtype)
void FAZIA_group_A_threshold_vs_Z(int group_num, std::vector< KVDetector * > &dets, const TString &idtype)
std::map< double, std::vector< KVDetector * > > fazia_map
void fill_telescopes_of_group(TList &tels, std::vector< KVDetector * > &dets, const TString &idtype, double &theta_min, double &theta_max)
void FAZIA_group_reporting_detail(const TString &pdf_file, const TString &title, int group_num, std::vector< KVDetector * > &dets, const TString &idtype, TelescopeFunction TF, Bool_t logY=kFALSE)
void FAZIA_group_mean_A_vs_Z(int group_num, std::vector< KVDetector * > &, const TString &idtype)
void FAZIA_group_reporting_Z(int group_num, std::vector< KVDetector * > &, const TString &idtype)
void make_fazia_map(double theta_bin)
sort fazia telescopes into bins of theta
void INDRA_ring_reporting_Z(int ring, const TString &idtype)
void INDRA_ring_Z_threshold_vs_Z(int ring, const TString &idtype, int &pad, int nx, int ny)
void INDRA_ring_mean_A_vs_Z(int ring, const TString &idtype, int &pad, int nx, int ny)
void make_canvas(canvas_t style=canvas_t::kLandscape)
Make an A4-size canvas.
Audit of experimental data identification and calibrations.
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:83
void Clear(Option_t *option="") override
TVirtualPad * cd(Int_t subpadnumber=0) override
virtual const char * GetName() const
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
void Print(const char *filename, Option_t *option) override
const char * Data() const