Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LiteCaloEval Class Reference

#include <coresoftware/blob/master/calibrations/calorimeter/calo_tower_slope/LiteCaloEval.h>

+ Inheritance diagram for LiteCaloEval:
+ Collaboration diagram for LiteCaloEval:

Public Types

enum  Calo { NONE = 0, CEMC = 1, HCALIN = 2, HCALOUT = 3 }
 

Public Member Functions

 LiteCaloEval (const std::string &name="LiteCaloEval", const std::string &caloNm="CEMC", const std::string &fnm="outJF")
 
void set_mode (int modeset)
 
void set_UseTowerInfo (int setTowerInfo)
 
virtual ~LiteCaloEval ()
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void CaloType (const Calo i)
 
void Get_Histos (const char *infile, const char *fun4all_file="")
 infile histos, outfile is output file name
 
void FitRelativeShifts (LiteCaloEval *ref_lce, int modeFitShifts)
 
void setFitMax (float fitMax)
 Setters.
 
void setFitMin (float fitMin)
 
float getFitMax ()
 Getters.
 
float getFitMin ()
 
void setInputTowerNodeName (const char *inpNodenm)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Init (PHCompositeNode *)
 
virtual int Reset (PHCompositeNode *)
 Reset.
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event.
 
void Print (const std::string &="ALL") const override
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Public Attributes

int m_myminbin = -1
 
int m_mymaxbin = -3
 
TFile * f_temp = nullptr
 

Private Attributes

TFile * cal_output = nullptr
 
TH1 * hcal_out_eta_phi [24][64] = {}
 
TH1 * hcalout_eta [25] = {}
 
TH2 * hcalout_energy_eta = nullptr
 
TH3 * hcalout_e_eta_phi = {}
 
TH1 * hcal_in_eta_phi [24][64] = {}
 
TH1 * hcalin_eta [25] = {}
 
TH2 * hcalin_energy_eta = nullptr
 
TH3 * hcalin_e_eta_phi = nullptr
 
TH1 * cemc_hist_eta_phi [96][258] = {}
 
TH1 * eta_hist [97] = {}
 
TH2 * energy_eta_hist = nullptr
 
TH3 * e_eta_phi = nullptr
 
Calo calotype = NONE
 
int _ievent = 0
 
float fitmin = 0.
 
float fitmax = 0.
 
std::string _caloname
 
std::string _filename
 
std::string _inputnodename
 
int mode = 0
 
int m_UseTowerInfo = 0
 

Additional Inherited Members

- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

Definition at line 22 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 22 of file LiteCaloEval.h

Member Enumeration Documentation

Enumerator:
NONE 
CEMC 
HCALIN 
HCALOUT 

Definition at line 30 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 30 of file LiteCaloEval.h

Constructor & Destructor Documentation

LiteCaloEval::LiteCaloEval ( const std::string &  name = "LiteCaloEval",
const std::string &  caloNm = "CEMC",
const std::string &  fnm = "outJF" 
)

Definition at line 76 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 76 of file LiteCaloEval.cc

virtual LiteCaloEval::~LiteCaloEval ( )
inlinevirtual

Definition at line 51 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 51 of file LiteCaloEval.h

Member Function Documentation

void LiteCaloEval::CaloType ( const Calo  i)
inline

Definition at line 69 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 69 of file LiteCaloEval.h

References calotype, and i.

Referenced by do_eta_fit(), do_eta_fit2(), do_eta_fit2_emc(), do_eta_fit2_ihcal(), do_eta_fit2_ohcal(), do_eta_fit_emc(), doTscFit(), dst_simple_towerslope_runmacro(), Fun4All_EMCal(), Fun4All_G4_SlopeCal(), rings_do_eta_fit2_emc(), rings_do_eta_fit2_ihcal(), rings_do_eta_fit2_ohcal(), run_calo_fromMDC2Hits_towslope_Fun4All_G4_Calo(), rundst_spiNo(), srundst_mdc2_clustest(), towerslope_dst_runner(), and tsdst_plus_tsfit().

+ Here is the caller graph for this function:

int LiteCaloEval::End ( PHCompositeNode topNode)
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 483 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 483 of file LiteCaloEval.cc

References cal_output, and Fun4AllReturnCodes::EVENT_OK.

void LiteCaloEval::FitRelativeShifts ( LiteCaloEval ref_lce,
int  modeFitShifts 
)

fitting - calls the LCE function

if mFS is 1, 10, 20, etc, will make onlyEta = false and will run phi loop below

nsmooth is an automatic smoothing of histos

if want more smoothing, look at mFS. If mFS=10, then addSmooth=1, and then there will be 2 total smoothings

flag that will run fits at tower level to get shifts, or will run at ring level and fit towers to eta slice histo

e.x. if mFS = 010 , 010%1000 = 10, 10/100 = 0 -> false, so dont run tower to rings e.x. if mFS = 110, 110%1000 = 110, 110/100 = 1 -> true, so run to fit eta slice histos fittings

histo to hold the returned fit parameter value

assign hnewf the eta slice histos.

Start of loop for eta only material

a1f, b1f hold the parameter value, parameter error, respectively

names for tgraphs, for eta slice histo and graph version of eta slice histo respectively

dummy indexing

will hold eta slice histo but with certain towers removed, depending on calo type

remove TPC

end flag

remove chimney only from eta bins 0-4, phi bins 14-19

create graph from the eta slice histo that is sent to fit function

this function will be used to fit eta slice histos below

Fit the eta slices w/ our user defined f'n and then get the tf1

This graph (name is gnewhc_eta) will have points by evaluating the function (f2f->Eval) retrieved from the fitting above

Point of this block is to make Fit1_etaout graph

get 'first' parameter, or really the second element bc of indexing

This if statement enables the phi (tower) material to execute

names of tower histo and graph version of same histo

histo to hold tower from non modified root files

make tf1 that will hold the resulting fit from myexpo on towers

reset the "myexpo" parameters

make graph and set points from evaluating f2f2

fill corrpat, which has returned fit values from towers e.x. if you want to view the histo that is, say, eta=12, phi = 1, you really need to draw the histo with eta=11,phi=0 bc of the i+1, j+1

Definition at line 913 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 913 of file LiteCaloEval.cc

References KFPMath::b, calotype, CEMC, cemc_hist_eta_phi, corr, eta_hist, std::tr1::f1, f_temp, fitmax, fitmin, hcal_in_eta_phi, hcal_out_eta_phi, HCALIN, hcalin_eta, HCALOUT, hcalout_eta, i, j, LCE_fitf(), LCE_grff, m_mymaxbin, m_myminbin, ambiguity_solver_full_chain::t1, and towid.

Referenced by do_eta_fit(), do_eta_fit2(), do_eta_fit2_emc(), do_eta_fit2_ihcal(), do_eta_fit2_ohcal(), do_eta_fit_emc(), doTscFit(), rings_do_eta_fit2_emc(), rings_do_eta_fit2_ihcal(), rings_do_eta_fit2_ohcal(), and tsdst_plus_tsfit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LiteCaloEval::Get_Histos ( const char *  infile,
const char *  fun4all_file = "" 
)

infile histos, outfile is output file name

start of eta loop

holds the eta slice of histos

assign the eta slice histo to an array (these arrays are private members in LCE.h)

start of phi loop

create string to hold name of individual tower

heta_tempp holds tower histogram

assign heta_tempp to array of tower histos

Definition at line 789 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 789 of file LiteCaloEval.cc

References KFPMath::a, KFPMath::b, calotype, CEMC, cemc_hist_eta_phi, eta_hist, f_temp, hcal_in_eta_phi, hcal_out_eta_phi, HCALIN, hcalin_eta, HCALOUT, hcalout_eta, i, infile, j, add_histos::outfile, and to_string().

Referenced by do_eta_fit(), do_eta_fit2(), do_eta_fit2_emc(), do_eta_fit2_ihcal(), do_eta_fit2_ohcal(), do_eta_fit_emc(), doTscFit(), rings_do_eta_fit2_emc(), rings_do_eta_fit2_ihcal(), rings_do_eta_fit2_ohcal(), and tsdst_plus_tsfit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float LiteCaloEval::getFitMax ( )

Getters.

getters

Definition at line 65 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 65 of file LiteCaloEval.cc

References fitmax.

float LiteCaloEval::getFitMin ( )

Definition at line 70 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 70 of file LiteCaloEval.cc

References fitmin.

int LiteCaloEval::InitRun ( PHCompositeNode topNode)
overridevirtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number. A place

to book histograms which have to know the run number.

create tower histos

create tower histos

create eta slice histos

create tower histos

Reimplemented from SubsysReco.

Definition at line 86 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 86 of file LiteCaloEval.cc

References _filename, _ievent, KFPMath::b, cal_output, calotype, CEMC, cemc_hist_eta_phi, e_eta_phi, energy_eta_hist, eta_hist, Fun4AllReturnCodes::EVENT_OK, hcal_in_eta_phi, hcal_out_eta_phi, HCALIN, hcalin_e_eta_phi, hcalin_energy_eta, hcalin_eta, HCALOUT, hcalout_e_eta_phi, hcalout_energy_eta, hcalout_eta, i, j, Fun4AllBase::Name(), NONE, and to_string().

+ Here is the call graph for this function:

void LiteCaloEval::set_mode ( int  modeset)
inline

Definition at line 41 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 41 of file LiteCaloEval.h

References mode.

void LiteCaloEval::set_UseTowerInfo ( int  setTowerInfo)
inline

Definition at line 46 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 46 of file LiteCaloEval.h

References m_UseTowerInfo.

void LiteCaloEval::setFitMax ( float  fitMax)

Setters.

setters

Definition at line 54 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 54 of file LiteCaloEval.cc

References fitmax.

Referenced by do_eta_fit2_emc(), do_eta_fit2_ihcal(), do_eta_fit2_ohcal(), do_eta_fit_emc(), doTscFit(), rings_do_eta_fit2_emc(), rings_do_eta_fit2_ihcal(), rings_do_eta_fit2_ohcal(), and tsdst_plus_tsfit().

+ Here is the caller graph for this function:

void LiteCaloEval::setFitMin ( float  fitMin)

Definition at line 59 of file LiteCaloEval.cc.

View newest version in sPHENIX GitHub at line 59 of file LiteCaloEval.cc

References fitmin.

Referenced by do_eta_fit2_emc(), do_eta_fit2_ihcal(), do_eta_fit2_ohcal(), do_eta_fit_emc(), doTscFit(), rings_do_eta_fit2_emc(), rings_do_eta_fit2_ihcal(), rings_do_eta_fit2_ohcal(), and tsdst_plus_tsfit().

+ Here is the caller graph for this function:

void LiteCaloEval::setInputTowerNodeName ( const char *  inpNodenm)
inline

Definition at line 99 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 99 of file LiteCaloEval.h

References _inputnodename.

Referenced by Fun4All_EMCal(), towerslope_dst_runner(), and tsdst_plus_tsfit().

+ Here is the caller graph for this function:

Member Data Documentation

std::string LiteCaloEval::_caloname
private

Definition at line 129 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 129 of file LiteCaloEval.h

Referenced by process_event().

std::string LiteCaloEval::_filename
private

Definition at line 130 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 130 of file LiteCaloEval.h

Referenced by InitRun().

int LiteCaloEval::_ievent = 0
private

Definition at line 126 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 126 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

std::string LiteCaloEval::_inputnodename
private

Definition at line 131 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 131 of file LiteCaloEval.h

Referenced by process_event(), and setInputTowerNodeName().

TFile* LiteCaloEval::cal_output = nullptr
private

Definition at line 106 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 106 of file LiteCaloEval.h

Referenced by End(), and InitRun().

Calo LiteCaloEval::calotype = NONE
private

Definition at line 125 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 125 of file LiteCaloEval.h

Referenced by CaloType(), FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TH1* LiteCaloEval::cemc_hist_eta_phi[96][258] = {}
private

Definition at line 118 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 118 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TH3* LiteCaloEval::e_eta_phi = nullptr
private

Definition at line 121 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 121 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH2* LiteCaloEval::energy_eta_hist = nullptr
private

Definition at line 120 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 120 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH1* LiteCaloEval::eta_hist[97] = {}
private

Definition at line 119 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 119 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TFile* LiteCaloEval::f_temp = nullptr

Definition at line 76 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 76 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), and Get_Histos().

float LiteCaloEval::fitmax = 0.
private

Definition at line 128 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 128 of file LiteCaloEval.h

Referenced by do_eta_fit2(), FitRelativeShifts(), getFitMax(), and setFitMax().

float LiteCaloEval::fitmin = 0.
private

Definition at line 127 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 127 of file LiteCaloEval.h

Referenced by do_eta_fit2(), FitRelativeShifts(), getFitMin(), and setFitMin().

TH1* LiteCaloEval::hcal_in_eta_phi[24][64] = {}
private

Definition at line 113 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 113 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TH1* LiteCaloEval::hcal_out_eta_phi[24][64] = {}
private

Definition at line 108 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 108 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TH3* LiteCaloEval::hcalin_e_eta_phi = nullptr
private

Definition at line 116 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 116 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH2* LiteCaloEval::hcalin_energy_eta = nullptr
private

Definition at line 115 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 115 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH1* LiteCaloEval::hcalin_eta[25] = {}
private

Definition at line 114 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 114 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

TH3* LiteCaloEval::hcalout_e_eta_phi = {}
private

Definition at line 111 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 111 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH2* LiteCaloEval::hcalout_energy_eta = nullptr
private

Definition at line 110 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 110 of file LiteCaloEval.h

Referenced by InitRun(), and process_event().

TH1* LiteCaloEval::hcalout_eta[25] = {}
private

Definition at line 109 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 109 of file LiteCaloEval.h

Referenced by FitRelativeShifts(), Get_Histos(), InitRun(), and process_event().

int LiteCaloEval::m_mymaxbin = -3

Definition at line 28 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 28 of file LiteCaloEval.h

Referenced by doTscFit(), FitRelativeShifts(), rings_do_eta_fit2_emc(), and tsdst_plus_tsfit().

int LiteCaloEval::m_myminbin = -1

Definition at line 27 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 27 of file LiteCaloEval.h

Referenced by doTscFit(), FitRelativeShifts(), rings_do_eta_fit2_emc(), and tsdst_plus_tsfit().

int LiteCaloEval::m_UseTowerInfo = 0
private

Definition at line 137 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 137 of file LiteCaloEval.h

Referenced by process_event(), and set_UseTowerInfo().

int LiteCaloEval::mode = 0
private

Definition at line 134 of file LiteCaloEval.h.

View newest version in sPHENIX GitHub at line 134 of file LiteCaloEval.h

Referenced by process_event(), and set_mode().


The documentation for this class was generated from the following files: