GENFIT  Rev:NoNumberAvailable
MaterialProperties.cc
Go to the documentation of this file.
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "MaterialProperties.h"
21 
22 #include "IO.h"
23 
24 namespace genfit {
25 
26 bool operator== (const MaterialProperties& lhs, const MaterialProperties& rhs){
27  if (&lhs == &rhs)
28  return true;
29  if (lhs.density_ != rhs.density_ ||
30  lhs.Z_ != rhs.Z_ ||
31  lhs.A_ != rhs.A_ ||
33  lhs.mEE_ != rhs.mEE_)
34  return false;
35 
36  return true;
37 }
38 
39 bool operator!= (const MaterialProperties& lhs, const MaterialProperties& rhs) {
40  return !(lhs==rhs);
41 }
42 
43 
45  double& Z,
46  double& A,
47  double& radiationLength,
48  double& mEE) const {
49  density = density_;
50  Z = Z_;
51  A = A_;
52  radiationLength = radiationLength_;
53  mEE = mEE_;
54 }
55 
56 
57 void MaterialProperties::setMaterialProperties(const double& density,
58  const double& Z,
59  const double& A,
60  const double& radiationLength,
61  const double& mEE) {
62  density_ = density;
63  Z_ = Z;
64  A_ = A;
65  radiationLength_ = radiationLength;
66  mEE_ = mEE;
67 }
68 
69 
70 void MaterialProperties::Print(const Option_t*) const {
71  printOut << "Density = " << density_ << ", \t"
72  << "Z = " << Z_ << ", \t"
73  << "A = " << A_ << ", \t"
74  << "radiationLength = " << radiationLength_ << ", \t"
75  << "mEE = " << mEE_ << "\n";
76 }
77 
78 
79 } /* End of namespace genfit */
genfit::MaterialProperties::getMaterialProperties
void getMaterialProperties(double &density, double &Z, double &A, double &radiationLength, double &mEE) const
Definition: MaterialProperties.cc:44
genfit::MaterialProperties::setMaterialProperties
void setMaterialProperties(const double &density, const double &Z, const double &A, const double &radiationLength, const double &mEE)
Definition: MaterialProperties.cc:57
genfit::printOut
std::ostream printOut
genfit
Defines for I/O streams used for error and debug printing.
Definition: AbsFinitePlane.cc:22
genfit::MaterialProperties::density_
double density_
density of material
Definition: MaterialProperties.h:75
genfit::operator!=
bool operator!=(const DetPlane &lhs, const DetPlane &rhs)
Definition: DetPlane.cc:262
genfit::MaterialProperties::mEE_
double mEE_
mean excitation energy [eV]
Definition: MaterialProperties.h:83
IO.h
genfit::MaterialProperties::Print
void Print(const Option_t *="") const
Definition: MaterialProperties.cc:70
genfit::MaterialProperties::Z_
double Z_
Atomic number Z of material.
Definition: MaterialProperties.h:77
genfit::MaterialProperties::A_
double A_
Mass number A of material.
Definition: MaterialProperties.h:79
genfit::MaterialProperties::radiationLength_
double radiationLength_
radiation length X0
Definition: MaterialProperties.h:81
MaterialProperties.h
genfit::operator==
bool operator==(const DetPlane &lhs, const DetPlane &rhs)
Definition: DetPlane.cc:240
genfit::MaterialProperties
Material properties needed e.g. for material effects calculation.
Definition: MaterialProperties.h:35