GeoMedium Class Reference

#include <GeoMedium.h>

List of all members.

Public Types

typedef std::map
< UtilMCFlag::EProcess, Int_t > 
ProcessMap
typedef ProcessMap::const_iterator ProcessMapConstItr
typedef ProcessMap::iterator ProcessMapItr
typedef std::map
< UtilMCFlag::ECut, Double_t > 
CutMap
typedef CutMap::const_iterator CutMapConstItr
typedef CutMap::iterator CutMapItr

Public Member Functions

 GeoMedium ()
 GeoMedium (const char *medname, Int_t medId, Int_t matId, Int_t isvol, Geo::ESwimMethod ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin)
 GeoMedium (const char *medname, Int_t medId, const TGeoMaterial *mat, Double_t *params=0)
virtual ~GeoMedium ()
virtual void Print (Option_t *option="") const
const CutMapGetCutMap () const
const ProcessMapGetProcessMap () const
Double_t GetCut (UtilMCFlag::ECut cutflg) const
Int_t GetProcess (UtilMCFlag::EProcess processflg) const
Double_t GetTracking (UtilMCFlag::ETracking trackingflg) const
void SetCut (UtilMCFlag::ECut cutflg, Double_t cutval)
void SetProcess (UtilMCFlag::EProcess processflg, Int_t processval)
void SetTracking (UtilMCFlag::ETracking trackingflg, Double_t trackingval)

Static Public Member Functions

static void PrintHeader (Option_t *option="")

Private Attributes

ProcessMap fProcessMap
CutMap fCutMap

Detailed Description

Definition at line 18 of file GeoMedium.h.


Member Typedef Documentation

typedef std::map<UtilMCFlag::ECut,Double_t> GeoMedium::CutMap

Definition at line 28 of file GeoMedium.h.

typedef CutMap::const_iterator GeoMedium::CutMapConstItr

Definition at line 29 of file GeoMedium.h.

typedef CutMap::iterator GeoMedium::CutMapItr

Definition at line 30 of file GeoMedium.h.

Definition at line 24 of file GeoMedium.h.

typedef ProcessMap::const_iterator GeoMedium::ProcessMapConstItr

Definition at line 25 of file GeoMedium.h.

typedef ProcessMap::iterator GeoMedium::ProcessMapItr

Definition at line 26 of file GeoMedium.h.


Constructor & Destructor Documentation

GeoMedium::GeoMedium (  ) 

Definition at line 45 of file GeoMedium.cxx.

References Msg::kVerbose, and MSG.

00045                      {
00046   // Default constructor. 
00047 
00048   MSG("Geo",Msg::kVerbose) << "GeoMedium default ctor @ " << this << endl;
00049 
00050 }

GeoMedium::GeoMedium ( const char *  medname,
Int_t  medId,
Int_t  matId,
Int_t  isvol,
Geo::ESwimMethod  ifield,
Double_t  fieldm,
Double_t  tmaxfd,
Double_t  stemax,
Double_t  deemax,
Double_t  epsil,
Double_t  stmin 
)

Definition at line 21 of file GeoMedium.cxx.

References Msg::kVerbose, and MSG.

00024                                                      : 
00025   TGeoMedium(medname,medId,matId,isvol,ifield,fieldm,tmaxfd,stemax,
00026              deemax,epsil,stmin) {
00027   // Normal constructor. 
00028 
00029   MSG("Geo",Msg::kVerbose) << "GeoMedium normal ctor @ " << this
00030                            << " for " << medname << "." << endl;
00031 
00032 }

GeoMedium::GeoMedium ( const char *  medname,
Int_t  medId,
const TGeoMaterial *  mat,
Double_t *  params = 0 
)

Definition at line 35 of file GeoMedium.cxx.

References Msg::kVerbose, and MSG.

00036                                        : TGeoMedium(medname,medId,mat,params) {
00037   // Normal constructor. 
00038 
00039   MSG("Geo",Msg::kVerbose) << "GeoMedium normal ctor @ " << this
00040                            << " for " << medname << endl;
00041 
00042 }

GeoMedium::~GeoMedium (  )  [virtual]

Definition at line 53 of file GeoMedium.cxx.

References Msg::kVerbose, and MSG.

00053                       {
00054   // Destructor. 
00055 
00056   MSG("Geo",Msg::kVerbose) << "GeoMedium destructor @ " << this << endl;
00057 
00058 }


Member Function Documentation

Double_t GeoMedium::GetCut ( UtilMCFlag::ECut  cutflg  )  const

Definition at line 131 of file GeoMedium.cxx.

References fCutMap, and Munits::second.

00131                                                       {
00132   // Get medium specific cut value corresponding to cutflg.  
00133   // Return -1 if not in map.
00134   
00135   CutMapConstItr citr = fCutMap.find(cutflg);
00136   if ( citr != fCutMap.end() ) return citr -> second;
00137   else return -1;
00138   
00139 }

const CutMap& GeoMedium::GetCutMap (  )  const [inline]

Definition at line 45 of file GeoMedium.h.

References fCutMap.

Referenced by Print().

00045 { return fCutMap; }

Int_t GeoMedium::GetProcess ( UtilMCFlag::EProcess  processflg  )  const

Definition at line 142 of file GeoMedium.cxx.

References fProcessMap, and Munits::second.

00142                                                                {
00143   // Get medium specific process value corresponding to processflg.
00144   // Return -1 if not in map. 
00145   
00146   ProcessMapConstItr citr = fProcessMap.find(processflg);
00147   if ( citr != fProcessMap.end() ) return citr -> second;
00148   else return -1;
00149 
00150 }

const ProcessMap& GeoMedium::GetProcessMap (  )  const [inline]

Definition at line 46 of file GeoMedium.h.

References fProcessMap.

Referenced by Print().

00046 { return fProcessMap; }

Double_t GeoMedium::GetTracking ( UtilMCFlag::ETracking  trackingflg  )  const

Definition at line 153 of file GeoMedium.cxx.

References bfld::AsString(), UtilMCFlag::kUnknownTracking, Msg::kWarning, and MSG.

00153                                                                      {
00154   // Get medium specific tracking value corresponding to trackingflg.
00155   // Return -1 if unknown.
00156 
00157   if ( trackingflg == UtilMCFlag::kUnknownTracking ) {
00158     MSG("Geo",Msg::kWarning) 
00159        << "GeoMedium::GetTracking called with trackingflg "
00160        << UtilMCFlag::AsString(trackingflg) << "." << endl;
00161     return -1;
00162   }
00163   
00164   return GetParam(trackingflg);
00165 
00166 }

void GeoMedium::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 95 of file GeoMedium.cxx.

References bfld::AsString(), GetCutMap(), Nav::GetName(), and GetProcessMap().

00095                                                   {
00096   // Print medium.
00097 
00098   cout << setiosflags(ios::left) << setw(27) << GetName() 
00099        << setw(19) << GetMaterial()->GetName() 
00100        << setw(6)  << GetParam(0) // isvol
00101        << setw(5)  << GetParam(1) // ifield
00102        << setw(5)  << GetParam(2) // fieldm
00103        << setw(7)  << GetParam(3) // tmaxfd
00104        << setw(7)  << GetParam(4) // stemax
00105        << setw(7)  << GetParam(5) // deemax
00106        << setw(6)  << GetParam(6) // epsil
00107        << setw(6)  << GetParam(7); // stmin
00108   
00109   Int_t nflag = 0;
00110   const ProcessMap& processmap = GetProcessMap();
00111   for ( ProcessMapConstItr citr  = processmap.begin(); 
00112                            citr != processmap.end(); citr++ ) {
00113     if ( nflag%6 == 0 && nflag != 0 ) cout << "\n" << setw(95) << " ";
00114     cout << setw(5) << UtilMCFlag::AsString(citr->first) 
00115          << setw(2) << citr->second;
00116     nflag++;
00117   }
00118 
00119   const CutMap& cutmap = GetCutMap();
00120   for ( CutMapConstItr citr = cutmap.begin(); citr != cutmap.end(); citr++ ) {
00121     if ( nflag%3 == 0 && nflag !=0 ) cout << "\n" << setw(95) << " ";
00122     cout << setw(7) << UtilMCFlag::AsString(citr->first) 
00123          << setw(7) << citr->second;
00124     nflag++;
00125   }
00126   cout << endl;
00127   
00128 }

void GeoMedium::PrintHeader ( Option_t *  option = ""  )  [static]

Definition at line 61 of file GeoMedium.cxx.

00061                                                   {
00062   // Static method to Print media table header.
00063 
00064     cout << setiosflags(ios::left) << setfill(' ') 
00065          << "Medium specific physics process & cut flags are listed after "
00066          << "medium definition if appropriate." << endl;  
00067     cout << setiosflags(ios::left) << setw(27) << "Medium" 
00068          << setw(19)  << "Material" 
00069          << setw(6)   << "isvol"
00070          << setw(5)   << "ifld"
00071          << setw(5)   << "fldm"
00072          << setw(7)   << "tmaxfd"
00073          << setw(7)   << "stemax"
00074          << setw(7)   << "deemax"
00075          << setw(6)   << "epsil"
00076          << setw(6)   << "stmin"
00077          << endl;
00078     cout << setiosflags(ios::left) 
00079          << setfill('-') <<  setw(6) << "-" << setfill(' ') << setw(21) << " "
00080          << setfill('-') <<  setw(8) << "-" << setfill(' ') << setw(11) << " "
00081          << setfill('-') <<  setw(5) << "-" << setfill(' ') << setw(1) << " "
00082          << setfill('-') <<  setw(4) << "-" << setfill(' ') << setw(1) << " "
00083          << setfill('-') <<  setw(4) << "-" << setfill(' ') << setw(1) << " "
00084          << setfill('-') <<  setw(6) << "-" << setfill(' ') << setw(1) << " "
00085          << setfill('-') <<  setw(6) << "-" << setfill(' ') << setw(1) << " "
00086          << setfill('-') <<  setw(6) << "-" << setfill(' ') << setw(1) << " "
00087          << setfill('-') <<  setw(5) << "-" << setfill(' ') << setw(1) << " "
00088          << setfill('-') <<  setw(5) << "-" << setfill(' ') << setw(1) << " "
00089          << endl;
00090   
00091 }

void GeoMedium::SetCut ( UtilMCFlag::ECut  cutflg,
Double_t  cutval 
) [inline]

Definition at line 54 of file GeoMedium.h.

References fCutMap.

00055                                      { fCutMap[cutflg] = cutval; }

void GeoMedium::SetProcess ( UtilMCFlag::EProcess  processflg,
Int_t  processval 
) [inline]

Definition at line 56 of file GeoMedium.h.

References fProcessMap.

00057                                      { fProcessMap[processflg] = processval; }

void GeoMedium::SetTracking ( UtilMCFlag::ETracking  trackingflg,
Double_t  trackingval 
)

Definition at line 169 of file GeoMedium.cxx.

References bfld::AsString(), Nav::GetName(), Msg::kDebug, UtilMCFlag::kUnknownTracking, Msg::kWarning, and MSG.

00170                                                {
00171   // Set tracking value associated with trackingflg
00172 
00173   if ( trackingflg == UtilMCFlag::kUnknownTracking ) {
00174     MSG("Geo",Msg::kWarning)
00175       << "GeoMedium::SetTracking called with trackingflg "
00176       << UtilMCFlag::AsString(trackingflg) << "." << endl;
00177     return;
00178   }
00179   if ( GetParam(trackingflg) != tracking ) {
00180     MSG("Geo",Msg::kDebug)
00181       << "Medium tracking parameter " << UtilMCFlag::AsString(trackingflg) 
00182       << " set to " << tracking << " for medium " << GetName()
00183       << " overriding existing " << GetParam(trackingflg) << "." << endl;    
00184   }
00185   
00186   SetParam(trackingflg,tracking);
00187   
00188 }


Member Data Documentation

Definition at line 66 of file GeoMedium.h.

Referenced by GetCut(), GetCutMap(), and SetCut().

Definition at line 65 of file GeoMedium.h.

Referenced by GetProcess(), GetProcessMap(), and SetProcess().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1