Analysis Software
Documentation for sPHENIX simulation software
|
#include <OnlMon/blob/main/subsystems/tpot/TpotMonDraw.h>
Public Types | |
using | sample_window_t = std::pair< int, int > |
Public Member Functions | |
TpotMonDraw (const std::string &name) | |
constructor | |
~TpotMonDraw () override=default | |
destructor | |
int | Init () override |
int | Draw (const std::string &what="ALL") override |
int | MakeHtml (const std::string &what="ALL") override |
int | SavePlot (const std::string &what="ALL", const std::string &type="png") override |
std::vector< std::string > | get_detnames_sphenix () const |
void | set_sample_window_signal (const sample_window_t &value) |
Public Member Functions inherited from OnlMonDraw | |
OnlMonDraw (const std::string &name="NONE") | |
virtual | ~OnlMonDraw () |
virtual int | MakePS (const std::string &what="ALL") |
const std::string | Name () const |
void | Verbosity (const int i) |
int | Verbosity () const |
Private Types | |
enum | DrawOptions { None = 0, Logx = 1<<0, Logy = 1<<1, Logz = 1<<2, Colz = 1<<3 } |
using | histogram_array_t = std::array< TH1 *, MicromegasDefs::m_nfee > |
Private Member Functions | |
int | DrawDeadServer (TPad *) override |
void | draw_time (TPad *) |
TCanvas * | get_canvas (const std::string &name, bool clear=true) |
TCanvas * | create_canvas (const std::string &name) |
int | draw_counters () |
int | draw_detector_occupancy () |
int | draw_resist_occupancy () |
TH1 * | get_histogram (const std::string &name) const |
get histogram by name | |
histogram_array_t | get_histograms (const std::string &name) const |
get detector dependent histogram array from base name | |
TH1 * | get_ref_histogram (const std::string &name) const |
get histogram by name | |
histogram_array_t | get_ref_histograms (const std::string &name) const |
get detector dependent histogram array from base name | |
histogram_array_t | get_ref_histograms_scaled (const std::string &name) const |
get detector dependent histogram array from base name | |
double | get_ref_scale_factor () const |
get scale factor for reference histograms | |
TH1 * | normalize (TH1 *, double scale=1) const |
normalize reference histogram | |
int | draw_array (const std::string &name, const histogram_array_t &array, unsigned int options=DrawOptions::None) |
draw histogram array | |
int | draw_array (const std::string &name, const histogram_array_t &, const histogram_array_t &, unsigned int=DrawOptions::None) |
draw histogram array and reference histgorams | |
void | draw_detnames_sphenix (const std::string &suffix=std::string()) |
draw detector names in current canvas | |
Private Attributes | |
MicromegasMapping | m_mapping |
mapping | |
MicromegasGeometry | m_geometry |
geometry | |
std::vector< std::string > | m_detnames_sphenix |
detector names | |
int | TimeOffsetTicks = -1 |
needed to get time axis right | |
sample_window_t | m_sample_window_signal = {20, 40} |
std::string | m_ref_histograms_filename |
std::unique_ptr< TFile > | m_ref_histograms_tfile |
std::vector< TCanvas * > | m_canvas |
std::unique_ptr< OnlMonDB > | dbvars |
Additional Inherited Members | |
Protected Attributes inherited from OnlMonDraw | |
std::string | ThisName |
int | verbosity = 0 |
Definition at line 21 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 21 of file TpotMonDraw.h
|
private |
Definition at line 60 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 60 of file TpotMonDraw.h
using TpotMonDraw::sample_window_t = std::pair<int, int> |
Definition at line 41 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 41 of file TpotMonDraw.h
|
private |
Definition at line 63 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 63 of file TpotMonDraw.h
TpotMonDraw::TpotMonDraw | ( | const std::string & | name | ) |
constructor
Definition at line 115 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 115 of file TpotMonDraw.cc
References dbvars, MicromegasMapping::get_detname_sphenix(), MicromegasMapping::get_fee_id_list(), m_detnames_sphenix, m_mapping, m_ref_histograms_filename, m_ref_histograms_tfile, OnlMonDraw::ThisName, and TimeOffsetTicks.
|
overridedefault |
destructor
|
private |
Definition at line 198 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 198 of file TpotMonDraw.cc
References OnlMonClient::GetDisplaySizeX(), OnlMonClient::GetDisplaySizeY(), i, OnlMonClient::instance(), m_canvas, and OnlMonDraw::Verbosity().
Referenced by get_canvas().
|
overridevirtual |
Reimplemented from OnlMonDraw.
Definition at line 308 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 308 of file TpotMonDraw.cc
References channel(), draw_array(), draw_counters(), draw_detector_occupancy(), draw_resist_occupancy(), physmon_vertexing::events, get_canvas(), get_histogram(), get_histograms(), get_ref_histograms_scaled(), i, TpotMonDefs::kEventCounter, TpotMonDefs::kValidEventCounter, line, m_sample_window_signal, and OnlMonDraw::Verbosity().
Referenced by MakeHtml(), and SavePlot().
|
inlineprivate |
draw histogram array
Definition at line 98 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 98 of file TpotMonDraw.h
References draw_array(), and ckf::options.
Referenced by Draw(), and draw_array().
|
private |
draw histogram array and reference histgorams
Definition at line 747 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 747 of file TpotMonDraw.cc
References draw_time(), DrawDeadServer(), get_canvas(), h, i, and OnlMonDraw::Verbosity().
|
private |
Definition at line 513 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 513 of file TpotMonDraw.cc
References draw_time(), DrawDeadServer(), get_canvas(), get_histogram(), get_ref_histogram(), get_ref_scale_factor(), normalize(), and OnlMonDraw::Verbosity().
Referenced by Draw().
|
private |
Definition at line 557 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 557 of file TpotMonDraw.cc
References draw_detnames_sphenix(), draw_time(), DrawDeadServer(), get_canvas(), get_histogram(), h, and OnlMonDraw::Verbosity().
Referenced by Draw().
|
private |
draw detector names in current canvas
only works if canvas contains one of the properly formated TH2Poly histograms
Definition at line 653 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 653 of file TpotMonDraw.cc
References MicromegasGeometry::get_detname_sphenix(), MicromegasGeometry::get_ntiles(), MicromegasGeometry::get_tile_center(), i, m_geometry, MicromegasGeometry::m_tile_length, MicromegasGeometry::m_tile_width, text(), ambiguity_solver_full_chain::x, and y.
Referenced by draw_detector_occupancy(), and draw_resist_occupancy().
|
private |
Definition at line 606 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 606 of file TpotMonDraw.cc
References draw_detnames_sphenix(), draw_time(), DrawDeadServer(), get_canvas(), get_histogram(), h, and OnlMonDraw::Verbosity().
Referenced by Draw().
|
private |
Definition at line 160 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 160 of file TpotMonDraw.cc
References OnlMonClient::instance(), OnlMonDraw::ThisName, and OnlMonDraw::Verbosity().
Referenced by draw_array(), draw_counters(), draw_detector_occupancy(), and draw_resist_occupancy().
|
overrideprivatevirtual |
Reimplemented from OnlMonDraw.
Definition at line 147 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 147 of file TpotMonDraw.cc
References OnlMonDraw::DrawDeadServer(), and OnlMonDraw::Verbosity().
Referenced by draw_array(), draw_counters(), draw_detector_occupancy(), and draw_resist_occupancy().
|
private |
Definition at line 189 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 189 of file TpotMonDraw.cc
References create_canvas().
Referenced by Draw(), draw_array(), draw_counters(), draw_detector_occupancy(), and draw_resist_occupancy().
|
inline |
Definition at line 37 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 37 of file TpotMonDraw.h
References m_detnames_sphenix.
|
private |
get histogram by name
Definition at line 668 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 668 of file TpotMonDraw.cc
References OnlMonClient::instance().
Referenced by Draw(), draw_counters(), draw_detector_occupancy(), draw_resist_occupancy(), get_histograms(), and get_ref_scale_factor().
|
private |
get detector dependent histogram array from base name
Definition at line 675 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 675 of file TpotMonDraw.cc
References get_histogram(), i, m_detnames_sphenix, out, and OnlMonDraw::Verbosity().
Referenced by Draw().
|
private |
get histogram by name
Definition at line 691 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 691 of file TpotMonDraw.cc
References m_ref_histograms_tfile.
Referenced by draw_counters(), get_ref_histograms(), and get_ref_scale_factor().
|
private |
get detector dependent histogram array from base name
Definition at line 695 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 695 of file TpotMonDraw.cc
References get_ref_histogram(), i, m_detnames_sphenix, out, and OnlMonDraw::Verbosity().
Referenced by get_ref_histograms_scaled().
|
private |
get detector dependent histogram array from base name
Definition at line 711 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 711 of file TpotMonDraw.cc
References get_ref_histograms(), get_ref_scale_factor(), i, normalize(), out, and parse_cmake_options::source.
Referenced by Draw().
|
private |
get scale factor for reference histograms
the normaliztion factor is based on the ratio of number of events in the event counters histogram
Definition at line 724 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 724 of file TpotMonDraw.cc
References get_histogram(), get_ref_histogram(), TpotMonDefs::kFullEventCounter, and m_ref_histograms_tfile.
Referenced by draw_counters(), and get_ref_histograms_scaled().
|
overridevirtual |
Reimplemented from OnlMonDraw.
Definition at line 143 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 143 of file TpotMonDraw.cc
|
overridevirtual |
Reimplemented from OnlMonDraw.
Definition at line 464 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 464 of file TpotMonDraw.cc
References Draw(), i, OnlMonClient::instance(), m_canvas, out, and utils::status.
|
private |
normalize reference histogram
Definition at line 737 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 737 of file TpotMonDraw.cc
Referenced by draw_counters(), and get_ref_histograms_scaled().
|
overridevirtual |
Reimplemented from OnlMonDraw.
Definition at line 443 of file TpotMonDraw.cc.
View newest version in sPHENIX GitHub at line 443 of file TpotMonDraw.cc
References Draw(), filename, i, OnlMonClient::instance(), m_canvas, OnlMonDraw::ThisName, and to_string().
|
inline |
Definition at line 42 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 42 of file TpotMonDraw.h
References m_sample_window_signal, and value.
|
private |
Definition at line 131 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 131 of file TpotMonDraw.h
Referenced by TpotMonDraw().
|
private |
Definition at line 130 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 130 of file TpotMonDraw.h
Referenced by create_canvas(), MakeHtml(), and SavePlot().
|
private |
detector names
Definition at line 115 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 115 of file TpotMonDraw.h
Referenced by get_detnames_sphenix(), get_histograms(), get_ref_histograms(), and TpotMonDraw().
|
private |
geometry
Definition at line 112 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 112 of file TpotMonDraw.h
Referenced by draw_detnames_sphenix().
|
private |
mapping
Definition at line 109 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 109 of file TpotMonDraw.h
Referenced by TpotMonDraw().
|
private |
Definition at line 124 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 124 of file TpotMonDraw.h
Referenced by TpotMonDraw().
|
private |
Definition at line 127 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 127 of file TpotMonDraw.h
Referenced by get_ref_histogram(), get_ref_scale_factor(), and TpotMonDraw().
|
private |
Definition at line 121 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 121 of file TpotMonDraw.h
Referenced by Draw(), and set_sample_window_signal().
|
private |
needed to get time axis right
Definition at line 118 of file TpotMonDraw.h.
View newest version in sPHENIX GitHub at line 118 of file TpotMonDraw.h
Referenced by TpotMonDraw().