1#include "KVDataQualityAuditReportMaker.h"
2#include "KVMultiDetArray.h"
15 auto last = proba.rbegin();
16 auto Zmax = (*last).first;
18 Zmax + 1, .5, Zmax + 1.5);
19 for (
auto&
p : proba) {
20 histo->SetBinContent(
p.first,
p.second);
35 gr->
SetTitle(
Form(
"%s Z thresholds [MeV]", this_telescope->GetName()));
37 auto Zlist = this_telescope->GetElementList();
39 while (!Zlist.End()) {
40 auto Z = Zlist.Next();
58 gr->
SetTitle(
Form(
"%s Z thresholds [MeV/u]", this_telescope->GetName()));
60 auto Zlist = this_telescope->GetElementList();
63 while (!Zlist.End()) {
64 auto Z = Zlist.
Next();
66 if (this_telescope->GetElement(Z).HasIsotopes())
67 thresh = this_telescope->GetElement(Z).emin / this_telescope->GetElement(Z).get_mean_isotopic_mass();
69 thresh = this_telescope->GetElement(Z).emin / this_telescope->GetElement(Z).get_default_mass();
70 if (thresh < 0) thresh = -1;
72 if (
TString(this_telescope->GetName()).BeginsWith(
"ID_CSI") && thresh > 0 && thresh < 10) {
77 std::cout <<
"abnormal Z threshold (<10MeV/u): " << this_telescope->GetName() <<
" Z=" << abnormal.
AsString();
78 TString p(this_telescope->GetName());
82 std::cout << std::endl;
101 gr->
SetTitle(
Form(
"%s A thresholds [MeV/u]", this_telescope->GetName()));
103 auto Zlist = this_telescope->GetElementList();
105 while (!Zlist.End()) {
106 auto Z = Zlist.Next();
108 if (this_telescope->GetElement(Z).HasIsotopes())
109 gr->
SetPoint(
gr->
GetN(), Z, this_telescope->GetElement(Z).get_minimum_isotopic_threshold_mev_per_nuc());
125 auto Zlist = this_telescope->GetElementList();
127 while (!Zlist.End()) {
128 auto Z = Zlist.Next();
129 auto elem = this_telescope->GetElement(Z);
130 if (elem.HasIsotopes()) {
147 auto Zlist = this_telescope->GetElementList();
151 while (!Zlist.End()) {
152 auto Z = Zlist.Next();
153 auto elem = get_element(Z);
154 if (this_telescope->GetElement(Z).HasIsotopes()) {
173 auto Zlist = this_telescope->GetElementList();
177 while (!Zlist.End()) {
178 auto Z = Zlist.Next();
179 auto elem = get_element(Z);
180 if (this_telescope->GetElement(Z).HasIsotopes()) {
198 auto Zlist = this_telescope->GetElementList();
202 while (!Zlist.End()) {
203 auto Z = Zlist.Next();
204 auto elem = get_element(Z);
205 if (this_telescope->GetElement(Z).HasIsotopes()) {
206 mg->Add(elem.get_isotope_thresholds_by_A_mev_per_nuc(
TColor::GetPalette()[color_step * i]));
222 if (!col) col =
kBlue - 2;
224 G->SetMarkerStyle(
mark);
225 G->SetMarkerSize(1.7);
226 G->SetMarkerColor(col);
228 G->SetLineColor(col);
241 if (!col) col =
kBlue - 2;
243 G->SetLineColor(col);
258 auto proba = this_element->get_isotopic_distribution();
261 gr->
SetTitle(
Form(
"P(A) Z=%d %s", (
int)this_element->Z, telescope_name.c_str()));
262 for (
auto&
p : proba) {
277 gr->
SetTitle(
Form(
"%s Z=%d A thresholds [MeV]", telescope_name.c_str(), this_element->Z));
279 auto Alist = this_element->GetIsotopeList();
281 while (!Alist.End()) {
282 auto A = Alist.Next();
297 gr->
SetTitle(
Form(
"%s Z=%d A thresholds [MeV/u]", telescope_name.c_str(), this_element->Z));
299 auto Alist = this_element->GetIsotopeList();
301 while (!Alist.End()) {
302 auto A = Alist.Next();
316 Double_t Red[] = {0., 1.0, 0.0, 0.0, 1.0, 1.0};
317 Double_t Green[] = {0., 0.0, 0.0, 1.0, 0.0, 1.0};
318 Double_t Blue[] = {0., 1.0, 1.0, 0.0, 0.0, 0.0};
319 Double_t Length[] = {0., .2, .4, .6, .8, 1.0};
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Produce graphs and histograms from KVDataQualityAudit.
void init_colors(int ncols=100)
static TGraph * FormatGraph(TGraph *, Color_t=0, Marker_t=0)
provide uniform style for all graphs
static TH1F * FormatHisto(TH1F *, Color_t=0)
provide uniform style for all histos
std::map< int, double > get_element_distribution() const
Bool_t IsCalibrated() const
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
Strings used to represent a set of ranges of values.
const Char_t * AsString(Int_t maxchars=0) const
void Add(Int_t)
Add value 'n' to the list.
static const TArrayI & GetPalette()
static Int_t CreateGradientColorTable(UInt_t Number, Double_t *Stops, Double_t *Red, Double_t *Green, Double_t *Blue, UInt_t NColors, Float_t alpha=1., Bool_t setPalette=kTRUE)
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
void SetName(const char *name="") override
void SetTitle(const char *title="") override
const char * GetName() const override
TGraph * get_isotope_thresholds_by_A_mev_per_nuc(Color_t=0) const
TGraph * get_isotope_distribution(Color_t=0) const
TGraph * get_isotope_thresholds_by_A(Color_t=0) const
TH1F * get_element_distribution(Color_t=0) const
TGraph * get_isotope_thresholds_by_Z_mev_per_nuc(Color_t color=0) const
TMultiGraph * get_isotope_thresholds_by_A_mev_per_nuc() const
TGraph * get_mean_isotopic_mass_by_Z(Color_t=0) const
TMultiGraph * get_isotope_distributions() const
TMultiGraph * get_isotope_thresholds_by_A() const
TGraph * get_element_thresholds_by_Z_mev_per_nuc(Color_t=0) const
TGraph * get_element_thresholds_by_Z(Color_t=0) const
KVDataQualityAudit::idtelescope * this_telescope