Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
calib::BetheBlochAnalytic Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/Calibration/func/BetheBloch.h"

Inheritance diagram for calib::BetheBlochAnalytic:
calib::IBetheBloch

Public Member Functions

 BetheBlochAnalytic (Material mat)
 
virtual double dEdx (double T) const
 
virtual double MPV (double T, double dist, double localDensity) const
 
virtual double MIP () const
 
TGraph * GetdEdxGraph (double localDensity) const
 
TGraph * GetMPVGraph (double localDensity, double dist) const
 

Protected Member Functions

void BetaGamma (double T, double &beta, double &gamma) const
 Relativity. More...
 
double Delta (double betagamma) const
 Density term. More...
 

Protected Attributes

double ZA
 
double I
 
double a
 
double k
 
double x0
 
double x1
 
double Cbar
 

Detailed Description

Definition at line 67 of file BetheBloch.h.

Constructor & Destructor Documentation

calib::BetheBlochAnalytic::BetheBlochAnalytic ( Material  mat)

Definition at line 128 of file BetheBloch.cxx.

References a, ana::assert(), calib::kPolyethylene, and x1.

129  {
130  switch(mat){
131  case kPolyethylene:
132  // Numbers from the header of http://pdg.lbl.gov/2010/AtomicNuclearProperties/MUON_ELOSS_TABLES/muonloss_221.dat
133  ZA = 0.57034; // Z/A
134  I = 57.4; // eV
135  a = 0.1211;
136  k = 3.4292;
137  x0 = 0.1489;
138  x1 = 2.5296;
139  Cbar = 3.0563;
140  break;
141  default:
142  assert(0 && "Unkown material");
143  }
144  }
assert(nhit_max >=nhit_nbins)
Eigen::MatrixXd mat

Member Function Documentation

void calib::BetheBlochAnalytic::BetaGamma ( double  T,
double &  beta,
double &  gamma 
) const
protected

Relativity.

Definition at line 204 of file BetheBloch.cxx.

References calib::Mmu, and std::sqrt().

Referenced by MIP().

205  {
206  gamma = (T+Mmu)/Mmu;
207  beta = sqrt(1-1/(gamma*gamma));
208  }
T sqrt(T number)
Definition: d0nt_math.hpp:156
Double_t beta
const double Mmu
Definition: BetheBloch.cxx:26
double T
Definition: Xdiff_gwt.C:5
double calib::BetheBlochAnalytic::dEdx ( double  T) const
virtual
Parameters
TKinetic energy in MeV
Returns
Mean energy loss in MeV/g cm^2

Implements calib::IBetheBloch.

Definition at line 147 of file BetheBloch.cxx.

References beta, calib::IBetheBloch::dEdx(), delta, MakeMiniprodValidationCuts::f, test_ParserArtEvents::log, util::sqr(), and sqr().

148  {
149  using util::sqr;
150 
151  T *= 1e6; // Convert to eV
152 
153  double beta, gamma;
154  BetaGamma(T, beta, gamma);
155 
156  const double f = 2*Me*sqr(beta*gamma);
157 
158  const double Tmax = f/(1+2*gamma*Me/Mmu+sqr(Me/Mmu));
159 
160  const double delta = Delta(beta*gamma);
161 
162  const double dEdx = K*ZA/sqr(beta)*(log(f*Tmax/(sqr(I)))/2-sqr(beta)-delta/2);
163 
164  return dEdx;
165  }
double delta
Definition: runWimpSim.h:98
virtual double dEdx(double T) const
Definition: BetheBloch.cxx:147
Double_t beta
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
const double Mmu
Definition: BetheBloch.cxx:26
void BetaGamma(double T, double &beta, double &gamma) const
Relativity.
Definition: BetheBloch.cxx:204
T sqr(T x)
Function to perform, and table to cache, timing fits to ADC values.
Definition: ADCShapeFit.cxx:23
const double K
Definition: BetheBloch.cxx:28
double T
Definition: Xdiff_gwt.C:5
const double Me
Definition: BetheBloch.cxx:25
double Delta(double betagamma) const
Density term.
Definition: BetheBloch.cxx:211
double calib::BetheBlochAnalytic::Delta ( double  betagamma) const
protected

Density term.

Definition at line 211 of file BetheBloch.cxx.

References a, delta, test_ParserArtEvents::log, std::log10(), cet::pow(), submit_syst::x, and x1.

212  {
213  double delta = 0;
214  const double x = log10(betagamma);
215  if(x > x0){
216  delta += 2*log(10)*x-Cbar;
217  if(x < x1) delta += a*pow(x1-x, k);
218  }
219  return delta;
220  }
double delta
Definition: runWimpSim.h:98
constexpr T pow(T x)
Definition: pow.h:75
T log10(T number)
Definition: d0nt_math.hpp:120
TGraph * calib::IBetheBloch::GetdEdxGraph ( double  localDensity) const
inherited
Parameters
locaDensityDensity of material in g/cm^3
Returns
Mean dE/dx in MeV/cm vs. kinetic energy in MeV

Definition at line 33 of file BetheBloch.cxx.

References calib::IBetheBloch::dEdx(), runNovaSAM::ret, and T.

Referenced by calib::BetheBlochFit::endJob(), and calib::IBetheBloch::MPV().

34  {
35  TGraph* ret = new TGraph;
36  // 1MeV to 100GeV
37  for(double T = 1; T < 1e5; T *= 1.05){
38  ret->SetPoint(ret->GetN(), T, dEdx(T)*localDensity);
39  }
40 
41  return ret;
42  }
virtual double dEdx(double T) const =0
double T
Definition: Xdiff_gwt.C:5
TGraph * calib::IBetheBloch::GetMPVGraph ( double  localDensity,
double  dist 
) const
inherited
Parameters
localDensityDensity of material in g/cm^3
distThickness of each layer in cm
Returns
Most probable dE/dx in MeV/cm vs. KE in MeV

Definition at line 45 of file BetheBloch.cxx.

References dist, calib::IBetheBloch::MPV(), runNovaSAM::ret, and T.

Referenced by calib::BetheBlochFit::endJob(), and calib::IBetheBloch::MPV().

46  {
47  TGraph* ret = new TGraph;
48  // 1MeV to 100GeV
49  for(double T = 1; T < 1e5; T *= 1.05){
50  ret->SetPoint(ret->GetN(), T,
51  MPV(T, dist, localDensity)*localDensity/dist);
52  }
53 
54  return ret;
55  }
virtual double MPV(double T, double dist, double localDensity) const
Definition: BetheBloch.h:31
double dist
Definition: runWimpSim.h:113
double T
Definition: Xdiff_gwt.C:5
double calib::BetheBlochAnalytic::MIP ( ) const
virtual
Returns
Mean energy loss of mininum ionizing particle in MeV/g cm^2

Implements calib::IBetheBloch.

Definition at line 191 of file BetheBloch.cxx.

References BetaGamma(), calib::IBetheBloch::dEdx(), make_cached_def::e2, m, and T.

192  {
193  double mip = 1e20;
194  // Between 100 MeV and 1GeV, with 0.1% accuracy
195  for(double T = 1e2; T < 1e3; T *= 1.001){
196  const double m = dEdx(T);
197  if(m < mip) mip = m;
198  }
199  return mip;
200  }
virtual double dEdx(double T) const
Definition: BetheBloch.cxx:147
double T
Definition: Xdiff_gwt.C:5
double calib::BetheBlochAnalytic::MPV ( double  T,
double  dist,
double  localDensity 
) const
virtual
Parameters
TKinetic energy in MeV
distThickness of the layer in cm
localDensityDensity of the layer in g/cm^3
Returns
Most probable energy loss in MeV/g cm^3

Reimplemented from calib::IBetheBloch.

Definition at line 168 of file BetheBloch.cxx.

References beta, delta, MakeMiniprodValidationCuts::f, test_ParserArtEvents::log, util::sqr(), sqr(), and submit_syst::x.

170  {
171  using util::sqr;
172 
173  const double x = dist*localDensity;
174 
175  T *= 1e6; // Convert to eV
176 
177  double beta, gamma;
178  BetaGamma(T, beta, gamma);
179 
180  const double f = 2*Me*sqr(beta*gamma);
181 
182  const double delta = Delta(beta*gamma);
183 
184  const double xi = K/2*ZA/sqr(beta)*x;
185  const double mpv = xi*(log(f/I)+log(1e6*xi/I)+j-sqr(beta)-delta);
186 
187  return mpv;
188  }
double delta
Definition: runWimpSim.h:98
Double_t beta
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
void BetaGamma(double T, double &beta, double &gamma) const
Relativity.
Definition: BetheBloch.cxx:204
double dist
Definition: runWimpSim.h:113
const double j
Definition: BetheBloch.cxx:29
T sqr(T x)
Function to perform, and table to cache, timing fits to ADC values.
Definition: ADCShapeFit.cxx:23
const double K
Definition: BetheBloch.cxx:28
double T
Definition: Xdiff_gwt.C:5
const double Me
Definition: BetheBloch.cxx:25
double Delta(double betagamma) const
Density term.
Definition: BetheBloch.cxx:211

Member Data Documentation

double calib::BetheBlochAnalytic::a
protected
double calib::BetheBlochAnalytic::Cbar
protected

Definition at line 87 of file BetheBloch.h.

double calib::BetheBlochAnalytic::I
protected

Definition at line 84 of file BetheBloch.h.

double calib::BetheBlochAnalytic::k
protected

Definition at line 87 of file BetheBloch.h.

double calib::BetheBlochAnalytic::x0
protected
double calib::BetheBlochAnalytic::x1
protected

Definition at line 87 of file BetheBloch.h.

double calib::BetheBlochAnalytic::ZA
protected

Definition at line 84 of file BetheBloch.h.


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