LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
larg4::ISCalcCorrelated Class Reference

#include "ISCalcCorrelated.h"

Inheritance diagram for larg4::ISCalcCorrelated:
larg4::ISCalc

Public Member Functions

 ISCalcCorrelated (detinfo::DetectorPropertiesData const &detProp, CLHEP::HepRandomEngine &Engine)
 
double EFieldAtStep (double efield, sim::SimEnergyDeposit const &edep) override
 
double AngleToEFieldAtStep (double efield, sim::SimEnergyDeposit const &edep)
 
ISCalcData CalcIonAndScint (detinfo::DetectorPropertiesData const &detProp, sim::SimEnergyDeposit const &edep) override
 
double GetScintYield (sim::SimEnergyDeposit const &edep, bool prescale)
 
double GetScintYieldRatio (sim::SimEnergyDeposit const &edep)
 

Private Member Functions

double EscapingEFraction (double const dEdx) const
 
double FieldCorrection (double const EF, double const dEdx) const
 

Private Attributes

ISTPC fISTPC
 
const spacecharge::SpaceChargefSCE
 
CLHEP::RandBinomial fBinomialGen
 
double fGeVToElectrons
 from LArG4Parameters service More...
 
double fWion
 W_ion (23.6 eV) == 1/fGeVToElectrons. More...
 
double fWph
 from LArG4Parameters service More...
 
double fScintPreScale
 scintillation pre-scaling factor from LArProperties service More...
 
double fRecombA
 from LArG4Parameters service More...
 
double fRecombk
 from LArG4Parameters service More...
 
double fModBoxA
 from LArG4Parameters service More...
 
double fModBoxB
 from LArG4Parameters service More...
 
double fEllipsModBoxA
 from LArG4Parameters service More...
 
double fEllipsModBoxB
 from LArG4Parameters service More...
 
double fEllipsModBoxR
 from LArG4Parameters service More...
 
double fLarqlChi0A
 from LArG4Parameters service More...
 
double fLarqlChi0B
 from LArG4Parameters service More...
 
double fLarqlChi0C
 from LArG4Parameters service More...
 
double fLarqlChi0D
 from LArG4Parameters service More...
 
double fLarqlAlpha
 from LArG4Parameters service More...
 
double fLarqlBeta
 from LArG4Parameters service More...
 
double fQAlpha
 from LArG4Parameters service More...
 
bool fUseModBoxRecomb
 from LArG4Parameters service More...
 
bool fUseEllipsModBoxRecomb
 from LArG4Parameters service More...
 
bool fUseModLarqlRecomb
 from LArG4Parameters service More...
 
bool fUseBinomialFlucts
 from LArG4Parameters service More...
 

Detailed Description

Definition at line 33 of file ISCalcCorrelated.h.

Constructor & Destructor Documentation

larg4::ISCalcCorrelated::ISCalcCorrelated ( detinfo::DetectorPropertiesData const &  detProp,
CLHEP::HepRandomEngine &  Engine 
)

Definition at line 34 of file ISCalcCorrelated.cxx.

References e, sim::LArG4Parameters::EllipsModBoxA(), sim::LArG4Parameters::EllipsModBoxB(), sim::LArG4Parameters::EllipsModBoxR(), fBinomialGen, fEllipsModBoxA, fEllipsModBoxB, fEllipsModBoxR, fGeVToElectrons, fLarqlAlpha, fLarqlBeta, fLarqlChi0A, fLarqlChi0B, fLarqlChi0C, fLarqlChi0D, fModBoxA, fModBoxB, fQAlpha, fRecombA, fRecombk, fSCE, fScintPreScale, fUseBinomialFlucts, fUseEllipsModBoxRecomb, fUseModBoxRecomb, fUseModLarqlRecomb, fWion, fWph, sim::LArG4Parameters::GeVToElectrons(), sim::LArG4Parameters::LarqlAlpha(), sim::LArG4Parameters::LarqlBeta(), sim::LArG4Parameters::LarqlChi0A(), sim::LArG4Parameters::LarqlChi0B(), sim::LArG4Parameters::LarqlChi0C(), sim::LArG4Parameters::LarqlChi0D(), MF_LOG_INFO, sim::LArG4Parameters::ModBoxA(), sim::LArG4Parameters::ModBoxB(), sim::LArG4Parameters::QAlpha(), sim::LArG4Parameters::RecombA(), sim::LArG4Parameters::Recombk(), sim::LArG4Parameters::UseBinomialFlucts(), sim::LArG4Parameters::UseEllipsModBoxRecomb(), sim::LArG4Parameters::UseModBoxRecomb(), sim::LArG4Parameters::UseModLarqlRecomb(), and sim::LArG4Parameters::Wph().

36  : fISTPC{*(lar::providerFrom<geo::Geometry>())}
37  , fSCE(lar::providerFrom<spacecharge::SpaceChargeService>())
38  , fBinomialGen{CLHEP::RandBinomial(Engine)}
39  {
40  MF_LOG_INFO("ISCalcCorrelated") << "IonizationAndScintillation/ISCalcCorrelated Initialize.";
41 
42  fScintPreScale = lar::providerFrom<detinfo::LArPropertiesService>()->ScintPreScale();
43 
45 
46  // The recombination coefficient is in g/(MeVcm^2), but we report
47  // energy depositions in MeV/cm, need to divide Recombk from the
48  // LArG4Parameters service by the density of the argon we got
49  // above.
50  fRecombA = LArG4PropHandle->RecombA();
51  fRecombk = LArG4PropHandle->Recombk() / detProp.Density(detProp.Temperature());
52  fModBoxA = LArG4PropHandle->ModBoxA();
53  fModBoxB = LArG4PropHandle->ModBoxB() / detProp.Density(detProp.Temperature());
54  fEllipsModBoxA = LArG4PropHandle->EllipsModBoxA();
55  fEllipsModBoxB = LArG4PropHandle->EllipsModBoxB() / detProp.Density(detProp.Temperature());
56  fEllipsModBoxR = LArG4PropHandle->EllipsModBoxR();
57  fUseModBoxRecomb = (bool)LArG4PropHandle->UseModBoxRecomb();
58  fUseEllipsModBoxRecomb = (bool)LArG4PropHandle->UseEllipsModBoxRecomb();
59  fUseModLarqlRecomb = (bool)LArG4PropHandle->UseModLarqlRecomb();
60  fUseBinomialFlucts = (bool)LArG4PropHandle->UseBinomialFlucts();
61  fLarqlChi0A = LArG4PropHandle->LarqlChi0A();
62  fLarqlChi0B = LArG4PropHandle->LarqlChi0B();
63  fLarqlChi0C = LArG4PropHandle->LarqlChi0C();
64  fLarqlChi0D = LArG4PropHandle->LarqlChi0D();
65  fLarqlAlpha = LArG4PropHandle->LarqlAlpha();
66  fLarqlBeta = LArG4PropHandle->LarqlBeta();
67  fQAlpha = LArG4PropHandle->QAlpha();
68  fGeVToElectrons = LArG4PropHandle->GeVToElectrons();
69 
70  // ionization work function
71  fWion = 1. / fGeVToElectrons * 1e3; // MeV
72 
73  // ion+excitation work function
74  fWph = LArG4PropHandle->Wph() * 1e-6; // MeV
75  }
double fModBoxA
from LArG4Parameters service
double ModBoxA() const
double fRecombk
from LArG4Parameters service
double fEllipsModBoxA
from LArG4Parameters service
double fWion
W_ion (23.6 eV) == 1/fGeVToElectrons.
CLHEP::RandBinomial fBinomialGen
double fGeVToElectrons
from LArG4Parameters service
double LarqlChi0B() const
double fModBoxB
from LArG4Parameters service
double fQAlpha
from LArG4Parameters service
double fEllipsModBoxR
from LArG4Parameters service
bool fUseModLarqlRecomb
from LArG4Parameters service
double LarqlBeta() const
double LarqlAlpha() const
bool UseModBoxRecomb() const
double LarqlChi0D() const
double fEllipsModBoxB
from LArG4Parameters service
double EllipsModBoxA() const
bool UseBinomialFlucts() const
double QAlpha() const
double EllipsModBoxR() const
double fScintPreScale
scintillation pre-scaling factor from LArProperties service
double LarqlChi0C() const
double fWph
from LArG4Parameters service
bool fUseBinomialFlucts
from LArG4Parameters service
bool UseModLarqlRecomb() const
double fLarqlChi0B
from LArG4Parameters service
double Wph() const
bool fUseEllipsModBoxRecomb
from LArG4Parameters service
double fLarqlChi0D
from LArG4Parameters service
bool fUseModBoxRecomb
from LArG4Parameters service
double RecombA() const
double fLarqlChi0C
from LArG4Parameters service
double LarqlChi0A() const
#define MF_LOG_INFO(category)
double fLarqlChi0A
from LArG4Parameters service
double EllipsModBoxB() const
double ModBoxB() const
double Recombk() const
bool UseEllipsModBoxRecomb() const
double fLarqlBeta
from LArG4Parameters service
double fLarqlAlpha
from LArG4Parameters service
const spacecharge::SpaceCharge * fSCE
Float_t e
Definition: plot.C:35
double fRecombA
from LArG4Parameters service
double GeVToElectrons() const

Member Function Documentation

double larg4::ISCalcCorrelated::AngleToEFieldAtStep ( double  efield,
sim::SimEnergyDeposit const &  edep 
)

Definition at line 219 of file ISCalcCorrelated.cxx.

References util::abs(), geo::TPCGeo::DriftAxisWithSign(), spacecharge::SpaceCharge::EnableSimEfieldSCE(), sim::SimEnergyDeposit::End(), fISTPC, fSCE, spacecharge::SpaceCharge::GetEfieldOffsets(), larg4::ISTPC::isScintInActiveVolume(), sim::SimEnergyDeposit::MidPoint(), geo::Negative, geo::GeometryCore::PositionToTPCID(), pmtana::sign(), sim::SimEnergyDeposit::Start(), geo::to_int(), geo::GeometryCore::TPC(), geo::X, geo::Y, and geo::Z.

Referenced by CalcIonAndScint().

220  {
221 
222  // electric field outside active volume set to zero
223  if (!fISTPC.isScintInActiveVolume(edep.MidPoint())) return 0.;
224 
225  geo::Vector_t stepvec = edep.Start() - edep.End();
226  geo::Vector_t elecvec{};
227 
229  geo::TPCID tpcid = fGeometry->PositionToTPCID(edep.MidPoint());
230  if (!bool(tpcid)) return 0.;
231  const geo::TPCGeo& tpcGeo = fGeometry->TPC(tpcid);
232 
233  using geo::to_int;
234  auto const [axis, sign] = tpcGeo.DriftAxisWithSign();
235  switch (axis) {
236  case geo::Coordinate::X: {
237  elecvec.SetX(to_int(sign));
238  break;
239  }
240  case geo::Coordinate::Y: {
241  elecvec.SetY(to_int(sign));
242  break;
243  }
244  case geo::Coordinate::Z: {
245  elecvec.SetZ(to_int(sign));
246  }
247  }
248 
249  elecvec *= efield;
250 
251  // electric field inside active volume
252  if (fSCE->EnableSimEfieldSCE()) {
253  auto const eFieldOffsets = fSCE->GetEfieldOffsets(edep.MidPoint());
254  geo::Vector_t scevec = eFieldOffsets * efield;
256  switch (axis) {
257  case geo::Coordinate::X: {
258  scevec.SetX(scevec.X() * -1.);
259  break;
260  }
261  case geo::Coordinate::Y: {
262  scevec.SetY(scevec.Y() * -1.);
263  break;
264  }
265  case geo::Coordinate::Z: {
266  scevec.SetZ(scevec.Z() * -1.);
267  }
268  }
269  }
270  elecvec += scevec;
271  }
272 
273  double angle = std::acos(stepvec.Dot(elecvec) / (stepvec.R() * elecvec.R()));
274 
275  if (angle > TMath::PiOver2()) { angle = abs(TMath::Pi() - angle); }
276 
277  return angle;
278  }
virtual bool EnableSimEfieldSCE() const =0
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
Geometry information for a single TPC.
Definition: TPCGeo.h:33
constexpr auto abs(T v)
Returns the absolute value of the argument.
DriftAxis DriftAxisWithSign() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.h:78
Drift towards negative values.
constexpr int to_int(Coordinate const coord) noexcept
Enumerate the possible plane projections.
Definition: geo_types.h:124
The data type to uniquely identify a TPC.
Definition: geo_types.h:306
Double_t edep
Definition: macro.C:13
int sign(double val)
Definition: UtilFunc.cxx:104
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
TPCGeo const & TPC(TPCID const &tpcid=details::tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:448
const spacecharge::SpaceCharge * fSCE
bool isScintInActiveVolume(geo::Point_t const &ScintPoint)
Definition: ISTPC.cxx:37
TPCID PositionToTPCID(Point_t const &point) const
Returns the ID of the TPC at specified location.
ISCalcData larg4::ISCalcCorrelated::CalcIonAndScint ( detinfo::DetectorPropertiesData const &  detProp,
sim::SimEnergyDeposit const &  edep 
)
overridevirtual

Implements larg4::ISCalc.

Definition at line 78 of file ISCalcCorrelated.cxx.

References AngleToEFieldAtStep(), tca::dEdx(), edep, detinfo::DetectorPropertiesData::Efield(), EFieldAtStep(), sim::SimEnergyDeposit::Energy(), EscapingEFraction(), fBinomialGen, fEllipsModBoxA, fEllipsModBoxB, fEllipsModBoxR, FieldCorrection(), fModBoxA, fModBoxB, fQAlpha, fRecombA, fRecombk, fScintPreScale, fUseBinomialFlucts, fUseEllipsModBoxRecomb, fUseModBoxRecomb, fUseModLarqlRecomb, fWion, fWph, larg4::ISCalc::GetScintYieldRatio(), MF_LOG_DEBUG, sim::SimEnergyDeposit::PdgCode(), and sim::SimEnergyDeposit::StepLength().

80  {
81 
82  double const energy_deposit = edep.Energy();
83 
84  // calculate total quanta (ions + excitons)
85  double num_ions = 0.0; //check if the deposited energy is above ionization threshold
86  if (energy_deposit >= fWion) num_ions = energy_deposit / fWion;
87  double num_quanta = energy_deposit / fWph;
88 
89  double ds = edep.StepLength();
90  double dEdx = (ds <= 0.0) ? 0.0 : energy_deposit / ds;
91  dEdx = (dEdx < 1.) ? 1. : dEdx;
92  double EFieldStep = EFieldAtStep(detProp.Efield(), edep);
93  double recomb = 0., num_electrons = 0.;
94 
95  //calculate recombination survival fraction value inside, otherwise zero
96  if (EFieldStep > 0.) {
97  // calculate recombination survival fraction
98  // ...using Modified Box model
99  if (fUseModBoxRecomb) {
100  double Xi = fModBoxB * dEdx / EFieldStep;
101  recomb = std::log(fModBoxA + Xi) / Xi;
102  }
103  else if (fUseEllipsModBoxRecomb) {
104 
105  double phi = AngleToEFieldAtStep(detProp.Efield(), edep);
106 
107  if (std::isnan(phi)) {
108  double Xi = fModBoxB * dEdx / EFieldStep;
109  recomb = std::log(fModBoxA + Xi) / Xi;
110  }
111  else {
112  double B_ellips =
113  fEllipsModBoxB * dEdx /
114  (EFieldStep * std::hypot(std::sin(phi), std::cos(phi) / fEllipsModBoxR));
115 
116  recomb = std::log(fEllipsModBoxA + B_ellips) / B_ellips;
117  }
118  }
119  // ... or using Birks/Doke
120  else {
121  recomb = fRecombA / (1. + dEdx * fRecombk / EFieldStep);
122  }
123  }
124 
125  if (fUseModLarqlRecomb &&
126  edep.PdgCode() != 1000020040) { //Use corrections from LArQL model (except for alpha)
127  recomb += EscapingEFraction(dEdx) * FieldCorrection(EFieldStep, dEdx); //Correction for low EF
128  }
129 
130  // Guard against unphysical recombination values
131  if (recomb < 0.) {
132  mf::LogWarning("ISCalcCorrelated")
133  << "Recombination survival fraction is lower than 0.: " << recomb << ", fixing it to 0.";
134  recomb = 0.;
135  }
136  else if (recomb > 1.) {
137  mf::LogWarning("ISCalcCorrelated")
138  << "Recombination survival fraction is higher than 1.: " << recomb << ", fixing it to 1.";
139  recomb = 1.;
140  }
141 
142  // using this recombination, calculate number energy_deposit of ionization electrons
143  if (num_ions > 0.)
144  num_electrons =
145  (fUseBinomialFlucts) ? fBinomialGen.fire(num_ions, recomb) : (num_ions * recomb);
146 
147  // calculate scintillation photons
148  double num_photons = (num_quanta - num_electrons) * fScintPreScale;
149 
150  if (edep.PdgCode() == 1000020040) {
151  num_electrons = num_electrons * fQAlpha;
152  num_photons = num_photons * fQAlpha;
153  }
154 
155  MF_LOG_DEBUG("ISCalcCorrelated")
156  << "With " << energy_deposit << " MeV of deposited energy, "
157  << "and a recombination of " << recomb << ", \nthere are " << num_electrons
158  << " electrons, and " << num_photons << " photons.";
159 
160  return {energy_deposit, num_electrons, num_photons, GetScintYieldRatio(edep)};
161  }
double FieldCorrection(double const EF, double const dEdx) const
double EscapingEFraction(double const dEdx) const
double fModBoxA
from LArG4Parameters service
double fRecombk
from LArG4Parameters service
double fEllipsModBoxA
from LArG4Parameters service
double fWion
W_ion (23.6 eV) == 1/fGeVToElectrons.
CLHEP::RandBinomial fBinomialGen
double fModBoxB
from LArG4Parameters service
double fQAlpha
from LArG4Parameters service
double fEllipsModBoxR
from LArG4Parameters service
bool fUseModLarqlRecomb
from LArG4Parameters service
double AngleToEFieldAtStep(double efield, sim::SimEnergyDeposit const &edep)
double fEllipsModBoxB
from LArG4Parameters service
double fScintPreScale
scintillation pre-scaling factor from LArProperties service
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep) override
double fWph
from LArG4Parameters service
bool fUseBinomialFlucts
from LArG4Parameters service
bool fUseEllipsModBoxRecomb
from LArG4Parameters service
bool fUseModBoxRecomb
from LArG4Parameters service
Double_t edep
Definition: macro.C:13
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2671
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
#define MF_LOG_DEBUG(id)
double fRecombA
from LArG4Parameters service
double GetScintYieldRatio(sim::SimEnergyDeposit const &edep)
Definition: ISCalc.cxx:41
double larg4::ISCalcCorrelated::EFieldAtStep ( double  efield,
sim::SimEnergyDeposit const &  edep 
)
overridevirtual

Implements larg4::ISCalc.

Definition at line 164 of file ISCalcCorrelated.cxx.

References geo::TPCGeo::DriftAxisWithSign(), spacecharge::SpaceCharge::EnableSimEfieldSCE(), fISTPC, fSCE, spacecharge::SpaceCharge::GetEfieldOffsets(), larg4::ISTPC::isScintInActiveVolume(), sim::SimEnergyDeposit::MidPoint(), geo::Negative, geo::GeometryCore::PositionToTPCID(), pmtana::sign(), geo::to_int(), geo::GeometryCore::TPC(), geo::X, geo::Y, and geo::Z.

Referenced by CalcIonAndScint().

165  {
166  // electric field outside active volume set to zero
167  if (!fISTPC.isScintInActiveVolume(edep.MidPoint())) return 0.;
168 
169  geo::Vector_t elecvec{};
170 
172  geo::TPCID tpcid = fGeometry->PositionToTPCID(edep.MidPoint());
173  if (!bool(tpcid)) return 0.;
174  const geo::TPCGeo& tpcGeo = fGeometry->TPC(tpcid);
175 
176  using geo::to_int;
177  auto const [axis, sign] = tpcGeo.DriftAxisWithSign();
178  switch (axis) {
179  case geo::Coordinate::X: {
180  elecvec.SetX(to_int(sign));
181  break;
182  }
183  case geo::Coordinate::Y: {
184  elecvec.SetY(to_int(sign));
185  break;
186  }
187  case geo::Coordinate::Z: {
188  elecvec.SetZ(to_int(sign));
189  }
190  }
191 
192  elecvec *= efield;
193 
194  // electric field inside active volume
195  if (fSCE->EnableSimEfieldSCE()) {
196  auto const eFieldOffsets = fSCE->GetEfieldOffsets(edep.MidPoint());
197  geo::Vector_t scevec = eFieldOffsets * efield;
199  switch (axis) {
200  case geo::Coordinate::X: {
201  scevec.SetX(scevec.X() * -1.);
202  break;
203  }
204  case geo::Coordinate::Y: {
205  scevec.SetY(scevec.Y() * -1.);
206  break;
207  }
208  case geo::Coordinate::Z: {
209  scevec.SetZ(scevec.Z() * -1.);
210  }
211  }
212  }
213  elecvec += scevec;
214  }
215 
216  return elecvec.R();
217  }
virtual bool EnableSimEfieldSCE() const =0
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
Geometry information for a single TPC.
Definition: TPCGeo.h:33
DriftAxis DriftAxisWithSign() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.h:78
Drift towards negative values.
constexpr int to_int(Coordinate const coord) noexcept
Enumerate the possible plane projections.
Definition: geo_types.h:124
The data type to uniquely identify a TPC.
Definition: geo_types.h:306
Double_t edep
Definition: macro.C:13
int sign(double val)
Definition: UtilFunc.cxx:104
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
TPCGeo const & TPC(TPCID const &tpcid=details::tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:448
const spacecharge::SpaceCharge * fSCE
bool isScintInActiveVolume(geo::Point_t const &ScintPoint)
Definition: ISTPC.cxx:37
TPCID PositionToTPCID(Point_t const &point) const
Returns the ID of the TPC at specified location.
double larg4::ISCalcCorrelated::EscapingEFraction ( double const  dEdx) const
private

Definition at line 282 of file ISCalcCorrelated.cxx.

References fLarqlChi0A, fLarqlChi0B, fLarqlChi0C, and fLarqlChi0D.

Referenced by CalcIonAndScint().

283  {
284  return fLarqlChi0A / (fLarqlChi0B + std::exp(fLarqlChi0C + fLarqlChi0D * dEdx));
285  }
double fLarqlChi0B
from LArG4Parameters service
double fLarqlChi0D
from LArG4Parameters service
double fLarqlChi0C
from LArG4Parameters service
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2671
double fLarqlChi0A
from LArG4Parameters service
double larg4::ISCalcCorrelated::FieldCorrection ( double const  EF,
double const  dEdx 
) const
private

Definition at line 289 of file ISCalcCorrelated.cxx.

References fLarqlAlpha, and fLarqlBeta.

Referenced by CalcIonAndScint().

290  {
291  return std::exp(-EF / (fLarqlAlpha * std::log(dEdx) + fLarqlBeta));
292  }
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2671
double fLarqlBeta
from LArG4Parameters service
double fLarqlAlpha
from LArG4Parameters service
double larg4::ISCalc::GetScintYield ( sim::SimEnergyDeposit const &  edep,
bool  prescale 
)
inherited

Definition at line 21 of file ISCalc.cxx.

References detinfo::LArProperties::AlphaScintYield(), detinfo::LArProperties::ElectronScintYield(), larg4::ISCalc::fLArProp, detinfo::LArProperties::KaonScintYield(), detinfo::LArProperties::MuonScintYield(), sim::SimEnergyDeposit::PdgCode(), detinfo::LArProperties::PionScintYield(), detinfo::LArProperties::ProtonScintYield(), detinfo::LArProperties::ScintByParticleType(), and detinfo::LArProperties::ScintYield().

Referenced by larg4::ISCalcSeparate::CalcScint().

22  {
23  if (!fLArProp->ScintByParticleType()) return fLArProp->ScintYield(true);
24  switch (edep.PdgCode()) {
25  case 2212: return fLArProp->ProtonScintYield(true);
26  case 13:
27  case -13: return fLArProp->MuonScintYield(true);
28  case 211:
29  case -211: return fLArProp->PionScintYield(true);
30  case 321:
31  case -321: return fLArProp->KaonScintYield(true);
32  case 1000020040: return fLArProp->AlphaScintYield(true);
33  case 11:
34  case -11:
35  case 22: return fLArProp->ElectronScintYield(true);
36  default: return fLArProp->ElectronScintYield(true);
37  }
38  }
virtual double AlphaScintYield(bool prescale=false) const =0
virtual double ProtonScintYield(bool prescale=false) const =0
const detinfo::LArProperties * fLArProp
Definition: ISCalc.h:33
virtual double ElectronScintYield(bool prescale=false) const =0
virtual double PionScintYield(bool prescale=false) const =0
Double_t edep
Definition: macro.C:13
virtual double MuonScintYield(bool prescale=false) const =0
virtual double KaonScintYield(bool prescale=false) const =0
virtual double ScintYield(bool prescale=false) const =0
virtual bool ScintByParticleType() const =0
double larg4::ISCalc::GetScintYieldRatio ( sim::SimEnergyDeposit const &  edep)
inherited

Definition at line 41 of file ISCalc.cxx.

References detinfo::LArProperties::AlphaScintYieldRatio(), detinfo::LArProperties::ElectronScintYieldRatio(), larg4::ISCalc::fLArProp, detinfo::LArProperties::KaonScintYieldRatio(), detinfo::LArProperties::MuonScintYieldRatio(), sim::SimEnergyDeposit::PdgCode(), detinfo::LArProperties::PionScintYieldRatio(), detinfo::LArProperties::ProtonScintYieldRatio(), detinfo::LArProperties::ScintByParticleType(), and detinfo::LArProperties::ScintYieldRatio().

Referenced by larg4::ISCalcNESTLAr::CalcIonAndScint(), CalcIonAndScint(), and larg4::ISCalcSeparate::CalcScint().

42  {
43  // ScintByParticleType option only controls the scintillation
44  // yield ratio, which is the ratio of fast light (singlet
45  // component) to the total light (singlet+triplet components).
46 
48 
49  switch (edep.PdgCode()) {
50  case 2212: return fLArProp->ProtonScintYieldRatio();
51  case 13:
52  case -13: return fLArProp->MuonScintYieldRatio();
53  case 211:
54  case -211: return fLArProp->PionScintYieldRatio();
55  case 321:
56  case -321: return fLArProp->KaonScintYieldRatio();
57  case 1000020040: return fLArProp->AlphaScintYieldRatio();
58  case 11:
59  case -11:
60  case 22: return fLArProp->ElectronScintYieldRatio();
61  default: return fLArProp->ElectronScintYieldRatio();
62  }
63  }
virtual double ElectronScintYieldRatio() const =0
virtual double ScintYieldRatio() const =0
virtual double AlphaScintYieldRatio() const =0
virtual double ProtonScintYieldRatio() const =0
virtual double PionScintYieldRatio() const =0
const detinfo::LArProperties * fLArProp
Definition: ISCalc.h:33
Double_t edep
Definition: macro.C:13
virtual double MuonScintYieldRatio() const =0
virtual double KaonScintYieldRatio() const =0
virtual bool ScintByParticleType() const =0

Member Data Documentation

CLHEP::RandBinomial larg4::ISCalcCorrelated::fBinomialGen
private

Definition at line 48 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fEllipsModBoxA
private

from LArG4Parameters service

Definition at line 58 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fEllipsModBoxB
private

from LArG4Parameters service

Definition at line 59 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fEllipsModBoxR
private

from LArG4Parameters service

Definition at line 60 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fGeVToElectrons
private

from LArG4Parameters service

Definition at line 50 of file ISCalcCorrelated.h.

Referenced by ISCalcCorrelated().

ISTPC larg4::ISCalcCorrelated::fISTPC
private

Definition at line 46 of file ISCalcCorrelated.h.

Referenced by AngleToEFieldAtStep(), and EFieldAtStep().

double larg4::ISCalcCorrelated::fLarqlAlpha
private

from LArG4Parameters service

Definition at line 65 of file ISCalcCorrelated.h.

Referenced by FieldCorrection(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fLarqlBeta
private

from LArG4Parameters service

Definition at line 66 of file ISCalcCorrelated.h.

Referenced by FieldCorrection(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fLarqlChi0A
private

from LArG4Parameters service

Definition at line 61 of file ISCalcCorrelated.h.

Referenced by EscapingEFraction(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fLarqlChi0B
private

from LArG4Parameters service

Definition at line 62 of file ISCalcCorrelated.h.

Referenced by EscapingEFraction(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fLarqlChi0C
private

from LArG4Parameters service

Definition at line 63 of file ISCalcCorrelated.h.

Referenced by EscapingEFraction(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fLarqlChi0D
private

from LArG4Parameters service

Definition at line 64 of file ISCalcCorrelated.h.

Referenced by EscapingEFraction(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fModBoxA
private

from LArG4Parameters service

Definition at line 56 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fModBoxB
private

from LArG4Parameters service

Definition at line 57 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fQAlpha
private

from LArG4Parameters service

Definition at line 67 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fRecombA
private

from LArG4Parameters service

Definition at line 54 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fRecombk
private

from LArG4Parameters service

Definition at line 55 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

const spacecharge::SpaceCharge* larg4::ISCalcCorrelated::fSCE
private

Definition at line 47 of file ISCalcCorrelated.h.

Referenced by AngleToEFieldAtStep(), EFieldAtStep(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fScintPreScale
private

scintillation pre-scaling factor from LArProperties service

Definition at line 53 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

bool larg4::ISCalcCorrelated::fUseBinomialFlucts
private

from LArG4Parameters service

Definition at line 71 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

bool larg4::ISCalcCorrelated::fUseEllipsModBoxRecomb
private

from LArG4Parameters service

Definition at line 69 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

bool larg4::ISCalcCorrelated::fUseModBoxRecomb
private

from LArG4Parameters service

Definition at line 68 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

bool larg4::ISCalcCorrelated::fUseModLarqlRecomb
private

from LArG4Parameters service

Definition at line 70 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fWion
private

W_ion (23.6 eV) == 1/fGeVToElectrons.

Definition at line 51 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().

double larg4::ISCalcCorrelated::fWph
private

from LArG4Parameters service

Definition at line 52 of file ISCalcCorrelated.h.

Referenced by CalcIonAndScint(), and ISCalcCorrelated().


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