EnergyLossVsDistance.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file EnergyLossVsDistance.h
3 // \brief Integrate energy losses to calculate deposit near a track end
4 // \author Christopher Backhouse - bckhouse@caltech.edu
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef CALIB_ENERGYLOSSVSDISTANCE_H
8 #define CALIB_ENERGYLOSSVSDISTANCE_H
9 
11 
12 class TF1;
13 class TGraph;
14 
15 #include <vector>
16 
17 namespace calib
18 {
19  /// \brief Integrate energy losses to calculate deposit near a track end
21  {
22  public:
23  /// \param bb Provider of energy loss calculation
24  /// \param localDensity Density of material energy is deposited in
25  /// in g/cm^3
26  /// \param bulkDensity Average density of material particle is travelling
27  /// through in g^cm^3
29  double localDensity, double bulkDensity);
30 
31  /// \param dist Distance from muon end point in cm
32  /// \return Mean energy loss in MeV/cm
33  double GetEnergyLoss(double dist) const;
34 
35  /// \return Mean energy loss in MeV/cm vs distance to end (negative cm)
36  TGraph* GetEnergyLossGraph() const;
37 
38  /// \return Function with one free scale parameter, the conversion from
39  /// MeV/cm to whatever you're fitting
40  TF1* GetTF1();
41 
42  struct x_pt{
43  x_pt(double _x, double ex) : x(_x), dEdx(ex) {}
44  double x, dEdx;
45  };
46 
47  protected:
48  double Eval(double* xs, double* pars);
49 
50  std::vector<x_pt> fX_pts;
51  };
52 }
53 
54 #endif
double GetEnergyLoss(double dist) const
double dist
Definition: runWimpSim.h:113
CDPStorage service.
EnergyLossVsDistance(IBetheBloch *bb, double localDensity, double bulkDensity)
std::string pars("Th23Dmsq32")
Integrate energy losses to calculate deposit near a track end.
double Eval(double *xs, double *pars)