Analysis Software
Documentation for sPHENIX simulation software
|
#include <analysis/blob/master/EMCTemplateFitting/src/CaloTemplateFit.h>
Public Types | |
enum | FitMethodType { kPowerLawExp, kPowerLawDoubleExp, kPowerLawDoubleExpWithGlobalFitConstraint, kPeakSample } |
Public Member Functions | |
CaloTemplateFit (const std::string &name) | |
int | InitRun (PHCompositeNode *topNode) |
int | process_event (PHCompositeNode *topNode) |
void | CreateNodeTree (PHCompositeNode *topNode) |
std::string | get_calib_tower_node_prefix () const |
void | set_calib_tower_node_prefix (const std::string &calibTowerNodePrefix) |
std::string | get_raw_tower_node_prefix () const |
void | set_raw_tower_node_prefix (const std::string &rawTowerNodePrefix) |
void | set_nthreads (int nthreads) |
void | set_nsamples (int nsamples) |
void | set_templatefile (const std::string &templatename) |
const PHParameters & | GetCalibrationParameters () const |
Get the parameters for readonly. | |
PHParameters & | GetCalibrationParameters () |
void | SetCalibrationParameters (const PHParameters &calib_params) |
void | SetFitType (FitMethodType t) |
Public Member Functions inherited from SubsysReco | |
~SubsysReco () override | |
virtual int | End (PHCompositeNode *) |
Called at the end of all processing. | |
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. | |
Private Member Functions | |
std::vector< std::vector< float > > | calo_processing_perchnl (std::vector< std::vector< float >> chnlvector) |
std::vector< float > | calo_processing_singlethread (std::vector< float > chnlvector) |
void | SetDefaultParameters (PHParameters ¶m) |
load the default parameter to param | |
Static Private Member Functions | |
static double | template_function (double *x, double *par) |
Private Attributes | |
RawTowerContainer * | _calib_towers |
RawTowerContainer * | _raw_towers |
std::string | detector |
std::string | RawTowerNodeName |
std::string | CaliTowerNodeName |
std::string | _calib_tower_node_prefix |
std::string | _raw_tower_node_prefix |
int | _nthreads |
int | _nsamples |
std::string | template_input_file |
TH1F * | h_data |
TF1 * | f_fit |
PHParameters | _calib_params |
FitMethodType | _fit_type |
Static Private Attributes | |
static TProfile * | h_template = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Definition at line 24 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 24 of file CaloTemplateFit.h
kPowerLawExp |
single power-low-exp fit, PROTOTYPE4_FEM::SampleFit_PowerLawExp() |
kPowerLawDoubleExp |
power-low-double-exp fit, PROTOTYPE4_FEM::SampleFit_PowerLawDoubleExp |
kPowerLawDoubleExpWithGlobalFitConstraint |
power-low-double-exp fit, PROTOTYPE4_FEM::SampleFit_PowerLawDoubleExp, and constraining all tower take identical shape |
kPeakSample |
just use the peak sample, PROTOTYPE4_FEM::SampleFit_PeakSample() |
Definition at line 83 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 83 of file CaloTemplateFit.h
CaloTemplateFit::CaloTemplateFit | ( | const std::string & | name | ) |
Definition at line 202 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 202 of file CaloTemplateFit.cc
References _calib_params, and SetDefaultParameters().
|
private |
Definition at line 71 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 71 of file CaloTemplateFit.cc
References configureMap::data, f, h, i, pedestal(), round(), t, and testSigmaEff::v.
Referenced by process_event().
|
private |
Definition at line 149 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 149 of file CaloTemplateFit.cc
References configureMap::data, h_template, i, and pedestal().
void CaloTemplateFit::CreateNodeTree | ( | PHCompositeNode * | topNode | ) |
Definition at line 501 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 501 of file CaloTemplateFit.cc
References _calib_params, _calib_tower_node_prefix, _calib_towers, _raw_tower_node_prefix, _raw_towers, assert, CaliTowerNodeName, detector, PHNodeIterator::findFirst(), RawTowerContainer::getCalorimeterID(), Fun4AllBase::Name(), RawTowerNodeName, and PHParameters::SaveToNodeTree().
Referenced by InitRun().
|
inline |
Definition at line 35 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 35 of file CaloTemplateFit.h
References _calib_tower_node_prefix.
|
inline |
Definition at line 45 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 45 of file CaloTemplateFit.h
References _raw_tower_node_prefix.
|
inline |
Get the parameters for readonly.
Definition at line 70 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 70 of file CaloTemplateFit.h
References _calib_params.
Referenced by Fun4All_PRDF().
|
inline |
Get the parameters for update. Useful fields are listed in SetDefaultParameters();
Definition at line 74 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 74 of file CaloTemplateFit.h
References _calib_params.
|
virtual |
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.
Reimplemented from SubsysReco.
Definition at line 219 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 219 of file CaloTemplateFit.cc
References _calib_params, assert, CreateNodeTree(), Fun4AllReturnCodes::EVENT_OK, f_fit, h_data, h_template, Fun4AllBase::Name(), PHParameters::Print(), template_function(), template_input_file, and Fun4AllBase::Verbosity().
|
virtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Definition at line 250 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 250 of file CaloTemplateFit.cc
References _nsamples, _raw_towers, assert, calo_processing_perchnl(), test_fpe::count, Fun4AllReturnCodes::EVENT_OK, RawTower_Prototype4::get_energy(), RawTower_Prototype4::get_signal_samples(), RawTowerContainer::getTowers(), i, Fun4AllBase::Name(), RawTower_Prototype4::NSAMPLES, RawTower_Prototype4::set_energy(), RawTower_Prototype4::set_time(), RawTowerContainer::size(), Acts::Test::values, and Fun4AllBase::Verbosity().
|
inline |
Definition at line 40 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 40 of file CaloTemplateFit.h
References _calib_tower_node_prefix.
|
inline |
Definition at line 59 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 59 of file CaloTemplateFit.h
References _nsamples, and nsamples.
Referenced by Fun4All_PRDF().
|
inline |
Definition at line 55 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 55 of file CaloTemplateFit.h
References _nthreads.
Referenced by Fun4All_PRDF().
|
inline |
Definition at line 50 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 50 of file CaloTemplateFit.h
References _raw_tower_node_prefix.
|
inline |
Definition at line 63 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 63 of file CaloTemplateFit.h
References template_input_file.
Referenced by Fun4All_PRDF().
|
inline |
Overwrite the parameter. Useful fields are listed in SetDefaultParameters();
Definition at line 78 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 78 of file CaloTemplateFit.h
References _calib_params.
|
private |
load the default parameter to param
Definition at line 561 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 561 of file CaloTemplateFit.cc
References PHParameters::set_double_param(), and PHParameters::set_int_param().
Referenced by CaloTemplateFit().
|
inline |
Definition at line 100 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 100 of file CaloTemplateFit.h
Definition at line 61 of file CaloTemplateFit.cc.
View newest version in sPHENIX GitHub at line 61 of file CaloTemplateFit.cc
References h_template, and v1.
Referenced by InitRun().
|
private |
Definition at line 129 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 129 of file CaloTemplateFit.h
Referenced by CaloTemplateFit(), CreateNodeTree(), GetCalibrationParameters(), InitRun(), and SetCalibrationParameters().
|
private |
Definition at line 110 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 110 of file CaloTemplateFit.h
Referenced by CreateNodeTree(), get_calib_tower_node_prefix(), and set_calib_tower_node_prefix().
|
private |
Definition at line 103 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 103 of file CaloTemplateFit.h
Referenced by CreateNodeTree().
|
private |
Definition at line 131 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 131 of file CaloTemplateFit.h
Referenced by SetFitType().
|
private |
Definition at line 116 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 116 of file CaloTemplateFit.h
Referenced by process_event(), and set_nsamples().
|
private |
Definition at line 114 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 114 of file CaloTemplateFit.h
Referenced by set_nthreads().
|
private |
Definition at line 111 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 111 of file CaloTemplateFit.h
Referenced by CreateNodeTree(), get_raw_tower_node_prefix(), and set_raw_tower_node_prefix().
|
private |
Definition at line 104 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 104 of file CaloTemplateFit.h
Referenced by CreateNodeTree(), and process_event().
|
private |
Definition at line 108 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 108 of file CaloTemplateFit.h
Referenced by CreateNodeTree().
|
private |
Definition at line 106 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 106 of file CaloTemplateFit.h
Referenced by CreateNodeTree().
|
private |
Definition at line 127 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 127 of file CaloTemplateFit.h
Referenced by InitRun().
|
private |
Definition at line 126 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 126 of file CaloTemplateFit.h
Referenced by InitRun().
|
staticprivate |
Definition at line 119 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 119 of file CaloTemplateFit.h
Referenced by calo_processing_singlethread(), and InitRun().
|
private |
Definition at line 107 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 107 of file CaloTemplateFit.h
Referenced by CreateNodeTree().
|
private |
Definition at line 124 of file CaloTemplateFit.h.
View newest version in sPHENIX GitHub at line 124 of file CaloTemplateFit.h
Referenced by InitRun(), and set_templatefile().