1 #include "KVDataQualityAuditReporting_INDRAFAZIA.h"
2 #include "KVDataSetManager.h"
5 #include <KVFAZIADetector.h>
6 #include <KVGeoDNTrajectory.h>
26 myCanvas->SetWindowSize(
w + (
w - myCanvas->GetWw()),
h + (
h - myCanvas->GetWh()));
50 return a->GetTheta() < b->GetTheta();
72 auto first_page = pdf_file +
"(";
73 auto last_page = pdf_file +
")";
80 for (
auto&
id : indra_id_types) {
81 for (
int ring = 6; ring <= 17; ++ring) {
82 if ((
id ==
"SI_CSI" ||
id ==
"SI") && ring > 9)
break;
111 for (
int ring = 6; ring <= 17; ++ring) {
112 if ((
id ==
"SI_CSI" ||
id ==
"SI")) {
124 for (
int ring = 6; ring <= 17; ++ring) {
139 for (
auto id : fazia_id_types) {
153 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z %s ID Quality by Group",
id.Data()));
162 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z %s ID Quality by Group",
id.Data()));
184 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA <A> vs Z %s by Group",
id.Data()));
198 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z thresh. vs Z %s by Group",
id.Data()));
205 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z thresh. vs Z %s by Group",
id.Data()));
219 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA A thresh. vs Z %s by Group",
id.Data()));
226 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA A thresh. vs Z %s by Group",
id.Data()));
240 for (
int mod = 1; mod <= 24; ++mod) {
266 return (
int)
dynamic_cast<KVINDRADetector*
>(idt->GetDetector(1))->GetModuleNumber();
274 mg->SetTitle(
Form(
"Ring %d %s Min/Mean/Max Z vs. Module", ring, idtype.
Data()));
293 int nmods = tels->GetEntries();
295 int mod_set = (nmods > 16 ? 6 : 8);
299 while (tels->GetEntries()) {
302 while (i <= mod_set) {
317 mg->SetTitle(
Form(
"INDRA <A> vs. Z %s Ring %d [%d-%d]", idtype.
Data(), ring, nmods - mod_set + 1, nmods));
321 leg =
gPad->BuildLegend(.11, .89, .61, .69);
325 leg =
gPad->BuildLegend(.11, .89, .61, .69);
329 leg =
gPad->BuildLegend(.11, .89, .61, .69);
331 leg->SetBorderSize(0);
353 int nmods = tels->GetEntries();
355 int mod_set = (nmods > 16 ? 6 : 8);
359 while (tels->GetEntries()) {
362 while (i <= mod_set) {
371 std::cout << idt->
GetName() <<
" : particles are UNCALIBRATED";
381 if (nuncal == traj->
GetN()) std::cout <<
" ... just like ALL DETECTORS";
383 std::cout <<
" ... just like ";
388 std::cout << dn->
GetName() <<
" ";
393 std::cout << std::endl;
402 mg->SetTitle(
Form(
"INDRA Z thresh. [MeV/u] vs. Z %s Ring %d [%d-%d]", idtype.
Data(), ring, nmods - mod_set + 1, nmods));
420 else if (mod_set > 6) {
427 leg->SetBorderSize(0);
447 for (
auto d : dets) {
457 if (tel->IsReadyForID()) std::cout << tel->GetName() <<
" is absent from audit - BUT IS READY TO IDENTIFY!" << std::endl;
460 theta_min = std::min(theta_min,
d->GetTheta());
461 theta_max = std::max(theta_min,
d->GetTheta());
476 double theta_min{360}, theta_max{0};
477 Info(
"FAZIA_group_reporting_Z",
"id=%s Group %d", idtype.
Data(), group_num);
480 Info(
"FAZIA_group_reporting_Z",
"id=%s Group %d: NO TELESCOPES IN AUDIT", idtype.
Data(), group_num);
497 mg->SetTitle(
Form(
"Group %d [%.2f#leq#theta#leq%.2f] %s Min/Mean/Max Z", group_num, theta_min, theta_max, idtype.
Data()));
514 double theta_min{360}, theta_max{0};
532 mg->SetTitle(
Form(
"FAZIA <A> vs. Z %s Group %d [%.2f#leq#theta#leq%.2f]", idtype.
Data(), group_num, theta_min, theta_max));
536 leg =
gPad->BuildLegend(.11, .89, .61, .69);
540 leg =
gPad->BuildLegend(.11, .89, .61, .69);
544 leg =
gPad->BuildLegend(.11, .89, .61, .69);
546 leg->SetBorderSize(0);
558 double theta_min{360}, theta_max{0};
574 std::cout << idt->
GetName() <<
" : particles are UNCALIBRATED";
591 if (nuncal == traj->
GetN()) std::cout <<
" ... just like ALL DETECTORS";
593 std::cout <<
" ... just like ";
598 std::cout << dn->
GetName() <<
" ";
603 std::cout << std::endl;
608 mg->SetTitle(
Form(
"FAZIA Z thresh. [MeV/u] vs. Z %s Group %d [%.2f#leq#theta#leq%.2f]", idtype.
Data(), group_num, theta_min, theta_max));
611 if (idtype ==
"CSI") {
631 leg->SetBorderSize(0);
643 double theta_min{360}, theta_max{0};
660 mg->SetTitle(
Form(
"FAZIA A thresh. [MeV/u] vs. Z %s Group %d [%.2f#leq#theta#leq%.2f]", idtype.
Data(), group_num, theta_min, theta_max));
663 if (idtype ==
"CSI") {
683 leg->SetBorderSize(0);
695 for (
int i = 0; i <
N; ++i) {
717 while ((obj = it())) {
722 TLatex* tex = ::new
TLatex(0.02336825, 0.86604,
"Max. Z");
736 marker = ::new
TMarker(0.01772764, 0.4453584, 30);
743 tex = ::new
TLatex(0.02497985, 0.4629847,
"Max. Z with identified A");
748 tex = ::new
TLatex(0.02659146, 0.2632197,
"Mean Z");
753 tex = ::new
TLatex(0.02820306, 0.1045828,
"Min. Z");
758 marker = ::new
TMarker(0.01853344, 0.2479436, 20);
765 marker = ::new
TMarker(0.02095085, 0.08578143, 25);
788 while ((obj = it())) {
793 TLatex* tex =
new TLatex(0.9813084, 0.9470954,
"Max. Z");
807 marker =
new TMarker(0.984229, 0.8309129, 30);
814 tex =
new TLatex(0.9807243, 0.8143154,
"Max. Z with identified A");
819 tex =
new TLatex(0.9813084, 0.4419087,
"Mean Z");
824 tex =
new TLatex(0.978972, 0.2479253,
"Min. Z");
829 marker =
new TMarker(0.9853972, 0.4564315, 20);
836 marker =
new TMarker(0.9830607, 0.2645228, 25);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t SetFillStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
char * Form(const char *fmt,...)
Bool_t IsLabelled(const Char_t *l) const
TGraph * get_max_Z_for_telescopes(TSeqCollection *idtels, TelescopeIndexFunction F, Marker_t marker_style=20) const
TGraph * get_mean_Z_for_telescopes(TSeqCollection *idtels, TelescopeIndexFunction F, Marker_t marker_style=20) const
TGraph * get_max_Z_with_isotopes_for_telescopes(TSeqCollection *idtels, TelescopeIndexFunction F, Marker_t marker_style=20) const
TGraph * get_min_Z_for_telescopes(TSeqCollection *idtels, TelescopeIndexFunction F, Marker_t marker_style=20) const
Prepare PDF report on data quality audits for INDRA-FAZIA experiments.
void draw_sidebar_legend_fazia()
void relabel_FAZIA_telescope_axis(TMultiGraph *graf, const TList *tels) const
KVDataQualityAuditReportMaker fReport
bool FAZIA_group_reporting_Z(int group_num, std::vector< KVDetector * > &, const TString &idtype)
std::map< double, std::vector< KVDetector * > > fazia_map
bool FAZIA_group_Z_threshold_vs_Z(int group_num, std::vector< KVDetector * > &dets, const TString &idtype)
TString fazia_si_csi_idtype
bool INDRA_ring_reporting_Z(int ring, const TString &idtype)
bool fill_telescopes_of_group(TList &tels, std::vector< KVDetector * > &dets, const TString &idtype, double &theta_min, double &theta_max)
std::vector< int > markers
void make_fazia_map(double theta_bin)
sort fazia telescopes into bins of theta
void INDRA_ring_Z_threshold_vs_Z(int ring, const TString &idtype, int &pad, int nx, int ny)
bool FAZIA_group_mean_A_vs_Z(int group_num, std::vector< KVDetector * > &, const TString &idtype)
std::vector< int >::size_type max_marker
void INDRA_ring_mean_A_vs_Z(int ring, const TString &idtype, int &pad, int nx, int ny)
const KVDataQualityAudit * fAudit
bool FAZIA_group_A_threshold_vs_Z(int group_num, std::vector< KVDetector * > &dets, const TString &idtype)
void make_canvas(canvas_t style=canvas_t::kLandscape)
Make an A4-size canvas.
std::optional< KVUnownedList > get_indra_telescopes(int ring, const TString &idtype)
void draw_sidebar_legend()
Bool_t HasTelescope(const TString &tel_name) const
Base class for detector geometry description, interface to energy-loss calculations.
Bool_t IsCalibrated(const KVNameValueList ¶ms={}) const
KVGeoDetectorNode * GetNode()
Double_t GetTheta() const override
Base class for FAZIA detectors.
TString GetSiCsIIDType() const
Path taken by particles through multidetector geometry.
KVGeoDetectorNode * GetNextNode() const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Information on relative positions of detectors & particle trajectories.
KVDetector * GetDetector() const
const KVSeqCollection * GetForwardTrajectories() const
const Char_t * GetName() const override
Name of node is same as name of associated detector.
const KVSeqCollection * GetDetectors() const
Base class for all detectors or associations of detectors in array which can identify charged particl...
KVDetector * GetDetector(UInt_t n) const
Base class for detectors of INDRA array.
TString GetCsIIDType() const
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray", KVExpDB *db=nullptr)
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
TObject * First() const override
void Add(TObject *obj) override
Extended TList class which does not own its objects by default.
virtual void SetFillStyle(Style_t fstyle)
virtual void SetLineWidth(Width_t lwidth)
virtual void SetMarkerColor(Color_t mcolor=1)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual void SetMarkerSize(Size_t msize=1)
virtual void SetTextAngle(Float_t tangle=0)
virtual void SetTextSize(Float_t tsize=1)
virtual Int_t FindBin(const char *label)
virtual void LabelsOption(Option_t *option="h")
virtual void SetBinLabel(Int_t bin, const char *label)
void Clear(Option_t *option="") override
TVirtualPad * cd(Int_t subpadnumber=0) override
static const TArrayI & GetPalette()
static Int_t GetColor(const char *hexcolor)
virtual Double_t GetMean(Int_t axis=1) const
void Add(TObject *obj) override
TObject * First() const override
TObject * At(Int_t idx) const override
void Draw(Option_t *option="") override
TList * GetListOfGraphs() const
const char * GetName() const override
virtual const char * GetName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Draw(Option_t *option="")
virtual void Info(const char *method, const char *msgfmt,...) 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
TList * GetListOfPrimitives() const override
void Print(const char *filename, Option_t *option) override
const char * Data() const
void swap(RVec< T > &lhs, RVec< T > &rhs)