KaliVeda
Toolkit for HIC analysis
KVDataQualityAuditReporting_INDRAFAZIA.h
1 #pragma once
2 
3 #include "KVDataQualityAuditReporting_INDRA.h"
4 
36 
38  enum class canvas_t {
39  kLandscape,
40  kPortrait
41  };
42 
44 
46 
47  std::map<double, std::vector<KVDetector*>> fazia_map;
48  void make_fazia_map(double theta_bin);
49 
50  std::vector<int> markers {20, 24, 21, 25, 34, 28, 47, 46, 45, 44, 29, 30, 43, 42, 22, 26, 23, 32};
51 
52  std::pair<int, int> get_layout(size_t ntels)
53  {
54  assert(ntels <= 16);
55  if (ntels <= 8) return {4, 2};
56  else if (ntels <= 12) return {4, 3};
57  return {4, 4};
58  }
59  void fill_telescopes_of_group(TList& tels, std::vector<KVDetector*>& dets, const TString& idtype, double& theta_min, double& theta_max);
60  void draw_sidebar_legend();
62 
64 public:
65  KVDataQualityAuditReporting_INDRAFAZIA(const TString& audit_name, const TString& ds_name)
66  : fReport{audit_name}, fAudit{fReport.GetAudit()}, dataset_name{ds_name}
67  {
70  if (dataset_name == "E789") {
71  indra_csi_idtype = "CSI_R_L";
72  fazia_si_csi_idtype = "SI2_CSI";
73  }
74  dataset_name.Prepend("INDRAFAZIA.");
75  }
76 
77  void do_report();
78  void INDRA_ring_reporting_Z(int ring, const TString& idtype);
79  void INDRA_ring_mean_A_vs_Z(int ring, const TString& idtype, int& pad, int nx, int ny);
80  void INDRA_ring_Z_threshold_vs_Z(int ring, const TString& idtype, int& pad, int nx, int ny);
81  void FAZIA_group_reporting_Z(int group_num, std::vector<KVDetector*>&, const TString& idtype);
82  void FAZIA_group_mean_A_vs_Z(int group_num, std::vector<KVDetector*>&, const TString& idtype);
83  void FAZIA_group_Z_threshold_vs_Z(int group_num, std::vector<KVDetector*>& dets, const TString& idtype);
84  void FAZIA_group_A_threshold_vs_Z(int group_num, std::vector<KVDetector*>& dets, const TString& idtype);
85  template<typename TelescopeFunction>
86  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)
87  {
90 
91  myCanvas->Clear();
92  auto lay = get_layout(dets.size());
93  myCanvas->Divide(lay.first, lay.second);
94  int max_pad = lay.first * lay.second;
95 
96  TList tels;
97  double theta_min{360}, theta_max{0};
98  fill_telescopes_of_group(tels, dets, idtype, theta_min, theta_max);
99 
100  TIter next(&tels);
101  KVIDTelescope* tel;
102  int pad = 1;
103  while ((tel = (KVIDTelescope*)next())) {
104  myCanvas->cd(pad);
105  gPad->SetLogy(logY);
106  TF(fReport[tel->GetName()]);
107  ++pad;
108  if (pad > max_pad) {
109  myCanvas->Print(pdf_file, Form("Title:FAZIA %s Group %d : %s", idtype.Data(), group_num, title.Data()));
110  myCanvas->Clear();
111  myCanvas->Divide(lay.first, lay.second);
112  pad = 1;
113  }
114  }
115  if (pad != 1) myCanvas->Print(pdf_file, Form("Title:FAZIA %s Group %d : %s", idtype.Data(), group_num, title.Data()));
116  }
117 
118  void relabel_FAZIA_telescope_axis(TMultiGraph* graf, const TList* tels) const;
119 
121 };
bool Bool_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
#define gPad
Base class for KaliVeda framework.
Definition: KVBase.h:139
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)
KVDataQualityAuditReporting_INDRAFAZIA(const TString &audit_name, const TString &ds_name)
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:85
void Clear(Option_t *option="") override
TVirtualPad * cd(Int_t subpadnumber=0) override
const char * GetName() const override
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
TString & Prepend(char c, Ssiz_t rep=1)