All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
detsim::ISCalculationSeparate Class Reference

#include <ISCalculationSeparate.h>

Classes

struct  Data
 

Public Member Functions

 ISCalculationSeparate (fhicl::ParameterSet const &pset)
 
Data CalculateIonizationAndScintillation (detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) const
 
double EFieldAtStep (double efield, sim::SimEnergyDeposit const &edep) const
 

Private Member Functions

double EFieldAtStep (double efield, float x, float y, float z) const
 
double CalculateIonization (detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) const
 
double CalculateScintillation (sim::SimEnergyDeposit const &edep) const
 

Private Attributes

double fRecombA
 
double fRecombk
 
double fModBoxA
 
double fModBoxB
 
bool fUseModBoxRecomb
 
double fGeVToElectrons
 from LArG4Parameters service More...
 
const detinfo::LArPropertiesfLArProp
 
const spacecharge::SpaceChargefSCE
 

Detailed Description

Definition at line 33 of file ElectronDrift/ISCalculationSeparate.h.

Constructor & Destructor Documentation

detsim::ISCalculationSeparate::ISCalculationSeparate ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 37 of file ISCalculationSeparate.cc.

38  : fRecombA{pset.get<double>("RecombA")}
39  , fRecombk{pset.get<double>("Recombk")}
40  , fModBoxA{pset.get<double>("ModBoxA")}
41  , fModBoxB{pset.get<double>("ModBoxB")}
42  , fUseModBoxRecomb{pset.get<bool>("UseModBoxRecomb")}
43  , fGeVToElectrons{pset.get<double>("GeVToElectrons")}
44  {
45  fLArProp = lar::providerFrom<detinfo::LArPropertiesService>();
46  fSCE = lar::providerFrom<spacecharge::SpaceChargeService>();
47 
48  // the recombination coefficient is in g/(MeVcm^2), but
49  // we report energy depositions in MeV/cm, need to divide
50  // Recombk from the LArG4Parameters service by the density
51  // of the argon we got above. FIXME: is this being done?
52 
53  std::cout << "fLArG4Prop->GeVToElectrons(): " << fGeVToElectrons << std::endl;
54  }
double fGeVToElectrons
from LArG4Parameters service
BEGIN_PROLOG could also be cout

Member Function Documentation

double detsim::ISCalculationSeparate::CalculateIonization ( detinfo::DetectorPropertiesData const &  detProp,
sim::SimEnergyDeposit const &  edep 
) const
private

Definition at line 59 of file ISCalculationSeparate.cc.

61  {
62  float e = edep.Energy();
63  float ds = edep.StepLength();
64  float x = edep.MidPointX();
65  float y = edep.MidPointY();
66  float z = edep.MidPointZ();
67  double recomb = 0.;
68  double dEdx = (ds <= 0.0) ? 0.0 : e / ds;
69  double EFieldStep = EFieldAtStep(detProp.Efield(), x, y, z);
70 
71  // Guard against spurious values of dE/dx. Note: assumes density of LAr
72  if (dEdx < 1.) dEdx = 1.;
73 
74  if (fUseModBoxRecomb) {
75  if (ds > 0) {
76  double Xi = fModBoxB * dEdx / EFieldStep;
77  recomb = log(fModBoxA + Xi) / Xi;
78  }
79  else
80  recomb = 0;
81  }
82  else {
83  recomb = fRecombA / (1. + dEdx * fRecombk / EFieldStep);
84  }
85 
86  // 1.e-3 converts fEnergyDeposit to GeV
87  double const numIonElectrons = fGeVToElectrons * 1.e-3 * e * recomb;
88 
89  MF_LOG_DEBUG("ISCalculationSeparate")
90  << " Electrons produced for " << edep.Energy() << " MeV deposited with " << recomb
91  << " recombination: " << numIonElectrons << std::endl;
92 
93  return numIonElectrons;
94  }
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
double fGeVToElectrons
from LArG4Parameters service
process_name opflash particleana ie ie y
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep) const
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
do i e
auto const detProp
ISCalculationSeparate::Data detsim::ISCalculationSeparate::CalculateIonizationAndScintillation ( detinfo::DetectorPropertiesData const &  detProp,
sim::SimEnergyDeposit const &  edep 
) const

Definition at line 130 of file ISCalculationSeparate.cc.

133  {
134  return {edep.Energy(), CalculateIonization(detProp, edep), CalculateScintillation(edep)};
135  }
double CalculateIonization(detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) const
auto const detProp
double CalculateScintillation(sim::SimEnergyDeposit const &edep) const
double detsim::ISCalculationSeparate::CalculateScintillation ( sim::SimEnergyDeposit const &  edep) const
private

Definition at line 98 of file ISCalculationSeparate.cc.

99  {
100  float const e = edep.Energy();
101  int const pdg = edep.PdgCode();
102  double scintYield = fLArProp->ScintYield(true);
103  if (fLArProp->ScintByParticleType()) {
104 
105  MF_LOG_DEBUG("ISCalculationSeparate") << "scintillating by particle type";
106 
107  switch (pdg) {
108 
109  case 2212: scintYield = fLArProp->ProtonScintYield(true); break;
110  case 13:
111  case -13: scintYield = fLArProp->MuonScintYield(true); break;
112  case 211:
113  case -211: scintYield = fLArProp->PionScintYield(true); break;
114  case 321:
115  case -321: scintYield = fLArProp->KaonScintYield(true); break;
116  case 1000020040: scintYield = fLArProp->AlphaScintYield(true); break;
117  case 11:
118  case -11:
119  case 22: scintYield = fLArProp->ElectronScintYield(true); break;
120  default: scintYield = fLArProp->ElectronScintYield(true);
121  }
122 
123  return scintYield * e;
124  }
125 
126  return scint_yield_factor * scintYield * e;
127  }
var pdg
Definition: selectors.fcl:14
virtual double KaonScintYield(bool prescale=false) const =0
virtual double ElectronScintYield(bool prescale=false) const =0
virtual double PionScintYield(bool prescale=false) const =0
virtual double ProtonScintYield(bool prescale=false) const =0
do i e
virtual double ScintYield(bool prescale=false) const =0
virtual double MuonScintYield(bool prescale=false) const =0
virtual bool ScintByParticleType() const =0
virtual double AlphaScintYield(bool prescale=false) const =0
double detsim::ISCalculationSeparate::EFieldAtStep ( double  efield,
sim::SimEnergyDeposit const &  edep 
) const

Definition at line 138 of file ISCalculationSeparate.cc.

139  {
140  return EFieldAtStep(efield, edep.MidPointX(), edep.MidPointY(), edep.MidPointZ());
141  }
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep) const
double detsim::ISCalculationSeparate::EFieldAtStep ( double  efield,
float  x,
float  y,
float  z 
) const
private

Definition at line 144 of file ISCalculationSeparate.cc.

148  {
149  if (not fSCE->EnableSimEfieldSCE()) { return efield; }
150 
151  auto const offsets = fSCE->GetEfieldOffsets(geo::Point_t{x, y, z});
152  return std::hypot(efield + efield * offsets.X(), efield * offsets.Y(), efield * offsets.Z());
153  }
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
virtual bool EnableSimEfieldSCE() const =0

Member Data Documentation

double detsim::ISCalculationSeparate::fGeVToElectrons
private

from LArG4Parameters service

Definition at line 53 of file ElectronDrift/ISCalculationSeparate.h.

const detinfo::LArProperties* detsim::ISCalculationSeparate::fLArProp
private

Definition at line 57 of file ElectronDrift/ISCalculationSeparate.h.

double detsim::ISCalculationSeparate::fModBoxA
private

Definition at line 50 of file ElectronDrift/ISCalculationSeparate.h.

double detsim::ISCalculationSeparate::fModBoxB
private

Definition at line 51 of file ElectronDrift/ISCalculationSeparate.h.

double detsim::ISCalculationSeparate::fRecombA
private

Definition at line 48 of file ElectronDrift/ISCalculationSeparate.h.

double detsim::ISCalculationSeparate::fRecombk
private

Definition at line 49 of file ElectronDrift/ISCalculationSeparate.h.

const spacecharge::SpaceCharge* detsim::ISCalculationSeparate::fSCE
private

Definition at line 58 of file ElectronDrift/ISCalculationSeparate.h.

bool detsim::ISCalculationSeparate::fUseModBoxRecomb
private

Definition at line 52 of file ElectronDrift/ISCalculationSeparate.h.


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