1#include "KVDataQualityAuditReporting_INDRAFAZIA.h"
5#include <KVFAZIADetector.h>
6#include <KVGeoDNTrajectory.h>
24 if (
style == canvas_t::kPortrait) std::swap(
w,
h);
26 myCanvas->SetWindowSize(
w + (
w - myCanvas->GetWw()),
h + (
h - myCanvas->GetWh()));
50 return a->GetTheta() < b->GetTheta();
61 if (!gMultiDetArray) {
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" && ring > 9)
break;
109 for (
int ring = 6; ring <= 17; ++ring) {
110 if (
id ==
"SI_CSI") {
111 if (ring < 8)
continue;
123 for (
int ring = 6; ring <= 9; ++ring) {
138 for (
auto id : fazia_id_types) {
151 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z %s ID Quality by Group",
id.Data()));
159 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z %s ID Quality by Group",
id.Data()));
179 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA <A> vs Z %s by Group",
id.Data()));
192 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z thresh. vs Z %s by Group",
id.Data()));
198 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA Z thresh. vs Z %s by Group",
id.Data()));
211 myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA A thresh. vs Z %s by Group",
id.Data()));
217 if (pad != 1)
myCanvas->
Print(pdf_file,
Form(
"Title:FAZIA A thresh. vs Z %s by Group",
id.Data()));
230 Error(
"INDRA_ring_reporting",
"You need to build INDRA first...");
234 for (
int mod = 1; mod <= 24; ++mod) {
237 if (tel) tels.
Add(tel);
241 return (
int)
dynamic_cast<KVINDRADetector*
>(idt->GetDetector(1))->GetModuleNumber();
249 mg->SetTitle(
Form(
"Ring %d %s Min/Mean/Max Z vs. Module", ring, idtype.
Data()));
263 for (
int mod = 1; mod <= 24; ++mod) {
271 int mod_set = (nmods > 16 ? 6 : 8);
278 while (i <= mod_set) {
293 mg->SetTitle(
Form(
"INDRA <A> vs. Z %s Ring %d [%d-%d]", idtype.
Data(), ring, nmods - mod_set + 1, nmods));
297 leg =
gPad->BuildLegend(.11, .89, .61, .69);
301 leg =
gPad->BuildLegend(.11, .89, .61, .69);
305 leg =
gPad->BuildLegend(.11, .89, .61, .69);
307 leg->SetBorderSize(0);
325 for (
int mod = 1; mod <= 24; ++mod) {
333 int mod_set = (nmods > 16 ? 6 : 8);
340 while (i <= mod_set) {
349 std::cout << idt->
GetName() <<
" : particles are UNCALIBRATED";
358 if (nuncal == traj->
GetN()) std::cout <<
" ... just like ALL DETECTORS";
360 std::cout <<
" ... just like ";
365 std::cout << dn->
GetName() <<
" ";
369 std::cout << std::endl;
378 mg->SetTitle(
Form(
"INDRA Z thresh. [MeV/u] vs. Z %s Ring %d [%d-%d]", idtype.
Data(), ring, nmods - mod_set + 1, nmods));
396 else if (mod_set > 6) {
403 leg->SetBorderSize(0);
420 for (
auto d : dets) {
427 if (tel->IsReadyForID()) std::cout << tel->GetName() <<
" is absent from audit - BUT IS READY TO IDENTIFY!" << std::endl;
430 theta_min = std::min(theta_min,
d->GetTheta());
431 theta_max = std::max(theta_min,
d->GetTheta());
442 double theta_min{360}, theta_max{0};
443 Info(
"FAZIA_group_reporting_Z",
"Group %d", group_num);
459 mg->SetTitle(
Form(
"Group %d [%.2f#leq#theta#leq%.2f] %s Min/Mean/Max Z", group_num, theta_min, theta_max, idtype.
Data()));
475 double theta_min{360}, theta_max{0};
492 mg->SetTitle(
Form(
"FAZIA <A> vs. Z %s Group %d [%.2f#leq#theta#leq%.2f]", idtype.
Data(), group_num, theta_min, theta_max));
496 leg =
gPad->BuildLegend(.11, .89, .61, .69);
500 leg =
gPad->BuildLegend(.11, .89, .61, .69);
504 leg =
gPad->BuildLegend(.11, .89, .61, .69);
506 leg->SetBorderSize(0);
517 double theta_min{360}, theta_max{0};
532 std::cout << idt->
GetName() <<
" : particles are UNCALIBRATED";
549 if (nuncal == traj->
GetN()) std::cout <<
" ... just like ALL DETECTORS";
551 std::cout <<
" ... just like ";
556 std::cout << dn->
GetName() <<
" ";
561 std::cout << std::endl;
566 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));
569 if (idtype ==
"CSI") {
589 leg->SetBorderSize(0);
600 double theta_min{360}, theta_max{0};
616 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));
619 if (idtype ==
"CSI") {
639 leg->SetBorderSize(0);
650 for (
int i = 0; i <
N; ++i) {
672 while ((obj = it())) {
677 TLatex* tex = ::new
TLatex(0.02336825, 0.86604,
"Max. Z");
691 marker = ::new
TMarker(0.01772764, 0.4453584, 30);
698 tex = ::new
TLatex(0.02497985, 0.4629847,
"Max. Z with identified A");
703 tex = ::new
TLatex(0.02659146, 0.2632197,
"Mean Z");
708 tex = ::new
TLatex(0.02820306, 0.1045828,
"Min. Z");
713 marker = ::new
TMarker(0.01853344, 0.2479436, 20);
720 marker = ::new
TMarker(0.02095085, 0.08578143, 25);
743 while ((obj = it())) {
748 TLatex* tex =
new TLatex(0.9813084, 0.9470954,
"Max. Z");
762 marker =
new TMarker(0.984229, 0.8309129, 30);
769 tex =
new TLatex(0.9807243, 0.8143154,
"Max. Z with identified A");
774 tex =
new TLatex(0.9813084, 0.4419087,
"Mean Z");
779 tex =
new TLatex(0.978972, 0.2479253,
"Min. Z");
784 marker =
new TMarker(0.9853972, 0.4564315, 20);
791 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_mean_Z_for_telescopes(TSeqCollection *idtels, TelescopeIndexFunction F, Marker_t marker_style=20) const
TGraph * get_max_Z_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
TGraph * get_max_Z_with_isotopes_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
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
TString fazia_si_csi_idtype
void fill_telescopes_of_group(TList &tels, std::vector< KVDetector * > &dets, const TString &idtype, double &theta_min, double &theta_max)
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)
std::vector< int > markers
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)
const KVDataQualityAudit * fAudit
void make_canvas(canvas_t style=canvas_t::kLandscape)
Make an A4-size canvas.
void draw_sidebar_legend()
Bool_t HasTelescope(const TString &tel_name) const
Manage all datasets contained in a given data repository.
virtual Bool_t Init(KVDataRepository *=0)
Base class for detector geometry description.
KVGeoDetectorNode * GetNode()
Double_t GetTheta() const
Bool_t IsCalibrated() const
Base class for FAZIA detectors.
Path taken by particles through multidetector geometry.
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
KVGeoDetectorNode * GetNextNode() const
Information on relative positions of detectors & particle trajectories.
const Char_t * GetName() const
Name of node is same as name of associated detector.
KVSeqCollection * GetForwardTrajectories() const
KVDetector * GetDetector() const
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.
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray")
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
virtual TObject * First() const
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
virtual Int_t GetEntries() const
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 * Remove(const TObjLinkPtr_t &lnk)
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 Error(const char *method, const char *msgfmt,...) 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