ISCalculationSeparate.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file ISCalcuationSeparate.cxx
3 /// \brief Interface to algorithm class for calculating ionization electrons
4 /// and scintillation photons using separate algorithms for each
5 ///
6 /// \version $Id: $
7 /// \author brebel@fnal.gov
8 ////////////////////////////////////////////////////////////////////////
9 
11 #include "DetectorInfo/DetectorProperties.h"
14 #include "CoreUtils/ServiceUtil.h"
15 
17 #include "cetlib_except/exception.h"
18 
19 namespace gar {
20  namespace rosim{
21 
22  //----------------------------------------------------------------------------
24  : ISCalculation()
25  {
26  }
27 
28  //----------------------------------------------------------------------------
30  {
31  }
32 
33  //----------------------------------------------------------------------------
35  {
36  const detinfo::DetectorProperties* detprop = gar::providerFrom<detinfo::DetectorPropertiesService>();
37 
38  //double density = detprop->Density(detprop->Temperature());
39  fEfield = detprop->Efield();
41 
42  return;
43  }
44 
45  //----------------------------------------------------------------------------
46  // fNumIonElectrons returns a value that is not corrected for life time effects
48  {
49  fEnergyDeposit = 0.;
50  fNumScintPhotons = 0.;
51  fNumIonElectrons = 0.;
52 
53  return;
54  }
55 
56  //----------------------------------------------------------------------------
57  // fNumIonElectrons returns a value that is not corrected for life time effects
59  {
60  fEnergyDeposit = dep->Energy();
61 
63 
64  MF_LOG_DEBUG("ISCalculationSeparate")
65  << " Electrons produced for " << fEnergyDeposit * 1.e3
66  << " MeV deposited: " << fNumIonElectrons;
67 
68  // Now do the scintillation
69  // TODO: fix this for gaseous argon
71 
72  return;
73  }
74 
75  }// namespace
76 } // gar
double fGeVToElectrons
conversion factor from GArProperties service
float const & Energy() const
Definition: EnergyDeposit.h:42
int fNumScintPhotons
number of scintillation photons for this step
Definition: ISCalculation.h:35
double fEfield
value of electric field from GArProperties service
void CalculateIonizationAndScintillation(const gar::sdp::EnergyDeposit *dep)
constexpr double kGeVToElectrons
26.4 eV per ion pair, 1e9 eV/GeV
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
double fEnergyDeposit
total energy deposited in the step
Definition: ISCalculation.h:33
int fNumIonElectrons
number of ionization electrons for this step
Definition: ISCalculation.h:34
General GArSoft Utilities.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
#define MF_LOG_DEBUG(id)
ISCalculationSeparate(CLHEP::HepRandomEngine &)