00001
00003 #ifndef DETDESC_ELEMENT_H
00004 #define DETDESC_ELEMENT_H 1
00006 #include <vector>
00008 #include "DetDesc/Material.h"
00009 #include "DetDesc/CLIDElement.h"
00010
00012 class Isotope;
00013
00023 class Element : virtual public Material
00024 {
00025 public:
00027 typedef std::pair<double,SmartRef<Isotope> > Entry ;
00028 typedef std::vector<Entry> Isotopes ;
00030 public:
00032 Element( const std::string& name = "" ,
00033 const std::string& symb = "??" ,
00034 const double a = 0 ,
00035 const double z = 0 ,
00036 const double i = 0 ,
00037 const double density = 0 ,
00038 const double rl = 0 ,
00039 const double al = 0 ,
00040 const double temp = Gaudi::Units::STP_Temperature,
00041 const double press = Gaudi::Units::STP_Pressure,
00042 const eState s = stateUndefined );
00043
00044 virtual ~Element();
00046 virtual inline const CLID& clID () const { return Element::classID() ; };
00047 static const CLID& classID () { return CLID_Element ; };
00050 inline const std::string & symbol () const { return m_symb ; }
00051 inline void setSymbol (const std::string& S ) { m_symb = S; }
00053 int nOfIsotopes() const;
00055 const SmartRef<Isotope>& isotope ( unsigned int i ) const;
00056 SmartRef<Isotope>& isotope ( unsigned int i ) ;
00058 const Isotopes& isotopes () const ;
00059 Isotopes& isotopes () ;
00061 double isotopeFraction( unsigned int i ) const;
00062
00069 void addIsotope ( const SmartRef<Isotope>& iPtr ,
00070 const double Fract , const bool comp = false );
00071 void addIsotope ( const Entry& iPtr , const bool comp = false );
00072
00076 void removeIsotope ( const SmartRef<Isotope>& iPtr , const bool comp = false );
00077
00079 virtual inline double A() const;
00080 virtual inline void setA( const double value ) ;
00082 virtual inline double Z() const;
00083 virtual inline void setZ( const double value );
00085 virtual inline double I() const;
00086 virtual inline void setI( const double value );
00088 virtual inline double C() const;
00089 virtual inline void setC( const double value);
00090 virtual inline double a() const;
00091 virtual inline void seta( const double value);
00092 virtual inline double m() const;
00093 virtual inline void setm( const double value);
00094 virtual inline double X0() const;
00095 virtual inline void setX0( const double value);
00096 virtual inline double X1() const;
00097 virtual inline void setX1( const double value);
00099 virtual inline double N() const;
00101 inline double coulombFactor() const ;
00103 inline double tsaiFactor () const ;
00105
00107 void compute();
00109 void ComputeCoulombFactor ();
00111 void ComputeLradTsaiFactor ();
00112
00114 void ComputeInteractionLength();
00115
00117 void ComputeRadiationLength();
00118
00120 void ComputeMeanExcitationEnergy();
00121
00123 void ComputeDensityEffect();
00124
00125
00127 virtual std::ostream& fillStream ( std::ostream& s ) const ;
00129 virtual MsgStream& fillStream ( MsgStream& s ) const ;
00131 private:
00133 double m_Aeff;
00135 double m_Zeff;
00136
00137 double m_Ieff;
00138
00139 double m_C;
00140 double m_a;
00141 double m_m;
00142 double m_X0;
00143 double m_X1;
00145 Isotopes m_isotopes;
00147 double m_coulomb;
00149 double m_tsai;
00151 std::string m_symb;
00152 };
00154 #include "DetDesc/Element.icpp"
00156
00157 #endif // DETDESC_MATERIAL_ELEMENT_H
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167