LArSoft  v09_90_00
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 214 of file ISCalcCorrelated.cxx.

References util::abs(), geo::TPCGeo::DetectDriftDirection(), spacecharge::SpaceCharge::EnableSimEfieldSCE(), sim::SimEnergyDeposit::EndX(), sim::SimEnergyDeposit::EndY(), sim::SimEnergyDeposit::EndZ(), fISTPC, fSCE, spacecharge::SpaceCharge::GetEfieldOffsets(), larg4::ISTPC::isScintInActiveVolume(), sim::SimEnergyDeposit::MidPoint(), geo::GeometryCore::PositionToTPCID(), sim::SimEnergyDeposit::StartX(), sim::SimEnergyDeposit::StartY(), sim::SimEnergyDeposit::StartZ(), and geo::GeometryCore::TPC().

Referenced by CalcIonAndScint().

215  {
216 
217  // electric field outside active volume set to zero
218  if (!fISTPC.isScintInActiveVolume(edep.MidPoint())) return 0.;
219 
220  TVector3 stepvec(
221  edep.StartX() - edep.EndX(), edep.StartY() - edep.EndY(), edep.StartZ() - edep.EndZ());
222 
223  TVector3 elecvec;
224 
226  geo::TPCID tpcid = fGeometry->PositionToTPCID(edep.MidPoint());
227  if (!bool(tpcid)) return 0.;
228  const geo::TPCGeo& tpcGeo = fGeometry->TPC(tpcid);
229 
230  if (tpcGeo.DetectDriftDirection() == 1) elecvec.SetXYZ(1, 0, 0);
231  if (tpcGeo.DetectDriftDirection() == -1) elecvec.SetXYZ(-1, 0, 0);
232  if (tpcGeo.DetectDriftDirection() == 2) elecvec.SetXYZ(0, 1, 0);
233  if (tpcGeo.DetectDriftDirection() == -2) elecvec.SetXYZ(0, -1, 0);
234  if (tpcGeo.DetectDriftDirection() == 3) elecvec.SetXYZ(0, 0, 1);
235  if (tpcGeo.DetectDriftDirection() == -3) elecvec.SetXYZ(0, 0, -1);
236 
237  elecvec *= efield;
238 
239  // electric field inside active volume
240  if (fSCE->EnableSimEfieldSCE()) {
241  auto const eFieldOffsets = fSCE->GetEfieldOffsets(edep.MidPoint());
242 
243  TVector3 scevec;
244 
245  if (tpcGeo.DetectDriftDirection() == 1)
246  scevec.SetXYZ(
247  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
248  if (tpcGeo.DetectDriftDirection() == -1)
249  scevec.SetXYZ(
250  -1 * efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
251  if (tpcGeo.DetectDriftDirection() == 2)
252  scevec.SetXYZ(
253  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
254  if (tpcGeo.DetectDriftDirection() == -2)
255  scevec.SetXYZ(
256  efield * eFieldOffsets.X(), -1 * efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
257  if (tpcGeo.DetectDriftDirection() == 3)
258  scevec.SetXYZ(
259  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
260  if (tpcGeo.DetectDriftDirection() == -3)
261  scevec.SetXYZ(
262  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), -1 * efield * eFieldOffsets.Z());
263 
264  elecvec += scevec;
265  }
266 
267  double angle = std::acos(stepvec.Dot(elecvec) / (stepvec.Mag() * elecvec.Mag()));
268 
269  if (angle > TMath::PiOver2()) { angle = abs(TMath::Pi() - angle); }
270 
271  return angle;
272  }
virtual bool EnableSimEfieldSCE() const =0
Geometry information for a single TPC.
Definition: TPCGeo.h:36
constexpr auto abs(T v)
Returns the absolute value of the argument.
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:722
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
Double_t edep
Definition: macro.C:13
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:149
const spacecharge::SpaceCharge * fSCE
bool isScintInActiveVolume(geo::Point_t const &ScintPoint)
Definition: ISTPC.cxx:36
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:2675
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::DetectDriftDirection(), spacecharge::SpaceCharge::EnableSimEfieldSCE(), fISTPC, fSCE, spacecharge::SpaceCharge::GetEfieldOffsets(), larg4::ISTPC::isScintInActiveVolume(), sim::SimEnergyDeposit::MidPoint(), geo::GeometryCore::PositionToTPCID(), and geo::GeometryCore::TPC().

Referenced by CalcIonAndScint().

165  {
166  // electric field outside active volume set to zero
167  if (!fISTPC.isScintInActiveVolume(edep.MidPoint())) return 0.;
168 
169  TVector3 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  if (tpcGeo.DetectDriftDirection() == 1) elecvec.SetXYZ(1, 0, 0);
177  if (tpcGeo.DetectDriftDirection() == -1) elecvec.SetXYZ(-1, 0, 0);
178  if (tpcGeo.DetectDriftDirection() == 2) elecvec.SetXYZ(0, 1, 0);
179  if (tpcGeo.DetectDriftDirection() == -2) elecvec.SetXYZ(0, -1, 0);
180  if (tpcGeo.DetectDriftDirection() == 3) elecvec.SetXYZ(0, 0, 1);
181  if (tpcGeo.DetectDriftDirection() == -3) elecvec.SetXYZ(0, 0, -1);
182 
183  elecvec *= efield;
184 
185  if (fSCE->EnableSimEfieldSCE()) {
186  auto const eFieldOffsets = fSCE->GetEfieldOffsets(edep.MidPoint());
187  TVector3 scevec;
188 
189  if (tpcGeo.DetectDriftDirection() == 1)
190  scevec.SetXYZ(
191  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
192  if (tpcGeo.DetectDriftDirection() == -1)
193  scevec.SetXYZ(
194  -1 * efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
195  if (tpcGeo.DetectDriftDirection() == 2)
196  scevec.SetXYZ(
197  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
198  if (tpcGeo.DetectDriftDirection() == -2)
199  scevec.SetXYZ(
200  efield * eFieldOffsets.X(), -1 * efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
201  if (tpcGeo.DetectDriftDirection() == 3)
202  scevec.SetXYZ(
203  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), efield * eFieldOffsets.Z());
204  if (tpcGeo.DetectDriftDirection() == -3)
205  scevec.SetXYZ(
206  efield * eFieldOffsets.X(), efield * eFieldOffsets.Y(), -1 * efield * eFieldOffsets.Z());
207 
208  elecvec += scevec;
209  }
210 
211  return elecvec.Mag();
212  }
virtual bool EnableSimEfieldSCE() const =0
Geometry information for a single TPC.
Definition: TPCGeo.h:36
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:722
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
Double_t edep
Definition: macro.C:13
virtual geo::Vector_t GetEfieldOffsets(geo::Point_t const &point) const =0
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
Definition: TPCGeo.cxx:149
const spacecharge::SpaceCharge * fSCE
bool isScintInActiveVolume(geo::Point_t const &ScintPoint)
Definition: ISTPC.cxx:36
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 276 of file ISCalcCorrelated.cxx.

References fLarqlChi0A, fLarqlChi0B, fLarqlChi0C, and fLarqlChi0D.

Referenced by CalcIonAndScint().

277  {
278  return fLarqlChi0A / (fLarqlChi0B + std::exp(fLarqlChi0C + fLarqlChi0D * dEdx));
279  }
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:2675
double fLarqlChi0A
from LArG4Parameters service
double larg4::ISCalcCorrelated::FieldCorrection ( double const  EF,
double const  dEdx 
) const
private

Definition at line 283 of file ISCalcCorrelated.cxx.

References fLarqlAlpha, and fLarqlBeta.

Referenced by CalcIonAndScint().

284  {
285  return std::exp(-EF / (fLarqlAlpha * std::log(dEdx) + fLarqlBeta));
286  }
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2675
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: