Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMaterial.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DMaterial.cc
4 // Created: Fri Apr 25 15:44:12 EDT 2008
5 // Creator: davidl (on Darwin swire-d95.jlab.org 8.11.1 i386)
6 //
7 
8 #include <sstream>
9 using namespace std;
10 
11 #include "DMaterial.h"
12 
13 //---------------------------------
14 // DMaterial (Constructor)
15 //---------------------------------
16 DMaterial::DMaterial(string &name, double A, double Z, double density, double radlen)
17 {
18  this->kname = name;
19  this->kA = A;
20  this->kZ = Z;
21  this->kdensity = density;
22  this->kXo = radlen;
23 
24  last_ptype = Unknown;
25  last_p = -1.0;
26  last_dEdx = -1.0;
27 }
28 
29 //---------------------------------
30 // toString
31 //---------------------------------
32 string DMaterial::toString(void)
33 {
34  stringstream ss;
35  ss<<"DMaterial: "<<kname<<endl;
36  ss<<"============================"<<endl;
37  ss<<"name: "<<kname<<endl;
38  ss<<"A: "<<kA<<" g/mol"<<endl;
39  ss<<"Z: "<<kZ<<endl;
40  ss<<"density: "<<kdensity<<" g/cm^3"<<endl;
41  ss<<"radlen: "<<kXo<<" g/cm^2"<<endl;
42  ss<<endl;
43 
44  return ss.str();
45 }
46 
47 //---------------------------------
48 // GetdEdx
49 //---------------------------------
50 double DMaterial::GetdEdx(Particle_t ptype, double p)
51 {
52 
53  return 0.0;
54 }
string toString(void)
Definition: DMaterial.cc:32
double GetdEdx(Particle_t ptype, double kp)
Definition: DMaterial.cc:50
DMaterial()
Prevent use of trivial constructor.
Particle_t
Definition: particleType.h:12