Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:25

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : F.Gaede
0011 //
0012 //==========================================================================
0013 #ifndef DDREC_IMATERIAL_H
0014 #define DDREC_IMATERIAL_H
0015 
0016 #include <string>
0017 #include <ostream>
0018 
0019 namespace dd4hep { namespace rec {
0020   
0021   /** Interface for material description for tracking. 
0022    *
0023    * @author F.Gaede, DESY
0024    * @version $Id$
0025    * @date Apr 6 2014
0026    */
0027   
0028   class IMaterial {
0029 
0030   protected:    
0031     /// Assignment operator
0032     IMaterial& operator=(const IMaterial&) { return *this; }
0033     
0034   public:
0035     
0036     /// Destructor
0037     virtual ~IMaterial() {}
0038 
0039     /// material name
0040     virtual std::string name() const =0 ;
0041 
0042     /// averaged atomic number
0043     virtual double A() const =0 ;
0044 
0045     /// averaged proton number
0046     virtual double Z() const =0 ;
0047     
0048     /// density - units ?
0049     virtual double density() const =0 ;
0050     
0051     /// radiation length - units ?
0052     virtual double radiationLength() const =0 ;
0053     
0054     /// interaction length - units ?
0055     virtual double interactionLength() const =0 ;
0056 
0057   };
0058 
0059  /// dump IMaterial operator 
0060   inline std::ostream& operator<<( std::ostream& os , const IMaterial& m ) {
0061 
0062     os << "  " << m.name() << ", A: " << m.A()  << ", Z: " << m.Z() << ", density: " << m.density() << ", radiationLength: " <<  m.radiationLength() 
0063        << ", interactionLength: " << m.interactionLength() ;
0064 
0065     return os ;
0066   }
0067 
0068   } } /* namespace rec */
0069 
0070 
0071 
0072 #endif // DDREC_IMATERIAL_H