Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LivePlot-Energy-EMC.C File Reference
#include <iostream>
#include <cstdlib>
#include <memory>
#include <sstream>
#include <string>
#include <cstring>
#include "TFile.h"
#include "TTree.h"
#include "TCanvas.h"
#include "TLegend.h"
+ Include dependency graph for LivePlot-Energy-EMC.C:

Go to the source code of this file.

Macros

#define NELEMS(arr)   (sizeof(arr)/sizeof(arr[0]))
 

Enumerations

enum  particle_type {
  electron, pion, electron, pion,
  electron, pion
}
 
enum  detector {
  cemc, eemc, femc, cemc,
  eemc, femc, cemc, eemc,
  femc
}
 

Functions

TTree * load_tree (const char *const file_name, const char *const tree_name)
 
void fill_histogram (TH1F *const h, TTree *const t, const Float_t min_value, const bool normalize)
 
void display_histogram (TH1F *const h_pion, TH1F *const h_electron, const char *const title, const char *const label)
 
char * generate_name (const particle_type p, const int particle_energy_gev, const detector d)
 
char * generate_file_path (const particle_type p, const int particle_energy_gev, const detector d)
 
char * generate_title (const int particle_energy_gev, const detector d)
 
char * generate_label (const int particle_energy_gev, const detector d)
 
void LivePlot_Energy_EMC ()
 
char * strdup (const char *s)
 

Variables

const char *const data_directory
 
static const int energy_levels [] = { 1, 2, 5, 10, 20 }
 

Macro Definition Documentation

#define NELEMS (   arr)    (sizeof(arr)/sizeof(arr[0]))

Definition at line 13 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 13 of file LivePlot-Energy-EMC.C

Referenced by LivePlot_Energy_EMC().

Enumeration Type Documentation

enum detector
Enumerator:
cemc 
eemc 
femc 
cemc 
eemc 
femc 
cemc 
eemc 
femc 

Definition at line 24 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 24 of file LivePlot-Energy-EMC.C

Enumerator:
electron 
pion 
electron 
pion 
electron 
pion 

Definition at line 22 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 22 of file LivePlot-Energy-EMC.C

Function Documentation

void display_histogram ( TH1F *const  h_pion,
TH1F *const  h_electron,
const char *const  title,
const char *const  label 
)

Definition at line 170 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 170 of file LivePlot-Energy-EMC.C

Referenced by LivePlot_Energy_EMC().

+ Here is the caller graph for this function:

void fill_histogram ( TH1F *const  h,
TTree *const  t,
const Float_t  min_value,
const bool  normalize 
)

Definition at line 146 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 146 of file LivePlot-Energy-EMC.C

References i.

Referenced by draw_histogram(), LivePlot_Energy_EMC(), and Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the caller graph for this function:

char * generate_file_path ( const particle_type  p,
const int  particle_energy_gev,
const detector  d 
)

Definition at line 221 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 221 of file LivePlot-Energy-EMC.C

References cemc, data_directory, eemc, electron, femc, path, pion, and strdup().

Referenced by draw_histogram(), LivePlot_Energy_EMC(), and Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char * generate_label ( const int  particle_energy_gev,
const detector  d 
)

Definition at line 259 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 259 of file LivePlot-Energy-EMC.C

References cemc, eemc, femc, CKF_timing_vs_mu::label, and strdup().

Referenced by generate_title(), LivePlot_Energy_EMC(), and Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char * generate_name ( const particle_type  p,
const int  particle_energy_gev,
const detector  d 
)

Definition at line 194 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 194 of file LivePlot-Energy-EMC.C

References cemc, eemc, electron, perf_headwind::name, pion, and strdup().

Referenced by LivePlot_Energy_EMC(), and Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char * generate_title ( const int  particle_energy_gev,
const detector  d 
)

Definition at line 254 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 254 of file LivePlot-Energy-EMC.C

References generate_label().

Referenced by LivePlot_Energy_EMC(), and Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LivePlot_Energy_EMC ( )

Definition at line 38 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 38 of file LivePlot-Energy-EMC.C

References cemc, display_histogram(), eemc, electron, energy_levels, femc, fill_histogram(), generate_file_path(), generate_label(), generate_name(), generate_title(), i, load_tree(), NELEMS, pion, and SetsPhenixStyle().

+ Here is the call graph for this function:

TTree * load_tree ( const char *const  file_name,
const char *const  tree_name 
)

Definition at line 132 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 132 of file LivePlot-Energy-EMC.C

Referenced by draw_histogram(), LivePlot_Energy_EMC(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::load_tree(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::loadIndex(), Plot_FastTrack_Efficiency(), Plot_Hit_Count(), Plot_Measured_Energy_Over_True_Energy_EMC(), and Plot_SVTX_Efficiency().

+ Here is the caller graph for this function:

char* strdup ( const char *  s)

Definition at line 188 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 188 of file LivePlot-Energy-EMC.C

References t.

Referenced by MakeActsGeometry::buildActsSurfaces(), generate_canvas_name(), generate_canvas_title(), generate_file_path(), generate_histogram_name(), generate_label(), generate_legend_entry_label(), generate_legend_header(), generate_name(), generate_save_file_path(), generate_save_name(), generate_title(), mg_register_http_endpoint(), Plot_FastTrack_Efficiency(), Plot_SVTX_Efficiency(), and testing::internal::posix::StrDup().

+ Here is the caller graph for this function:

Variable Documentation

const char* const data_directory
Initial value:
=
"/sphenix/user/gregtom3/data/Summer2018/ECAL_energy_studies"

Definition at line 16 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 16 of file LivePlot-Energy-EMC.C

Referenced by generate_file_path().

const int energy_levels[] = { 1, 2, 5, 10, 20 }
static

Definition at line 19 of file LivePlot-Energy-EMC.C.

View newest version in sPHENIX GitHub at line 19 of file LivePlot-Energy-EMC.C

Referenced by LivePlot_Energy_EMC().