DD4hep  01.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
IMaterial.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : F.Gaede
11 //
12 //==========================================================================
13 #ifndef DDREC_IMATERIAL_H
14 #define DDREC_IMATERIAL_H
15 
16 #include <string>
17 #include <ostream>
18 
19 namespace dd4hep { namespace rec {
20 
28  class IMaterial {
29 
30  protected:
32  IMaterial& operator=(const IMaterial&) { return *this; }
33 
34  public:
35 
37  virtual ~IMaterial() {}
38 
40  virtual std::string name() const =0 ;
41 
43  virtual double A() const =0 ;
44 
46  virtual double Z() const =0 ;
47 
49  virtual double density() const =0 ;
50 
52  virtual double radiationLength() const =0 ;
53 
55  virtual double interactionLength() const =0 ;
56 
57  };
58 
60  inline std::ostream& operator<<( std::ostream& os , const IMaterial& m ) {
61 
62  os << " " << m.name() << ", A: " << m.A() << ", Z: " << m.Z() << ", density: " << m.density() << ", radiationLength: " << m.radiationLength()
63  << ", interactionLength: " << m.interactionLength() ;
64 
65  return os ;
66  }
67 
68  } } /* namespace rec */
69 
70 
71 
72 #endif // DDREC_IMATERIAL_H
std::ostream & operator<<(std::ostream &io, const FixedPadSizeTPCData &d)
STL class.
virtual ~IMaterial()
Destructor.
Definition: IMaterial.h:37
virtual double Z() const =0
averaged proton number
virtual double radiationLength() const =0
radiation length - units ?
virtual double interactionLength() const =0
interaction length - units ?
virtual std::string name() const =0
material name
virtual double A() const =0
averaged atomic number
IMaterial & operator=(const IMaterial &)
Assignment operator.
Definition: IMaterial.h:32
virtual double density() const =0
density - units ?
STL class.
Interface for material description for tracking.
Definition: IMaterial.h:28