LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ShowerCalo.cxx
Go to the documentation of this file.
1 #include "ShowerCalo.h"
2 
3 #include "TString.h"
5 #include <string>
6 
7 namespace showerreco {
8 
9  std::pair<double, double> ShowerCalo::ShowerEnergy(double energy,
11  bool mc)
12  {
13  double result = -1;
14  double result_err = -1;
15 
16  switch (type) {
17 
19 
20  if (!mc) throw ShowerRecoException(Form("DATA correction not yet supported!"));
21 
22  result = ::showerreco::energy::DEFAULT_ECorr * energy + 10;
23  result_err = ::showerreco::energy::DEFAULT_ECorrError * result;
24  break;
25 
26  default: throw ShowerRecoException(Form("RecoType_t: %d not supported!", type));
27  }
28 
29  return std::make_pair(result, result_err);
30  }
31 
32 }
static const double DEFAULT_ECorr
Definition: ShowerCalo.h:26
std::pair< double, double > ShowerEnergy(double energy,::showerreco::energy::RecoType_t type=energy::kDEFAULT, bool mc=true)
Definition: ShowerCalo.cxx:9
double energy
Definition: plottest35.C:25
static const double DEFAULT_ECorrError
Definition: ShowerCalo.h:27
Class def header for a class ShowerCalo.
Class def header for exception classes in ShowerReco3D package.