Evaluate a transfer function on energy described by a 2D histogram retrieved from a ROOT file. More...
Detailed Description
Evaluate a transfer function on energy described by a 2D histogram retrieved from a ROOT file.
This module takes as inputs two LorentzVectors: a 'gen-level' particle (which may be computed using for instance a Block or a 'real' transfer function) and a 'reco-level' particle (experimentally reconstructed). Assuming the LorentzVectors differ only by their energy, this module returns the value of a transfer function (TF) evaluated on their respective energies.
The TF is described by a 2D histogram (a ROOT TH2), where the X-axis defines the "generated" (true) energy \(E_{gen}\), and the Y-axis the difference between the reconstructed and the generated energy ( \(E_{rec}-E_{gen}\)).
It is assumed the histogram is correctly normalised, i.e. integrals of slices along the Y-axis sum up to 1. The TF is assumed to continue asymptotically as a constant for \(E_{gen} \to \infty\). If the difference \(E_{rec}-E_{gen}\) is outside the TH2's Y-axis range, the TF evaluates to 0.
Integration dimension
This module requires 0 phase-space points.
Parameters
Name | Type | Description |
---|---|---|
file | string | Path to the ROOT file in which the transfer function is saved. |
th2_name | string | Name of the TH2 stored in file file |
Inputs
Name | Type | Description |
---|---|---|
reco_particle | LorentzVector | Experimentally reconstructed particle. |
gen_particle | LorentzVector | Gen-level particle. |
Outputs
Name | Type | Description |
---|---|---|
TF | double | Value of the TF evaluated on the reco and gen energies. |
Definition at line 236 of file BinnedTransferFunctionOnEnergy.cc.
Public Member Functions | |
BinnedTransferFunctionOnEnergyEvaluator (PoolPtr pool, const ParameterSet ¶meters) | |
virtual Status | work () override |
Main function. More... | |
Public Member Functions inherited from BinnedTransferFunctionOnEnergyBase | |
BinnedTransferFunctionOnEnergyBase (PoolPtr pool, const ParameterSet ¶meters) | |
Public Member Functions inherited from Module | |
Module (PoolPtr pool, const std::string &name) | |
Constructor. More... | |
virtual void | configure () |
Called once at the beginning of the job. | |
virtual void | beginIntegration () |
Called once at the beginning of the integration. | |
virtual void | beginPoint () |
Called once when a new PS point is started. More... | |
virtual void | beginLoop () |
Called once at the beginning of a loop. More... | |
virtual void | endLoop () |
Called once at the end of a loop. More... | |
virtual void | endPoint () |
Called once when a PS point is finished. More... | |
virtual void | endIntegration () |
Called once at the end of the integration. | |
virtual void | finish () |
Called once at the end of the job. | |
virtual std::string | name () const final |
Additional Inherited Members | |
Public Types inherited from Module | |
enum | Status : std::int8_t { OK, NEXT, ABORT } |
Static Public Member Functions inherited from Module | |
static std::string | statusToString (const Status &status) |
static bool | is_virtual_module (const std::string &name) |
Test if a given name correspond to a virtual module. More... | |
Protected Member Functions inherited from Module | |
template<typename T , typename... Args> | |
std::shared_ptr< T > | produce (const std::string &name, Args... args) |
Add a new output to the module. More... | |
template<typename T > | |
Value< T > | get (const std::string &module, const std::string &name) |
template<typename T > | |
Value< T > | get (const InputTag &tag) |
Protected Attributes inherited from BinnedTransferFunctionOnEnergyBase | |
std::unique_ptr< TH2 > | m_th2 |
double | m_deltaMin |
double | m_deltaMax |
double | m_deltaRange |
double | m_EgenMin |
double | m_EgenMax |
double | m_fallBackEgenMax |
Value< LorentzVector > | m_reco_input |
Protected Attributes inherited from Module | |
PoolPtr | m_pool |
Member Function Documentation
◆ work()
|
inlineoverridevirtual |
Main function.
This method is called for each integration step. The module's logic and work happen here.
You'll usually want to override this function if you want your module to perform some task.
Reimplemented from Module.
Definition at line 243 of file BinnedTransferFunctionOnEnergy.cc.
The documentation for this class was generated from the following file: