LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
lar::example::ShowerCalibrationGaloreScale Class Reference

A shower calibration service provider applying a uniform scale. More...

#include "ShowerCalibrationGaloreScale.h"

Inheritance diagram for lar::example::ShowerCalibrationGaloreScale:
lar::example::ShowerCalibrationGalore lar::UncopiableAndUnmovableClass

Classes

struct  Config
 Collection of configuration parameters for the service. More...
 

Public Types

using parameters_type = fhicl::Table< Config >
 Type describing all the parameters. More...
 
using PDGID_t = int
 A type representing a particle ID in Particle Data Group convention. More...
 

Public Member Functions

 ShowerCalibrationGaloreScale (Config const &config)
 Constructor from the complete configuration object. More...
 
 ShowerCalibrationGaloreScale (fhicl::ParameterSet const &pset)
 Constructor from a parameter set. More...
 
virtual std::string report () const override
 Returns a string with a short report of the current correctionß More...
 
Correction query
virtual float correctionFactor (recob::Shower const &, PDGID_t=unknownID) const override
 Returns a correction factor for a given reconstructed shower. More...
 
virtual Correction_t correction (recob::Shower const &, PDGID_t=unknownID) const override
 Returns the correction for a given reconstructed shower. More...
 

Static Public Attributes

static constexpr PDGID_t unknownID = 0
 A mnemonic constant for unknown particle ID. More...
 

Private Attributes

Correction_t corr
 

Detailed Description

A shower calibration service provider applying a uniform scale.

See also
ShowerCalibrationGalore example overview

The service provider computes a calibration factor for a reconstructed shower. The calibration factor is a single number for the whole detector and for the entire data sample.

Configuration parameters

  • factor (real, mandatory): the scale factor to apply
  • error (real, mandatory): the total uncertainty on the correction factor

Definition at line 48 of file ShowerCalibrationGaloreScale.h.

Member Typedef Documentation

Type describing all the parameters.

Definition at line 70 of file ShowerCalibrationGaloreScale.h.

A type representing a particle ID in Particle Data Group convention.

Definition at line 66 of file ShowerCalibrationGalore.h.

Constructor & Destructor Documentation

lar::example::ShowerCalibrationGaloreScale::ShowerCalibrationGaloreScale ( Config const &  config)
inline

Constructor from the complete configuration object.

Definition at line 75 of file ShowerCalibrationGaloreScale.h.

76  : corr(config.factor(), config.error())
77  {}
lar::example::ShowerCalibrationGaloreScale::ShowerCalibrationGaloreScale ( fhicl::ParameterSet const &  pset)
inline

Constructor from a parameter set.

Definition at line 81 of file ShowerCalibrationGaloreScale.h.

References correctionFactor().

83  (parameters_type(pset, { "service_type", "service_provider" })())
84  {}
fhicl::Table< Config > parameters_type
Type describing all the parameters.
ShowerCalibrationGaloreScale(Config const &config)
Constructor from the complete configuration object.

Member Function Documentation

virtual Correction_t lar::example::ShowerCalibrationGaloreScale::correction ( recob::Shower const &  ,
PDGID_t  = unknownID 
) const
inlineoverridevirtual

Returns the correction for a given reconstructed shower.

Returns
the correction with its uncertainty
See also
correctionFactor()

The returned value includes a correction factor to be applied to any shower energy to calibrate it, with its global uncertainty.

Implements lar::example::ShowerCalibrationGalore.

Definition at line 114 of file ShowerCalibrationGaloreScale.h.

References corr.

Referenced by correctionFactor().

virtual float lar::example::ShowerCalibrationGaloreScale::correctionFactor ( recob::Shower const &  ,
PDGID_t  = unknownID 
) const
inlineoverridevirtual

Returns a correction factor for a given reconstructed shower.

Returns
the uniform energy correction factor
See also
correction()

The returned value includes a correction factor to be applied to the shower energy to calibrate it, but no uncertainty.

Implements lar::example::ShowerCalibrationGalore.

Definition at line 101 of file ShowerCalibrationGaloreScale.h.

References corr, correction(), and lar::example::ShowerCalibrationGalore::Correction_t::factor.

Referenced by ShowerCalibrationGaloreScale().

virtual std::string lar::example::ShowerCalibrationGaloreScale::report ( ) const
inlineoverridevirtual

Returns a string with a short report of the current correctionß

Implements lar::example::ShowerCalibrationGalore.

Definition at line 121 of file ShowerCalibrationGaloreScale.h.

References corr.

122  {
123  std::ostringstream sstr;
124  sstr << "Uniform correction: " << corr;
125  return sstr.str();
126  }

Member Data Documentation

Correction_t lar::example::ShowerCalibrationGaloreScale::corr
private

Definition at line 131 of file ShowerCalibrationGaloreScale.h.

Referenced by correction(), correctionFactor(), and report().

constexpr PDGID_t lar::example::ShowerCalibrationGalore::unknownID = 0
staticinherited

A mnemonic constant for unknown particle ID.

Definition at line 69 of file ShowerCalibrationGalore.h.

Referenced by lar::example::ShowerCalibrationGaloreFromPID::selectCorrection().


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