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

#include <analysis/blob/master/EMCTemplateFitting/src/CaloTemplateFit.h>

+ Inheritance diagram for CaloTemplateFit:
+ Collaboration diagram for CaloTemplateFit:

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 PHParametersGetCalibrationParameters () const
 Get the parameters for readonly.
 
PHParametersGetCalibrationParameters ()
 
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 &param)
 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")
 

Detailed Description

Definition at line 24 of file CaloTemplateFit.h.

View newest version in sPHENIX GitHub at line 24 of file CaloTemplateFit.h

Member Enumeration Documentation

Enumerator:
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

Constructor & Destructor Documentation

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().

+ Here is the call graph for this function:

Member Function Documentation

std::vector< std::vector< float > > CaloTemplateFit::calo_processing_perchnl ( std::vector< std::vector< float >>  chnlvector)
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< float > CaloTemplateFit::calo_processing_singlethread ( std::vector< float >  chnlvector)
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().

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string CaloTemplateFit::get_calib_tower_node_prefix ( ) const
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.

std::string CaloTemplateFit::get_raw_tower_node_prefix ( ) const
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.

const PHParameters& CaloTemplateFit::GetCalibrationParameters ( ) const
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().

+ Here is the caller graph for this function:

PHParameters& CaloTemplateFit::GetCalibrationParameters ( )
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.

int CaloTemplateFit::InitRun ( PHCompositeNode )
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().

+ Here is the call graph for this function:

int CaloTemplateFit::process_event ( PHCompositeNode )
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().

+ Here is the call graph for this function:

void CaloTemplateFit::set_calib_tower_node_prefix ( const std::string &  calibTowerNodePrefix)
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.

void CaloTemplateFit::set_nsamples ( int  nsamples)
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().

+ Here is the caller graph for this function:

void CaloTemplateFit::set_nthreads ( int  nthreads)
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().

+ Here is the caller graph for this function:

void CaloTemplateFit::set_raw_tower_node_prefix ( const std::string &  rawTowerNodePrefix)
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.

void CaloTemplateFit::set_templatefile ( const std::string &  templatename)
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().

+ Here is the caller graph for this function:

void CaloTemplateFit::SetCalibrationParameters ( const PHParameters calib_params)
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.

void CaloTemplateFit::SetDefaultParameters ( PHParameters param)
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaloTemplateFit::SetFitType ( FitMethodType  t)
inline

Definition at line 100 of file CaloTemplateFit.h.

View newest version in sPHENIX GitHub at line 100 of file CaloTemplateFit.h

References _fit_type, and t.

double CaloTemplateFit::template_function ( double x,
double par 
)
staticprivate

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().

+ Here is the caller graph for this function:

Member Data Documentation

PHParameters CaloTemplateFit::_calib_params
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().

std::string CaloTemplateFit::_calib_tower_node_prefix
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().

RawTowerContainer* CaloTemplateFit::_calib_towers
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().

FitMethodType CaloTemplateFit::_fit_type
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().

int CaloTemplateFit::_nsamples
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().

int CaloTemplateFit::_nthreads
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().

std::string CaloTemplateFit::_raw_tower_node_prefix
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().

RawTowerContainer* CaloTemplateFit::_raw_towers
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().

std::string CaloTemplateFit::CaliTowerNodeName
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().

std::string CaloTemplateFit::detector
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().

TF1* CaloTemplateFit::f_fit
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().

TH1F* CaloTemplateFit::h_data
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().

TProfile * CaloTemplateFit::h_template = nullptr
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().

std::string CaloTemplateFit::RawTowerNodeName
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().

std::string CaloTemplateFit::template_input_file
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().


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