41 bool assert_flag =
false;
42 assert((assert_flag =
true, assert_flag));
44 std::cerr <<
"Assert is disabled" <<
std::endl;
56 std::cout <<
"Density = " << detprop.Density() <<
" g/cm^3" <<
std::endl;
57 std::cout <<
"Drift velocity = " << detprop.DriftVelocity() <<
" cm/usec" <<
std::endl;
58 std::cout <<
"Efield = " << detprop.Efield() <<
" kV/cm" <<
std::endl;
59 std::cout <<
"Temperature = " << detprop.Temperature() <<
" Kelvin" <<
std::endl;
60 std::cout <<
"Electron lifetime = " << detprop.ElectronLifetime() <<
" usec" <<
std::endl;
62 std::cout <<
"Radiation Length = " << larprop->
RadiationLength() / detprop.Density() <<
" cm" 67 assert(detprop.Density() == detprop.Density(detprop.Temperature()));
68 assert(detprop.Density() != detprop.Density(detprop.Temperature() + 0.1));
69 assert(detprop.DriftVelocity() == detprop.DriftVelocity(detprop.Efield()));
70 assert(detprop.DriftVelocity() ==
71 detprop.DriftVelocity(detprop.Efield(), detprop.Temperature()));
75 std::cout <<
"\nDrift Velocity vs. Electric Field.\n" 76 <<
" E (kV/cm) v (cm/us)" << std::fixed <<
std::endl;
77 for (
int i = 0; i < 3; ++i) {
83 double v = detprop.DriftVelocity(e);
92 "http://pdg.lbl.gov/2011/AtomicNuclearProperties/MUON_ELOSS_TABLES/muonloss_289.dat\n" 95 double mass = 0.10565839;
97 1.0, 1.2, 1.4, 1.7, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 7.0, 8.0, 9.0};
99 std::ios_base::fmtflags flags = std::cout.
flags();
100 std::cout <<
" T p Ionization dE/dx|_R\n" 101 <<
" [MeV] [MeV/c] ---[MeV cm^2/g]----\n" 106 for (
double tbase = 1.; tbase <= 1.e9; tbase *= 10.) {
107 for (
int i = 0; i < 16; ++i) {
111 double t = tbase * fact[i];
116 double p = std::sqrt(1.
e-6 * t * t + 2.
e-3 * t * mass);
120 double dedxr = detprop.Eloss(p, mass, 0.05) / detprop.Density();
121 double dedx = detprop.Eloss(p, mass, 0.) / detprop.Density();
126 std::cout.
flags(flags);
Namespace for general, non-LArSoft-specific utilities.
void analyze(const art::Event &evt) override
LArPropTest(fhicl::ParameterSet const &pset)
EDAnalyzer(fhicl::ParameterSet const &pset)
Q_EXPORT QTSManip setprecision(int p)
#define DEFINE_ART_MODULE(klass)
Q_EXPORT QTSManip setw(int w)
virtual double RadiationLength() const =0
QTextStream & endl(QTextStream &s)