LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
larg4::ISCalculationSeparate Class Reference

#include "ISCalculationSeparate.h"

Inheritance diagram for larg4::ISCalculationSeparate:
larg4::ISCalculation

Public Member Functions

 ISCalculationSeparate ()
 
virtual ~ISCalculationSeparate ()
 
void Initialize (const detinfo::LArProperties *larp, const detinfo::DetectorProperties *detp, const sim::LArG4Parameters *lgp, const spacecharge::SpaceCharge *sce)
 
void Reset ()
 
void CalculateIonizationAndScintillation (sim::SimEnergyDeposit const &edep)
 
double EnergyDeposit () const
 
double NumberIonizationElectrons () const
 
double NumberScintillationPhotons () const
 
double EFieldAtStep (double efield, sim::SimEnergyDeposit const &edep)
 
 ISCalculationSeparate (CLHEP::HepRandomEngine &)
 
virtual ~ISCalculationSeparate ()
 
void Initialize ()
 
void Reset ()
 
void CalculateIonizationAndScintillation (const G4Step *step)
 
double StepSizeLimit () const
 
double VisibleEnergyDeposit () const
 
double EFieldAtStep (double fEfield, const G4Step *step) const
 

Protected Attributes

double fVisibleEnergyDeposition
 

Private Member Functions

double EFieldAtStep (double efield, float x, float y, float z)
 
void CalculateIonization (float e, float ds, float x, float y, float z)
 
void CalculateIonization (sim::SimEnergyDeposit const &edep)
 
void CalculateScintillation (float e, int pdg)
 
void CalculateScintillation (sim::SimEnergyDeposit const &edep)
 

Private Attributes

double fRecombA
 from LArG4Parameters service More...
 
double fRecombk
 from LArG4Parameters service More...
 
double fModBoxA
 from LArG4Parameters service More...
 
double fModBoxB
 from LArG4Parameters service More...
 
bool fUseModBoxRecomb
 from LArG4Parameters service More...
 
double fScintYieldFactor
 scintillation yield factor More...
 
double fEnergyDeposit
 total energy deposited in the step More...
 
double fNumIonElectrons
 number of ionization electrons for this step More...
 
double fNumScintPhotons
 number of scintillation photons for this step More...
 
geo::Vector_t fEfieldOffsets
 
const detinfo::LArPropertiesfLArProp
 
const spacecharge::SpaceChargefSCE
 
const detinfo::DetectorPropertiesfDetProp
 
const sim::LArG4ParametersfLArG4Prop
 
double fStepSize
 maximum step to take More...
 
double fEfield
 value of electric field from LArProperties service More...
 
double fGeVToElectrons
 conversion factor from LArProperties service More...
 
bool fScintByParticleType
 from LArProperties service More...
 
G4EmSaturation * fEMSaturation
 pointer to EM saturation More...
 

Detailed Description

Definition at line 26 of file ISCalculationSeparate.h.

Constructor & Destructor Documentation

larg4::ISCalculationSeparate::ISCalculationSeparate ( )

Definition at line 28 of file ISCalculationSeparate.cxx.

29  {
30  }
larg4::ISCalculationSeparate::~ISCalculationSeparate ( )
virtual

Definition at line 33 of file ISCalculationSeparate.cxx.

Referenced by ISCalculationSeparate().

34  {
35  }
larg4::ISCalculationSeparate::ISCalculationSeparate ( CLHEP::HepRandomEngine &  )

Definition at line 27 of file ISCalculationSeparate.cxx.

References ~ISCalculationSeparate().

28  {
29  }
virtual larg4::ISCalculationSeparate::~ISCalculationSeparate ( )
virtual

Member Function Documentation

void larg4::ISCalculationSeparate::CalculateIonization ( float  e,
float  ds,
float  x,
float  y,
float  z 
)
private

Definition at line 78 of file ISCalculationSeparate.cxx.

References detinfo::DetectorProperties::Efield(), EFieldAtStep(), fDetProp, fEnergyDeposit, fLArG4Prop, fModBoxA, fModBoxB, fNumIonElectrons, fRecombk, fUseModBoxRecomb, sim::LArG4Parameters::GeVToElectrons(), LOG_DEBUG, sim::LArG4Parameters::RecombA(), x, y, and z.

Referenced by CalculateIonization(), and CalculateIonizationAndScintillation().

79  {
80  double recomb = 0.;
81  double dEdx = e/ds;
82  double EFieldStep = EFieldAtStep(fDetProp->Efield(),x,y,z);
83 
84  // Guard against spurious values of dE/dx. Note: assumes density of LAr
85  if(dEdx < 1.) dEdx = 1.;
86 
87  if(fUseModBoxRecomb) {
88  if(ds){
89  double Xi = fModBoxB * dEdx / EFieldStep;
90  recomb = log(fModBoxA + Xi) / Xi;
91  }
92  else
93  recomb = 0;
94  }
95  else{
96  recomb = fLArG4Prop->RecombA() / (1. + dEdx * fRecombk / EFieldStep);
97  }
98 
99 
100  // 1.e-3 converts fEnergyDeposit to GeV
101  fNumIonElectrons = fLArG4Prop->GeVToElectrons() * 1.e-3 * e * recomb;
102 
103  LOG_DEBUG("ISCalculationSeparate")
104  << " Electrons produced for " << fEnergyDeposit
105  << " MeV deposited with " << recomb
106  << " recombination: " << fNumIonElectrons << std::endl;
107  }
Float_t x
Definition: compare.C:6
const detinfo::DetectorProperties * fDetProp
bool fUseModBoxRecomb
from LArG4Parameters service
double fEnergyDeposit
total energy deposited in the step
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
double fNumIonElectrons
number of ionization electrons for this step
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep)
double fModBoxB
from LArG4Parameters service
double RecombA() const
const sim::LArG4Parameters * fLArG4Prop
double fRecombk
from LArG4Parameters service
#define LOG_DEBUG(id)
double fModBoxA
from LArG4Parameters service
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
Float_t e
Definition: plot.C:34
double GeVToElectrons() const
void larg4::ISCalculationSeparate::CalculateIonization ( sim::SimEnergyDeposit const &  edep)
private

Definition at line 111 of file ISCalculationSeparate.cxx.

References CalculateIonization(), sim::SimEnergyDeposit::Energy(), sim::SimEnergyDeposit::MidPointX(), sim::SimEnergyDeposit::MidPointY(), sim::SimEnergyDeposit::MidPointZ(), and sim::SimEnergyDeposit::StepLength().

111  {
112  CalculateIonization(edep.Energy(),edep.StepLength(),
113  edep.MidPointX(),edep.MidPointY(),edep.MidPointZ());
114  }
Double_t edep
Definition: macro.C:13
void CalculateIonization(float e, float ds, float x, float y, float z)
void larg4::ISCalculationSeparate::CalculateIonizationAndScintillation ( const G4Step *  step)
virtual

Implements larg4::ISCalculation.

Definition at line 86 of file ISCalculationSeparate.cxx.

References EFieldAtStep(), fEfield, fEMSaturation, fEnergyDeposit, fGeVToElectrons, fModBoxA, fModBoxB, fNumIonElectrons, fNumScintPhotons, fRecombA, fRecombk, fScintByParticleType, fScintYieldFactor, fUseModBoxRecomb, larg4::ISCalculation::fVisibleEnergyDeposition, and LOG_DEBUG.

87  {
88 
89  fEnergyDeposit = step->GetTotalEnergyDeposit()/CLHEP::MeV;
90 
91  // Get the recombination factor for this voxel - Nucl.Instrum.Meth.A523:275-286,2004
92  // R = A/(1 + (dE/dx)*k)
93  // dE/dx is given by the voxel energy deposition, but have to convert it to MeV/cm
94  // from GeV/voxel width
95  // A = 0.800 +/- 0.003
96  // k = (0.097+/-0.001) g/(MeVcm^2)
97  // the dx depends on the trajectory of the step
98  // k should be divided by the density as our dE/dx is in MeV/cm,
99  // the division is handled in the constructor when we set fRecombk
100  // B.Baller: Add Modified Box recombination - ArgoNeuT result submitted to JINST
101 
102  G4ThreeVector totstep = step->GetPostStepPoint()->GetPosition();
103  totstep -= step->GetPreStepPoint()->GetPosition();
104 
105  double dx = totstep.mag()/CLHEP::cm;
106  double recomb = 0.;
107  double dEdx = (dx == 0.0)? 0.0: fEnergyDeposit/dx;
108  double EFieldStep = EFieldAtStep(fEfield,step);
109 
110  // Guard against spurious values of dE/dx. Note: assumes density of LAr
111  if(dEdx < 1.) dEdx = 1.;
112 
113  if(fUseModBoxRecomb) {
114  if (dx){
115  double Xi = fModBoxB * dEdx / EFieldStep;
116  recomb = log(fModBoxA + Xi) / Xi;
117  }
118  else
119  recomb = 0;
120  }
121  else{
122  recomb = fRecombA/(1. + dEdx * fRecombk / EFieldStep);
123  }
124 
125 
126  // 1.e-3 converts fEnergyDeposit to GeV
127  fNumIonElectrons = fGeVToElectrons * 1.e-3 * fEnergyDeposit * recomb;
128 
129  LOG_DEBUG("ISCalculationSeparate") << " Electrons produced for " << fEnergyDeposit
130  << " MeV deposited with " << recomb
131  << " recombination: " << fNumIonElectrons;
132 
133  // Now do the scintillation
134  G4MaterialPropertiesTable* mpt = step->GetTrack()->GetMaterial()->GetMaterialPropertiesTable();
135  if( !mpt)
136  throw cet::exception("ISCalculationSeparate") << "Cannot find materials property table"
137  << " for this step! "
138  << step->GetTrack()->GetMaterial() << "\n";
139 
140  // if not doing the scintillation by particle type, use the saturation
141  double scintYield = mpt->GetConstProperty("SCINTILLATIONYIELD");
142 
144 
145  LOG_DEBUG("ISCalculationSeparate") << "scintillating by particle type";
146 
147  // Get the definition of the current particle
148  G4ParticleDefinition *pDef = step->GetTrack()->GetDynamicParticle()->GetDefinition();
149  //G4MaterialPropertyVector *Scint_Yield_Vector = NULL;
150 
151  // Obtain the G4MaterialPropertyVectory containing the
152  // scintillation light yield as a function of the deposited
153  // energy for the current particle type
154 
155  // Protons
156  if(pDef == G4Proton::ProtonDefinition()){
157  scintYield = mpt->GetConstProperty("PROTONSCINTILLATIONYIELD");
158  }
159  // Muons
160  else if(pDef == G4MuonPlus::MuonPlusDefinition() ||
161  pDef == G4MuonMinus::MuonMinusDefinition()){
162  scintYield = mpt->GetConstProperty("MUONSCINTILLATIONYIELD");
163  }
164  // Pions
165  else if(pDef == G4PionPlus::PionPlusDefinition() ||
166  pDef == G4PionMinus::PionMinusDefinition()){
167  scintYield = mpt->GetConstProperty("PIONSCINTILLATIONYIELD");
168  }
169  // Kaons
170  else if(pDef == G4KaonPlus::KaonPlusDefinition() ||
171  pDef == G4KaonMinus::KaonMinusDefinition()){
172  scintYield = mpt->GetConstProperty("KAONSCINTILLATIONYIELD");
173  }
174  // Alphas
175  else if(pDef == G4Alpha::AlphaDefinition()){
176  scintYield = mpt->GetConstProperty("ALPHASCINTILLATIONYIELD");
177  }
178  // Electrons (must also account for shell-binding energy
179  // attributed to gamma from standard PhotoElectricEffect)
180  else if(pDef == G4Electron::ElectronDefinition() ||
181  pDef == G4Gamma::GammaDefinition()){
182  scintYield = mpt->GetConstProperty("ELECTRONSCINTILLATIONYIELD");
183  }
184  // Default for particles not enumerated/listed above
185  else{
186  scintYield = mpt->GetConstProperty("ELECTRONSCINTILLATIONYIELD");
187  }
188 
189  // If the user has not specified yields for (p,d,t,a,carbon)
190  // then these unspecified particles will default to the
191  // electron's scintillation yield
192 
193  // Throw an exception if no scintillation yield is found
194  if (!scintYield)
195  throw cet::exception("ISCalculationSeparate") << "Request for scintillation yield for energy "
196  << "deposit and particle type without correct "
197  << "entry in MaterialPropertiesTable\n"
198  << "ScintillationByParticleType requires at "
199  << "minimum that ELECTRONSCINTILLATIONYIELD is "
200  << "set by the user\n";
201 
202  fNumScintPhotons = scintYield * fEnergyDeposit;
203  }
204  else if(fEMSaturation){
205  // The default linear scintillation process
206  //fEMSaturation->SetVerbose(1);
207  fVisibleEnergyDeposition = fEMSaturation->VisibleEnergyDepositionAtAStep(step);
209  //fNumScintPhotons = fScintYieldFactor * scintYield * fEMSaturation->VisibleEnergyDepositionAtAStep(step);
210  //I need a dump here
211  //mf::LogInfo("EMSaturation") <<"\n\nfEMSaturation VisibleEnergyDepositionAtAStep(step): "<<fEMSaturation->VisibleEnergyDepositionAtAStep(step)<<"\n" <<"BirksCoefs: \n";
212  // fEMSaturation->DumpBirksCoefficients();
213  //mf::LogInfo("EMSaturation")<<"\n" <<"G4Birks: \n";
214  //fEMSaturation->DumpG4BirksCoefficients();
215  //mf::LogInfo("EMSaturation")<<"fScintYieldFactor: "<<fScintYieldFactor <<"\nscintYield: "<<scintYield<<"\nfEMVisAtStep: "<<fEMSaturation->VisibleEnergyDepositionAtAStep(step)<<"\nfNumScintPhotons: "<<fNumScintPhotons<<"\n";
216  //mf::LogInfo("EMSaturation")<<"fTotalEnergyDeposit: "<< step->GetTotalEnergyDeposit()/CLHEP::MeV<<"\nfNumIonElectrons: "<<fNumIonElectrons<<"\n";
217  }
218  else{
220  fVisibleEnergyDeposition = 0.0; //This is set to zero because I have not made a correct implimentation of this value for anything but EMSaturation.
221  }
222 
223  LOG_DEBUG("ISCalculationSeparate") << "number photons: " << fNumScintPhotons
224  << " energy: " << fEnergyDeposit/CLHEP::MeV
225  << " saturation: "
226  << fEMSaturation->VisibleEnergyDepositionAtAStep(step)
227  << " step length: " << step->GetStepLength()/CLHEP::cm;
228 
229 
230  return;
231  }
bool fUseModBoxRecomb
from LArG4Parameters service
double fEnergyDeposit
total energy deposited in the step
G4EmSaturation * fEMSaturation
pointer to EM saturation
double fScintYieldFactor
scintillation yield factor
double fGeVToElectrons
conversion factor from LArProperties service
double fRecombA
from LArG4Parameters service
double fNumIonElectrons
number of ionization electrons for this step
double fNumScintPhotons
number of scintillation photons for this step
double fEfield
value of electric field from LArProperties service
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep)
double fModBoxB
from LArG4Parameters service
bool fScintByParticleType
from LArProperties service
double fRecombk
from LArG4Parameters service
#define LOG_DEBUG(id)
double fVisibleEnergyDeposition
Definition: ISCalculation.h:42
double fModBoxA
from LArG4Parameters service
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void larg4::ISCalculationSeparate::CalculateIonizationAndScintillation ( sim::SimEnergyDeposit const &  edep)
void larg4::ISCalculationSeparate::CalculateScintillation ( float  e,
int  pdg 
)
private

Definition at line 117 of file ISCalculationSeparate.cxx.

References detinfo::LArProperties::AlphaScintYield(), e, detinfo::LArProperties::ElectronScintYield(), fLArProp, fNumScintPhotons, fScintYieldFactor, detinfo::LArProperties::KaonScintYield(), LOG_DEBUG, detinfo::LArProperties::MuonScintYield(), detinfo::LArProperties::PionScintYield(), detinfo::LArProperties::ProtonScintYield(), detinfo::LArProperties::ScintByParticleType(), and detinfo::LArProperties::ScintYield().

Referenced by CalculateIonizationAndScintillation(), and CalculateScintillation().

118  {
119  double scintYield = fLArProp->ScintYield(true);
121 
122  LOG_DEBUG("ISCalculationSeparate") << "scintillating by particle type";
123 
124  switch(pdg) {
125 
126  case 2212:
127  scintYield = fLArProp->ProtonScintYield(true);
128  break;
129  case 13:
130  case -13:
131  scintYield = fLArProp->MuonScintYield(true);
132  break;
133  case 211:
134  case -211:
135  scintYield = fLArProp->PionScintYield(true);
136  break;
137  case 321:
138  case -321:
139  scintYield = fLArProp->KaonScintYield(true);
140  break;
141  case 1000020040:
142  scintYield = fLArProp->AlphaScintYield(true);
143  break;
144  case 11:
145  case -11:
146  case 22:
147  scintYield = fLArProp->ElectronScintYield(true);
148  break;
149  default:
150  scintYield = fLArProp->ElectronScintYield(true);
151 
152  }
153 
154  fNumScintPhotons = scintYield * e;
155  }
156  else
157  fNumScintPhotons = fScintYieldFactor * scintYield * e;
158 
159  }
virtual double AlphaScintYield(bool prescale=false) const =0
double fScintYieldFactor
scintillation yield factor
const detinfo::LArProperties * fLArProp
double fNumScintPhotons
number of scintillation photons for this step
virtual double ProtonScintYield(bool prescale=false) const =0
virtual double ElectronScintYield(bool prescale=false) const =0
virtual double PionScintYield(bool prescale=false) const =0
virtual double MuonScintYield(bool prescale=false) const =0
virtual double KaonScintYield(bool prescale=false) const =0
virtual double ScintYield(bool prescale=false) const =0
#define LOG_DEBUG(id)
Float_t e
Definition: plot.C:34
virtual bool ScintByParticleType() const =0
void larg4::ISCalculationSeparate::CalculateScintillation ( sim::SimEnergyDeposit const &  edep)
private

Definition at line 162 of file ISCalculationSeparate.cxx.

References CalculateScintillation(), sim::SimEnergyDeposit::Energy(), and sim::SimEnergyDeposit::PdgCode().

163  {
164  CalculateScintillation(edep.Energy(),edep.PdgCode());
165  }
void CalculateScintillation(float e, int pdg)
Double_t edep
Definition: macro.C:13
double larg4::ISCalculation::EFieldAtStep ( double  fEfield,
const G4Step *  step 
) const
inherited

Definition at line 30 of file ISCalculation.cxx.

Referenced by larg4::ISCalculation::VisibleEnergyDeposit().

31  {
32  auto const* SCE = lar::providerFrom<spacecharge::SpaceChargeService>();
33  if (!SCE->EnableSimEfieldSCE()) return fEfield;
34 
35  geo::Point_t midPoint
36  { ( step->GetPreStepPoint()->GetPosition() + step->GetPostStepPoint()->GetPosition() ) * 0.5/CLHEP::cm };
37  auto EfieldDelta = fEfield * SCE->GetEfieldOffsets(midPoint);
38  geo::Vector_t EfieldVec
39  = { fEfield + EfieldDelta.X(), EfieldDelta.Y(), EfieldDelta.Z() };
40  return EfieldVec.R();
41  }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:167
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:187
double larg4::ISCalculationSeparate::EFieldAtStep ( double  efield,
sim::SimEnergyDeposit const &  edep 
)

Definition at line 175 of file ISCalculationSeparate.cxx.

References sim::SimEnergyDeposit::MidPointX(), sim::SimEnergyDeposit::MidPointY(), and sim::SimEnergyDeposit::MidPointZ().

Referenced by CalculateIonization(), and CalculateIonizationAndScintillation().

176  {
177  return EFieldAtStep(efield,
178  edep.MidPointX(),edep.MidPointY(),edep.MidPointZ());
179  }
double EFieldAtStep(double efield, sim::SimEnergyDeposit const &edep)
Double_t edep
Definition: macro.C:13
double larg4::ISCalculationSeparate::EFieldAtStep ( double  efield,
float  x,
float  y,
float  z 
)
private

Definition at line 181 of file ISCalculationSeparate.cxx.

References spacecharge::SpaceCharge::EnableSimEfieldSCE(), fEfieldOffsets, fSCE, spacecharge::SpaceCharge::GetEfieldOffsets(), x, and y.

182  {
183  double EField = efield;
184  if (fSCE->EnableSimEfieldSCE())
185  {
187  EField = std::sqrt( (efield + efield*fEfieldOffsets.X())*(efield + efield*fEfieldOffsets.X()) +
188  (efield*fEfieldOffsets.Y()+efield*fEfieldOffsets.Y()) +
189  (efield*fEfieldOffsets.Z()+efield*fEfieldOffsets.Z()) );
190  }
191  return EField;
192  }
Float_t x
Definition: compare.C:6
virtual bool EnableSimEfieldSCE() const =0
const spacecharge::SpaceCharge * fSCE
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
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:187
double larg4::ISCalculationSeparate::EnergyDeposit ( ) const
inline

Definition at line 39 of file ISCalculationSeparate.h.

Referenced by larg4::ISCalculationAna::analyze().

39 { return fEnergyDeposit; }
double fEnergyDeposit
total energy deposited in the step
void larg4::ISCalculationSeparate::Initialize ( )
virtual

Implements larg4::ISCalculation.

Definition at line 37 of file ISCalculationSeparate.cxx.

References detinfo::DetectorProperties::Density(), fEfield, fEMSaturation, fEnergyDeposit, fGeVToElectrons, fModBoxA, fModBoxB, fNumIonElectrons, fNumScintPhotons, fRecombA, fRecombk, fScintByParticleType, fScintYieldFactor, fStepSize, fUseModBoxRecomb, sim::LArG4Parameters::GeVToElectrons(), max, sim::LArG4Parameters::ModBoxA(), sim::LArG4Parameters::ModBoxB(), sim::LArG4Parameters::RecombA(), sim::LArG4Parameters::Recombk(), Reset(), detinfo::LArProperties::ScintByParticleType(), sim::LArG4Parameters::UseModBoxRecomb(), sim::LArVoxelCalculator::VoxelSizeX(), sim::LArVoxelCalculator::VoxelSizeY(), and sim::LArVoxelCalculator::VoxelSizeZ().

38  {
40  const detinfo::LArProperties* larp = lar::providerFrom<detinfo::LArPropertiesService>();
41  const detinfo::DetectorProperties* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
42 
43  double density = detprop->Density(detprop->Temperature());
44  fEfield = detprop->Efield();
46  fGeVToElectrons = lgpHandle->GeVToElectrons();
47 
48  // \todo get scintillation yield from LArG4Parameters or LArProperties
49  fScintYieldFactor = 1.;
50 
51  // the recombination coefficient is in g/(MeVcm^2), but
52  // we report energy depositions in MeV/cm, need to divide
53  // Recombk from the LArG4Parameters service by the density
54  // of the argon we got above.
55  fRecombA = lgpHandle->RecombA();
56  fRecombk = lgpHandle->Recombk()/density;
57  fModBoxA = lgpHandle->ModBoxA();
58  fModBoxB = lgpHandle->ModBoxB()/density;
59  fUseModBoxRecomb = lgpHandle->UseModBoxRecomb();
60 
61  // Use Birks Correction in the Scintillation process
62  fEMSaturation = G4LossTableManager::Instance()->EmSaturation();
63 
64  // determine the step size using the voxel sizes
66  double maxsize = std::max(lvc->VoxelSizeX(), std::max(lvc->VoxelSizeY(), lvc->VoxelSizeZ())) * CLHEP::cm;
67 
68  fStepSize = 0.1 * maxsize;
69 
70  return;
71  }
double VoxelSizeX() const
Access to voxel dimensions and offsets.
double ModBoxA() const
bool fUseModBoxRecomb
from LArG4Parameters service
G4EmSaturation * fEMSaturation
pointer to EM saturation
double fScintYieldFactor
scintillation yield factor
double fGeVToElectrons
conversion factor from LArProperties service
bool UseModBoxRecomb() const
double fRecombA
from LArG4Parameters service
double fEfield
value of electric field from LArProperties service
Int_t max
Definition: plot.C:27
double fModBoxB
from LArG4Parameters service
bool fScintByParticleType
from LArProperties service
double RecombA() const
double fStepSize
maximum step to take
virtual double Density(double temperature) const =0
Returns argon density at a given temperature.
double fRecombk
from LArG4Parameters service
double ModBoxB() const
double Recombk() const
double fModBoxA
from LArG4Parameters service
virtual bool ScintByParticleType() const =0
double GeVToElectrons() const
void larg4::ISCalculationSeparate::Initialize ( const detinfo::LArProperties larp,
const detinfo::DetectorProperties detp,
const sim::LArG4Parameters lgp,
const spacecharge::SpaceCharge sce 
)

Definition at line 38 of file ISCalculationSeparate.cxx.

References detinfo::DetectorProperties::Density(), fDetProp, fLArG4Prop, fLArProp, fModBoxA, fModBoxB, fRecombA, fRecombk, fSCE, fScintYieldFactor, fUseModBoxRecomb, sim::LArG4Parameters::ModBoxA(), sim::LArG4Parameters::ModBoxB(), sim::LArG4Parameters::RecombA(), sim::LArG4Parameters::Recombk(), Reset(), detinfo::DetectorProperties::Temperature(), and sim::LArG4Parameters::UseModBoxRecomb().

Referenced by spacecharge::ShiftEdepSCE::beginJob(), larg4::ISCalculationAna::beginJob(), detsim::SimDriftElectrons::beginJob(), and phot::PhotonLibraryPropagation::produce().

42  {
43  fLArProp = larp;
44  fSCE = sce;
45  fDetProp = detp;
46  fLArG4Prop = lgp;
47 
48  // \todo get scintillation yield from LArG4Parameters or LArProperties
49  fScintYieldFactor = 1.;
50 
51  // the recombination coefficient is in g/(MeVcm^2), but
52  // we report energy depositions in MeV/cm, need to divide
53  // Recombk from the LArG4Parameters service by the density
54  // of the argon we got above.
55  fRecombA = (double)lgp->RecombA();
56  fRecombk = (double)lgp->Recombk()/detp->Density(detp->Temperature());
57  fModBoxA = (double)lgp->ModBoxA();
58  fModBoxB = (double)lgp->ModBoxB()/detp->Density(detp->Temperature());
59  fUseModBoxRecomb = (bool)lgp->UseModBoxRecomb();
60 
61  this->Reset();
62 
63  return;
64  }
const detinfo::DetectorProperties * fDetProp
double ModBoxA() const
bool fUseModBoxRecomb
from LArG4Parameters service
const spacecharge::SpaceCharge * fSCE
double fScintYieldFactor
scintillation yield factor
const detinfo::LArProperties * fLArProp
bool UseModBoxRecomb() const
double fRecombA
from LArG4Parameters service
virtual double Temperature() const =0
double fModBoxB
from LArG4Parameters service
double RecombA() const
const sim::LArG4Parameters * fLArG4Prop
virtual double Density(double temperature) const =0
Returns argon density at a given temperature.
double fRecombk
from LArG4Parameters service
double ModBoxB() const
double Recombk() const
double fModBoxA
from LArG4Parameters service
double larg4::ISCalculationSeparate::NumberIonizationElectrons ( ) const
inline

Definition at line 40 of file ISCalculationSeparate.h.

Referenced by larg4::ISCalculationAna::analyze(), spacecharge::ShiftEdepSCE::produce(), and detsim::SimDriftElectrons::produce().

40 { return fNumIonElectrons; }
double fNumIonElectrons
number of ionization electrons for this step
double larg4::ISCalculationSeparate::NumberScintillationPhotons ( ) const
inline

Definition at line 41 of file ISCalculationSeparate.h.

Referenced by larg4::ISCalculationAna::analyze(), spacecharge::ShiftEdepSCE::produce(), and phot::PhotonLibraryPropagation::produce().

41 { return fNumScintPhotons; }
double fNumScintPhotons
number of scintillation photons for this step
void larg4::ISCalculationSeparate::Reset ( )
virtual

Implements larg4::ISCalculation.

void larg4::ISCalculationSeparate::Reset ( )
virtual

Implements larg4::ISCalculation.

Definition at line 67 of file ISCalculationSeparate.cxx.

References fEnergyDeposit, fNumIonElectrons, and fNumScintPhotons.

Referenced by larg4::ISCalculationAna::analyze(), Initialize(), spacecharge::ShiftEdepSCE::produce(), phot::PhotonLibraryPropagation::produce(), and detsim::SimDriftElectrons::produce().

68  {
69  fEnergyDeposit = 0.;
70  fNumScintPhotons = 0.;
71  fNumIonElectrons = 0.;
72 
73  return;
74  }
double fEnergyDeposit
total energy deposited in the step
double fNumIonElectrons
number of ionization electrons for this step
double fNumScintPhotons
number of scintillation photons for this step
double larg4::ISCalculationSeparate::StepSizeLimit ( ) const
inlinevirtual

Implements larg4::ISCalculation.

Definition at line 33 of file ISCalculationSeparate.h.

33 { return fStepSize; }
double fStepSize
maximum step to take
double larg4::ISCalculation::VisibleEnergyDeposit ( ) const
inlineinherited

Member Data Documentation

const detinfo::DetectorProperties* larg4::ISCalculationSeparate::fDetProp
private

Definition at line 66 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), and Initialize().

double larg4::ISCalculationSeparate::fEfield
private

value of electric field from LArProperties service

Definition at line 38 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), and Initialize().

geo::Vector_t larg4::ISCalculationSeparate::fEfieldOffsets
private

Definition at line 61 of file ISCalculationSeparate.h.

Referenced by EFieldAtStep().

G4EmSaturation* larg4::ISCalculationSeparate::fEMSaturation
private

pointer to EM saturation

Definition at line 47 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fEnergyDeposit
private

total energy deposited in the step

Definition at line 57 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), Initialize(), and Reset().

double larg4::ISCalculationSeparate::fGeVToElectrons
private

conversion factor from LArProperties service

Definition at line 39 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), and Initialize().

const sim::LArG4Parameters* larg4::ISCalculationSeparate::fLArG4Prop
private

Definition at line 67 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), and Initialize().

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

Definition at line 64 of file ISCalculationSeparate.h.

Referenced by CalculateScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fModBoxA
private

from LArG4Parameters service

Definition at line 51 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fModBoxB
private

from LArG4Parameters service

Definition at line 52 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fNumIonElectrons
private

number of ionization electrons for this step

Definition at line 58 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), Initialize(), and Reset().

double larg4::ISCalculationSeparate::fNumScintPhotons
private

number of scintillation photons for this step

Definition at line 59 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), CalculateScintillation(), Initialize(), and Reset().

double larg4::ISCalculationSeparate::fRecombA
private

from LArG4Parameters service

Definition at line 49 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fRecombk
private

from LArG4Parameters service

Definition at line 50 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), and Initialize().

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

Definition at line 65 of file ISCalculationSeparate.h.

Referenced by EFieldAtStep(), and Initialize().

bool larg4::ISCalculationSeparate::fScintByParticleType
private

from LArProperties service

Definition at line 45 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fScintYieldFactor
private

scintillation yield factor

Definition at line 55 of file ISCalculationSeparate.h.

Referenced by CalculateIonizationAndScintillation(), CalculateScintillation(), and Initialize().

double larg4::ISCalculationSeparate::fStepSize
private

maximum step to take

Definition at line 37 of file ISCalculationSeparate.h.

Referenced by Initialize().

bool larg4::ISCalculationSeparate::fUseModBoxRecomb
private

from LArG4Parameters service

Definition at line 53 of file ISCalculationSeparate.h.

Referenced by CalculateIonization(), CalculateIonizationAndScintillation(), and Initialize().

double larg4::ISCalculation::fVisibleEnergyDeposition
protectedinherited

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