Belle II Software  release-08-01-10
EDepInGas Class Reference

The Class for Energy deposit in the gas. More...

#include <EDepInGas.h>

Collaboration diagram for EDepInGas:

Public Member Functions

virtual ~EDepInGas ()
 Destructor.
 
void initialize ()
 Initialize theclass.
 
double getEDepInGas (int mode, int pdg, double p, double dx, double e3) const
 Return the energy deosite in the gas. More...
 
double getMostProbabEDep (double p, double mass, double zi, double dx, double z, double a, double i, double rho) const
 Return the energy deosite in the material. More...
 

Static Public Member Functions

static EDepInGasgetInstance ()
 Static method to get a reference to the EDepInGas instance. More...
 

Private Member Functions

 EDepInGas ()
 Singleton class.
 
 EDepInGas (const EDepInGas &)
 Singleton class.
 
EDepInGasoperator= (const EDepInGas &)
 Singleton class.
 

Private Attributes

double m_z1 = 0
 Z of He-C2H6 gas.
 
double m_a1 = 0
 A of He-C2H6 gas.
 
double m_i1 = 0
 I of He-C2H6 gas.
 
double m_rho1 = 0
 rho of He-C2H6 gas
 
double m_z2 = 0
 Z of "wire gas".
 
double m_a2 = 0
 A of "wire gas".
 
double m_i2 = 0
 I of "wire gas".
 
double m_rho2 = 0
 rho of "wire gas"
 
double m_z0 = 0
 Z of wire+gas.
 
double m_a0 = 0
 A of wire+gas.
 
double m_i0 = 0
 I of wire+gas.
 
double m_rho0 = 0
 rho of wire+gas
 
const double m_massE = 0.51099895e6
 electron mass
 
double m_ak1 [6][2] = {{ }}
 coeffs a for density effect
 
double m_bk1 [6][2] = {{ }}
 coeffs b for density effect
 
double m_ck1 [6][2] = {{ }}
 coeffs c for density effect
 

Static Private Attributes

static EDepInGasm_pntr = 0
 Pointer that saves the instance of this class.
 

Detailed Description

The Class for Energy deposit in the gas.

This class provides the energy deposit in the gas.

Definition at line 20 of file EDepInGas.h.

Member Function Documentation

◆ getEDepInGas()

double getEDepInGas ( int  mode,
int  pdg,
double  p,
double  dx,
double  e3 
) const

Return the energy deosite in the gas.

Parameters
mode0: simple scaling; 1: scaling based on mpe; 2: based on probab.
pdgpdg code of incoming particle
pabsolute momentum (GeV)
dxthickness of material (cm)
e3energy deposit in gas+wire

Definition at line 137 of file EDepInGas.cc.

138 {
139  double xi1 = m_rho1 * (m_z1 / m_a1);
140  double xi2 = m_rho2 * (m_z2 / m_a2);
141  // B2DEBUG(m_dbg, (xi1+xi2)/xi1 <<" "<< e3);
142  if (mode == 0) return e3 * xi1 / (xi1 + xi2);
143 
144  static TDatabasePDG* ptrTDatabasePDG = TDatabasePDG::Instance();
145  const double mass = ptrTDatabasePDG->GetParticle(pdg)->Mass();
146  const double chrg = fabs(ptrTDatabasePDG->GetParticle(pdg)->Charge() / 3);
147 
148  const double me1 = getMostProbabEDep(mom, mass, chrg, dx, m_z1, m_a1, m_i1, m_rho1);
149  if (mode == 2) {
150  const double me0 = getMostProbabEDep(mom, mass, chrg, dx, m_z0, m_a0, m_i0, m_rho0);
151  return e3 * me1 / me0;
152  }
153  const double me2 = getMostProbabEDep(mom, mass, chrg, dx, m_z2, m_a2, m_i2, m_rho2);
154  if (mode == 1) return e3 * me1 / (me1 + me2);
155 
156  // extract energy deposit (e1) based on probab., L(e1)*L(e3-e1),
157  // where L is the analytic approx. of Landau dist.
158  // find lm1 which maximizes probability
159  const double mom2 = mom * mom;
160  const double beta2 = mom2 / (mass * mass + mom2);
161  const double buf = 0.1535e-3 * dx * chrg * chrg / beta2;
162  xi1 *= buf;
163  xi2 *= buf;
164  const double xi1i = 1 / xi1;
165  const double xi2i = 1 / xi2;
166  const double lm1min = -me1 * xi1i;
167  const double lm1max = (e3 - me1) * xi1i;
168  double lm1 = (e3 * me1 / (me1 + me2) - me1) * xi1i; // initial guess
169  lm1 = min(lm1, lm1max);
170  lm1 = max(lm1, lm1min);
171  // double edm = 1;
172  int itry = 0;
173  // B2DEBUG(m_dbg, "e3,me1,me2,xi1i=" << e3 <<" "<< me1 <<" "<< me2 <<" "<< xi1i);
174  // B2DEBUG(m_dbg, "lm1min,lm1max,lm1=" << lm1min <<" "<< lm1max <<" "<< lm1);
175  const double lm2b = (e3 - me1 - me2) * xi2i;
176  const double r = xi1 * xi2i;
177  double deltal = 0;
178  double lm1old = lm1;
179  while (itry <= 2 || fabs(lm1 - lm1old) > 0.001) {
180  ++itry;
181  lm1old = lm1;
182  if (itry > 50) {
183  // B2DEBUG(m_dbg, "itry > 50" << "itry,lm1min,lm1max,lm1,edm=" << itry <<" "<< lm1min <<" "<< lm1max <<" "<< lm1);
184  break;
185  }
186  lm1 -= deltal;
187  lm1 = max(lm1min, lm1);
188  lm1 = min(lm1max, lm1);
189  double lm2 = lm2b - r * lm1;
190  double emlm1 = exp(-lm1);
191  double emlm2 = exp(-lm2);
192  double dldlm1 = 1 - emlm1 - r + r * emlm2;
193  double dl2dlm12 = emlm1 + r * r * emlm2;
194  deltal = dldlm1 / dl2dlm12;
195  // edm = dldlm1 * deltal; //drop 0.5* for speed up
196  }
197 
198  if (mode == 3) return xi1 * lm1 + me1;
199 
200  double lm2 = lm2b - r * lm1;
201  double lmin = 0.5 * (lm1 + lm2 + exp(-lm1) + exp(-lm2));
202  const double ymax = exp(-lmin);
203  // if (ymax < 1.e-10) return e3*me1/(me1+me2);
204 
205  // generate e1 according to probab.
206  const double lm1w = lm1max - lm1min;
207  double y = 10;
208  double p = 1;
209  int jtry = 0;
210  double urndm[2];
211  while (y > p) {
212  ++jtry;
213  if (jtry > 500) {
214  // B2DEBUG(m_dbg, "jtry > 500" <<"ymax" << ymax);
215  lm1 = (e3 * me1 / (me1 + me2) - me1) * xi1i;
216  break;
217  }
218  gRandom->RndmArray(2, urndm);
219  lm1 = lm1min + lm1w * urndm[0];
220  lm2 = lm2b - r * lm1;
221  double l = 0.5 * (lm1 + lm2 + exp(-lm1) + exp(-lm2));
222  p = exp(-l);
223  y = ymax * urndm[1];
224  }
225 
226  return xi1 * lm1 + me1;
227 }
double m_i1
I of He-C2H6 gas.
Definition: EDepInGas.h:71
double m_i0
I of wire+gas.
Definition: EDepInGas.h:81
double m_z1
Z of He-C2H6 gas.
Definition: EDepInGas.h:69
double m_i2
I of "wire gas".
Definition: EDepInGas.h:76
double m_rho0
rho of wire+gas
Definition: EDepInGas.h:82
double m_rho1
rho of He-C2H6 gas
Definition: EDepInGas.h:72
double m_rho2
rho of "wire gas"
Definition: EDepInGas.h:77
double m_a1
A of He-C2H6 gas.
Definition: EDepInGas.h:70
double m_z2
Z of "wire gas".
Definition: EDepInGas.h:74
double m_z0
Z of wire+gas.
Definition: EDepInGas.h:79
double m_a0
A of wire+gas.
Definition: EDepInGas.h:80
double getMostProbabEDep(double p, double mass, double zi, double dx, double z, double a, double i, double rho) const
Return the energy deosite in the material.
Definition: EDepInGas.cc:229
double m_a2
A of "wire gas".
Definition: EDepInGas.h:75

◆ getInstance()

EDepInGas & getInstance ( )
static

Static method to get a reference to the EDepInGas instance.

Returns
A reference to an instance of this class.

Definition at line 23 of file EDepInGas.cc.

◆ getMostProbabEDep()

double getMostProbabEDep ( double  p,
double  mass,
double  zi,
double  dx,
double  z,
double  a,
double  i,
double  rho 
) const

Return the energy deosite in the material.

Parameters
pabsolute momentum (GeV)
masslmass of incoming particle (GeV)
ziz of incoming particle
dxthickness of material (cm)
zatomic number of material
aatomic weight of material
iionization potential of material (eV)
rhodensity of material

Definition at line 229 of file EDepInGas.cc.


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