Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Plot-Measured_Energy_Over_True_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 Plot-Measured_Energy_Over_True_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 true_energy, const Float_t min_value, const bool normalize)
 
void histogram_to_png (TH1F *const h_pion_CEMC, TH1F *const h_electron_CEMC, TH1F *const h_pion_EEMC, TH1F *const h_electron_EEMC, TH1F *const h_pion_FEMC, TH1F *const h_electron_FEMC, const char *const title, const char *const save_file_name, const char *const cemc_label, const char *const eemc_label, const char *const femc_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_save_name (const int particle_energy_gev)
 
char * generate_title (const int particle_energy_gev)
 
char * generate_label (const int particle_energy_gev, const detector d)
 
void Plot_Measured_Energy_Over_True_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 Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 13 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

Referenced by Plot_Measured_Energy_Over_True_Energy_EMC().

Enumeration Type Documentation

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

Definition at line 24 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 24 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

Enumerator:
electron 
pion 
electron 
pion 
electron 
pion 

Definition at line 22 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 22 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

Function Documentation

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

Definition at line 159 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 159 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

References i.

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

Definition at line 315 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 315 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

References perf_headwind::name, and strdup().

Referenced by 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)

Definition at line 324 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 324 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

References strdup(), and title.

+ Here is the call graph for this function:

void histogram_to_png ( TH1F *const  h_pion_CEMC,
TH1F *const  h_electron_CEMC,
TH1F *const  h_pion_EEMC,
TH1F *const  h_electron_EEMC,
TH1F *const  h_pion_FEMC,
TH1F *const  h_electron_FEMC,
const char *const  title,
const char *const  save_file_name,
const char *const  cemc_label,
const char *const  eemc_label,
const char *const  femc_label 
)

Definition at line 189 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 189 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

References ndetectors.

Referenced by Plot_Measured_Energy_Over_True_Energy_EMC().

+ Here is the caller graph for this function:

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

Definition at line 44 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 44 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

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

+ Here is the call graph for this function:

char* strdup ( const char *  s)

Definition at line 249 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 249 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

References t.

Variable Documentation

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

Definition at line 16 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 16 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

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

Definition at line 19 of file Plot-Measured_Energy_Over_True_Energy-EMC.C.

View newest version in sPHENIX GitHub at line 19 of file Plot-Measured_Energy_Over_True_Energy-EMC.C

Referenced by Plot_Measured_Energy_Over_True_Energy_EMC().