9 #ifndef LARRECO_CALORIMETRY_LINEARENERGYALG_H 10 #define LARRECO_CALORIMETRY_LINEARENERGYALG_H 34 #include <type_traits> 122 Comment(
"Parameter \"A\" of box model."),
129 Comment(
"Parameter \"B\" of box model [kV/cm*(g/cm^2)/MeV]."),
136 Comment(
"Recombination parameter \"A\" of Birks model."),
143 Comment(
"Recombination parameter \"k\" of Birks model [kV/cm*(g/cm^2)/MeV]."),
150 Comment(
"Constant recombination factor for \"constant\" model."),
165 Comment(
"Whether to use the area of hit to count the deposited charges.")
169 Name(
"Recombination"),
170 Comment(
"Parameters of the recombination model")
232 template <
typename Stream>
247 template <
typename Stream>
271 template <
typename BeginHitIter,
typename EndHitIter>
288 template <
typename Hits>
360 static constexpr
double kWion = 23.6e-9;
391 template <
typename BeginHitIter,
typename EndHitIter>
398 "The hits must be stored as recob::Hit pointers!" 403 for (
auto hitIter = beginHit; hitIter != endHit; ++hitIter) {
415 template <
typename Stream>
420 out << firstIndent <<
"LinearEnergyAlg configuration:" 421 <<
"\n" << indent <<
" use hit " << (
fUseArea?
"area":
"peak amplitude")
422 <<
" for charge estimation" 423 <<
"\n" << indent <<
" recombination model: ";
453 #endif // LARRECO_CALORIMETRY_LINEARENERGYALG_H
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Calibrates the energy of the clusters.
static const std::string Constant
geo::GeometryCore const * geom
Pointer to the geometry to be used.
LinearEnergyAlg(fhicl::ParameterSet const &pset)
Constructor with configuration validation.
std::function< bool()> use_if(T *p, NullaryConfigPredicate_t< T > f)
Declaration of signal hit object.
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.
double RecombinationCorrection(double dEdx) const
TODO: make it more flexible.
Set of hits with a 2D structure.
Cluster finding and building.
pure virtual base interface for detector clocks
double BirksInverse(double dEdx) const
Access the description of detector geometry.
static const std::string Birks
double dEdx(float dqdx, float Efield)
void setup(detinfo::DetectorProperties const &detproperty, detinfo::DetectorClocks const &detclock, geo::GeometryCore const &geometry)
Sets up the algorithm.
static constexpr double kRecombFactor
constant correction used in the current MicroBooNE shower reconstruction
constexpr double kModBoxB
Modified Box Beta in g/(MeV cm²)*kV/cm.
double CalculateClusterEnergy(recob::Cluster const &cluster, BeginHitIter beginHit, EndHitIter endHit) const
Calculates the energy of a single cluster.
double ModBoxInverse(double dEdx) const
detinfo::DetectorClocks const * detc
Pointer to the detector clock.
static constexpr double kWion
ionization potenial in LAr, 23.6 eV = 1e, Wion in GeV/e
void DumpConfiguration(Stream &&out, std::string indent="") const
Prints the current algorithm configuration.
Description of geometry of one entire detector.
Declaration of cluster object.
ModBoxParameters recombModBoxParams
Parameters for recombination box model; filled only when this model is selected.
detinfo::DetectorProperties const * detp
Pointer to the detector property.
Detector simulation of raw signals on wires.
Conversion of times between different formats and references.
bool modelIsConstant() const
void DumpConfiguration(Stream &&out, std::string indent, std::string firstIndent) const
Prints the current algorithm configuration.
art::PtrVector< recob::Hit > Hits
ConstantRecombParameters recombConstParams
Parameters for constant recombination factor; filled only when this model is selected.
bool modelIsBirks() const
const GenericPointer< typename T::ValueType > T2 value
LinearEnergyAlg(Config const &config)
Constructor with configuration validation.
constexpr double kRecombk
BirksParameters recombBirksParams
Parameters for recombination Birks model; filled only when this model is selected.
Configuration of parameters of the box model.
static const std::string ModBox
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
2D representation of charge deposited in the TDC/wire plane
constexpr double kRecombA
A constant.
constexpr double kModBoxA
Modified Box Alpha.
Collection of Physical constants used in LArSoft.
bool modelIsModBox() const
double CalculateHitEnergy(recob::Hit const &hit) const
Returns the corrected energy from the hit.