LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Calibrates the energy of the clusters. More...
#include "LinearEnergyAlg.h"
Classes | |
struct | BirksParameters |
struct | Config |
Algorithm configuration. More... | |
struct | ConstantRecombParameters |
struct | ModBoxParameters |
struct | ModelName |
struct | RecombinationConfig |
Configuration of parameters of the box model. More... | |
Public Types | |
enum | RecombinationModel_t { kModBox, kBirks, kConstant, nRecombinationModel } |
Public Member Functions | |
Construction and configuration | |
LinearEnergyAlg (Config const &config) | |
Constructor with configuration validation. More... | |
LinearEnergyAlg (fhicl::ParameterSet const &pset) | |
Constructor with configuration validation. More... | |
Set up | |
void | setup (detinfo::DetectorProperties const &detproperty, detinfo::DetectorClocks const &detclock, geo::GeometryCore const &geometry) |
Sets up the algorithm. More... | |
template<typename Stream > | |
void | DumpConfiguration (Stream &&out, std::string indent, std::string firstIndent) const |
Prints the current algorithm configuration. More... | |
template<typename Stream > | |
void | DumpConfiguration (Stream &&out, std::string indent="") const |
Prints the current algorithm configuration. More... | |
Operations | |
template<typename BeginHitIter , typename EndHitIter > | |
double | CalculateClusterEnergy (recob::Cluster const &cluster, BeginHitIter beginHit, EndHitIter endHit) const |
Calculates the energy of a single cluster. More... | |
template<typename Hits > | |
double | CalculateClusterEnergy (recob::Cluster const &cluster, Hits &&hits) const |
Calculates the energy of a single cluster. More... | |
std::vector< double > | CalculateEnergy (std::vector< art::Ptr< recob::Cluster >> const &clusters, art::Assns< recob::Cluster, recob::Hit > const &hitsPerCluster) const |
Calculates the energy of the shower. More... | |
Private Member Functions | |
void | initialize () |
double | CalculateHitEnergy (recob::Hit const &hit) const |
Returns the corrected energy from the hit. More... | |
double | RecombinationCorrection (double dEdx) const |
TODO: make it more flexible. More... | |
double | ModBoxInverse (double dEdx) const |
double | BirksInverse (double dEdx) const |
Private Attributes | |
geo::GeometryCore const * | geom = nullptr |
Pointer to the geometry to be used. More... | |
detinfo::DetectorProperties const * | detp = nullptr |
Pointer to the detector property. More... | |
detinfo::DetectorClocks const * | detc = nullptr |
Pointer to the detector clock. More... | |
bool | fUseArea |
int | fRecombModel |
ModBoxParameters | recombModBoxParams |
Parameters for recombination box model; filled only when this model is selected. More... | |
BirksParameters | recombBirksParams |
Parameters for recombination Birks model; filled only when this model is selected. More... | |
ConstantRecombParameters | recombConstParams |
Parameters for constant recombination factor; filled only when this model is selected. More... | |
double | fElectronLifetime |
double | fDeconNorm |
Static Private Attributes | |
static constexpr double | kWion = 23.6e-9 |
ionization potenial in LAr, 23.6 eV = 1e, Wion in GeV/e More... | |
static constexpr double | kRecombFactor = 0.62 |
constant correction used in the current MicroBooNE shower reconstruction More... | |
Calibrates the energy of the clusters.
Example of configuration:
Parameters:
recob::Hit::Integral()
) instead of hit peak amplitude for charge estimationBirks
, ModBox
or Constant
. Each requires its own specific configuration parameters.Birks
, Birks Law model (see S.Amoruso et al., NIM A 523 (2004) 275) requires configuration parameters:util::kRecombA
)util::kRecombk
) in kV/cm*(g/cm^2)/MeVModBox
, box model requires configuration parameters:util::kModBoxA
)util::kModBoxB
) in kV/cm*(g/cm^2)/MeVConstant
recombination factor, requires configuration parameters:Definition at line 79 of file LinearEnergyAlg.h.
Enumerator | |
---|---|
kModBox | |
kBirks | |
kConstant | |
nRecombinationModel |
Definition at line 89 of file LinearEnergyAlg.h.
calo::LinearEnergyAlg::LinearEnergyAlg | ( | Config const & | config | ) |
Constructor with configuration validation.
config | configuration parameter structure |
For the configuration, see LinearEnergyAlg
documentation.
Definition at line 82 of file LinearEnergyAlg.cxx.
References calo::LinearEnergyAlg::ModBoxParameters::A, calo::LinearEnergyAlg::BirksParameters::A, calo::LinearEnergyAlg::ModBoxParameters::B, calo::LinearEnergyAlg::ConstantRecombParameters::factor, fRecombModel, fUseArea, calo::LinearEnergyAlg::BirksParameters::k, kBirks, kConstant, kModBox, recombBirksParams, recombConstParams, calo::LinearEnergyAlg::Config::Recombination, and recombModBoxParams.
|
inline |
Constructor with configuration validation.
pset | FHiCL configuration parameter set |
Translates the parameter set into a configuration object and uses the validating constructor to initialise the object.
For the configuration, see LinearEnergyAlg
documentation.
Definition at line 198 of file LinearEnergyAlg.h.
|
private |
Definition at line 229 of file LinearEnergyAlg.cxx.
References calo::LinearEnergyAlg::BirksParameters::A, detinfo::DetectorProperties::Density(), detp, detinfo::DetectorProperties::Efield(), calo::LinearEnergyAlg::BirksParameters::k, kWion, and recombBirksParams.
Referenced by RecombinationCorrection().
double calo::LinearEnergyAlg::CalculateClusterEnergy | ( | recob::Cluster const & | cluster, |
BeginHitIter | beginHit, | ||
EndHitIter | endHit | ||
) | const |
Calculates the energy of a single cluster.
BeginHitIter | type of iterator to the first associated hit |
EndHitIter | type of iterator to the past-the-last associated hit |
cluster | list of clusters we want the energy of |
hits | pointers to all hits associated to the cluster |
beginHit | iterator to the first hit associated to the cluster |
endHit | iterator to past-the-last hit associated to the cluster |
The hits
are stored as (constant) pointers.
Definition at line 393 of file LinearEnergyAlg.h.
References CalculateHitEnergy(), DumpConfiguration(), E, and fhicl::detail::atom::value().
Referenced by CalculateClusterEnergy(), CalculateEnergy(), and DumpConfiguration().
|
inline |
Calculates the energy of a single cluster.
Hits | a range of hits associated with the cluster |
cluster | list of clusters we want the energy of |
hits | pointers to all hits associated to the cluster |
The hits
are stored as (constant) pointers into a "range", that is any object (e.g. a STL vector) supporting begin()
and end()
iterators.
Definition at line 290 of file LinearEnergyAlg.h.
References evd::details::begin(), CalculateClusterEnergy(), CalculateEnergy(), evd::details::end(), hits(), and lar::dump::vector().
std::vector< double > calo::LinearEnergyAlg::CalculateEnergy | ( | std::vector< art::Ptr< recob::Cluster >> const & | clusters, |
art::Assns< recob::Cluster, recob::Hit > const & | hitsPerCluster | ||
) | const |
Calculates the energy of the shower.
clusters | list of clusters we want the energy of |
hitsPerCluster | associations of all clusters to all hits |
A vector is returned with a entry per plane in the TPC of the clusters. The energy has a very negative value (std::numeric_limits<double>::lowest()
) for the planes with no cluster. See CalculateClusterEnergy()
for the algorithm details.
Definition at line 147 of file LinearEnergyAlg.cxx.
References CalculateClusterEnergy(), E, geom, recob::Cluster::ID(), geo::TPCGeo::Nplanes(), recob::Cluster::Plane(), util::flags::to_string(), and geo::GeometryCore::TPC().
Referenced by CalculateClusterEnergy().
|
private |
Returns the corrected energy from the hit.
hit | the hit to be corrected |
Definition at line 123 of file LinearEnergyAlg.cxx.
References detc, fDeconNorm, fElectronLifetime, recob::Hit::Integral(), kWion, recob::Hit::PeakTime(), RecombinationCorrection(), and detinfo::DetectorClocks::TPCTick2TrigTime().
Referenced by CalculateClusterEnergy().
void calo::LinearEnergyAlg::DumpConfiguration | ( | Stream && | out, |
std::string | indent, | ||
std::string | firstIndent | ||
) | const |
Prints the current algorithm configuration.
Stream | type of output stream |
out | output stream where to write the information |
indent | indentation for all lines |
firstIndent | special indentation for the first line |
The configuration parameters are printed in human-readable form. The output starts at the current line of the stream, and it terminates with a new line.
This method does not require the algorithm to have been set up (via Setup()
), since it just prints user configuration as given at construction time.
Definition at line 417 of file LinearEnergyAlg.h.
References calo::LinearEnergyAlg::ModBoxParameters::A, calo::LinearEnergyAlg::BirksParameters::A, calo::LinearEnergyAlg::ModBoxParameters::B, calo::LinearEnergyAlg::ModelName::Birks, calo::LinearEnergyAlg::ModelName::Constant, calo::LinearEnergyAlg::ConstantRecombParameters::factor, fRecombModel, fUseArea, calo::LinearEnergyAlg::BirksParameters::k, kBirks, kConstant, kModBox, calo::LinearEnergyAlg::ModelName::ModBox, recombBirksParams, recombConstParams, and recombModBoxParams.
Referenced by CalculateClusterEnergy(), DumpConfiguration(), and setup().
|
inline |
Prints the current algorithm configuration.
Stream | type of output stream |
out | output stream where to write the information |
indent | (default: none) indentation for all lines (including the first one) |
The configuration parameters are printed in human-readable form. The output starts at the current line of the stream, and it terminates with a new line.
Definition at line 248 of file LinearEnergyAlg.h.
References CalculateClusterEnergy(), and DumpConfiguration().
|
private |
Definition at line 115 of file LinearEnergyAlg.cxx.
References detp, detinfo::DetectorProperties::ElectronLifetime(), and fElectronLifetime.
Referenced by setup().
|
private |
Definition at line 216 of file LinearEnergyAlg.cxx.
References calo::LinearEnergyAlg::ModBoxParameters::A, calo::LinearEnergyAlg::ModBoxParameters::B, detinfo::DetectorProperties::Density(), detp, detinfo::DetectorProperties::Efield(), kWion, and recombModBoxParams.
Referenced by RecombinationCorrection().
|
private |
TODO: make it more flexible.
Definition at line 200 of file LinearEnergyAlg.cxx.
References BirksInverse(), calo::LinearEnergyAlg::ConstantRecombParameters::factor, fRecombModel, kBirks, kConstant, kModBox, ModBoxInverse(), and recombConstParams.
Referenced by CalculateHitEnergy().
|
inline |
Sets up the algorithm.
geometry | the geometry service provider |
Acquires the geometry description. This method must be called every time the geometry is changed.
Definition at line 214 of file LinearEnergyAlg.h.
References detc, detp, DumpConfiguration(), geom, art::detail::indent(), and initialize().
|
private |
Pointer to the detector clock.
Definition at line 339 of file LinearEnergyAlg.h.
Referenced by CalculateHitEnergy(), and setup().
|
private |
Pointer to the detector property.
Definition at line 336 of file LinearEnergyAlg.h.
Referenced by BirksInverse(), initialize(), ModBoxInverse(), and setup().
|
private |
Definition at line 358 of file LinearEnergyAlg.h.
Referenced by CalculateHitEnergy().
|
private |
Definition at line 357 of file LinearEnergyAlg.h.
Referenced by CalculateHitEnergy(), and initialize().
|
private |
Definition at line 342 of file LinearEnergyAlg.h.
Referenced by DumpConfiguration(), LinearEnergyAlg(), and RecombinationCorrection().
|
private |
Definition at line 341 of file LinearEnergyAlg.h.
Referenced by DumpConfiguration(), and LinearEnergyAlg().
|
private |
Pointer to the geometry to be used.
Definition at line 333 of file LinearEnergyAlg.h.
Referenced by CalculateEnergy(), and setup().
|
staticprivate |
constant correction used in the current MicroBooNE shower reconstruction
Definition at line 362 of file LinearEnergyAlg.h.
|
staticprivate |
ionization potenial in LAr, 23.6 eV = 1e, Wion in GeV/e
Definition at line 360 of file LinearEnergyAlg.h.
Referenced by BirksInverse(), CalculateHitEnergy(), and ModBoxInverse().
|
private |
Parameters for recombination Birks model; filled only when this model is selected.
Definition at line 347 of file LinearEnergyAlg.h.
Referenced by BirksInverse(), DumpConfiguration(), and LinearEnergyAlg().
|
private |
Parameters for constant recombination factor; filled only when this model is selected.
Definition at line 349 of file LinearEnergyAlg.h.
Referenced by DumpConfiguration(), LinearEnergyAlg(), and RecombinationCorrection().
|
private |
Parameters for recombination box model; filled only when this model is selected.
Definition at line 345 of file LinearEnergyAlg.h.
Referenced by DumpConfiguration(), LinearEnergyAlg(), and ModBoxInverse().