Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GeoMedium.h

Go to the documentation of this file.
00001 
00002 //
00003 // GeoMedium
00004 //
00005 // GeoMedium IsA TGeoMedium with additional data members to store medium
00006 // specific cut and process flags.
00007 //
00008 // Author:  S. Kasahara  01/2008
00010 
00011 #ifndef GEOMEDIUM_H
00012 #define GEOMEDIUM_H
00013 
00014 #include <TGeoMedium.h> // base class
00015 #include "Util/UtilMCFlag.h"  // data member
00016 #include "GeoGeometry/Geo.h" // argument
00017 
00018 class GeoMedium : public TGeoMedium {
00019 
00020  public:
00021 
00022    // typedefs and enumerations 
00023 
00024    typedef std::map<UtilMCFlag::EProcess,Int_t> ProcessMap;
00025    typedef ProcessMap::const_iterator ProcessMapConstItr;
00026    typedef ProcessMap::iterator ProcessMapItr;
00027 
00028    typedef std::map<UtilMCFlag::ECut,Double_t> CutMap;
00029    typedef CutMap::const_iterator CutMapConstItr;
00030    typedef CutMap::iterator CutMapItr;
00031    
00032    // Constructors/Destructors
00033    GeoMedium(); // def ctor, used by i/o
00034    // Normal constructors
00035    GeoMedium(const char* medname, Int_t medId, Int_t matId, Int_t isvol,
00036              Geo::ESwimMethod ifield, Double_t fieldm, Double_t tmaxfd,
00037              Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
00038    GeoMedium(const char* medname, Int_t medId, const TGeoMaterial* mat,
00039              Double_t* params = 0);
00040    virtual ~GeoMedium(); // dtor
00041 
00042    // State testing methods      
00043    static void PrintHeader(Option_t* option=""); // print media table header
00044    virtual void Print(Option_t* option="") const;
00045    const CutMap& GetCutMap() const { return fCutMap; }
00046    const ProcessMap& GetProcessMap() const { return fProcessMap; }
00047    
00048    // State testing methods       
00049    Double_t GetCut(UtilMCFlag::ECut cutflg) const;
00050    Int_t    GetProcess(UtilMCFlag::EProcess processflg) const;
00051    Double_t GetTracking(UtilMCFlag::ETracking trackingflg) const;
00052        
00053    // State changing methods
00054    void SetCut(UtilMCFlag::ECut cutflg, Double_t cutval) 
00055                                      { fCutMap[cutflg] = cutval; }
00056    void SetProcess(UtilMCFlag::EProcess processflg, Int_t processval)
00057                                      { fProcessMap[processflg] = processval; }
00058    void SetTracking(UtilMCFlag::ETracking trackingflg, Double_t trackingval);
00059        
00060  protected:
00061  
00062  private:
00063 
00064    // Data members.  
00065    ProcessMap fProcessMap;  // map of medium specific process flag/value pairs
00066    CutMap fCutMap;  // map of medium specific cut flag/value pairs
00067 
00068 ClassDef(GeoMedium,1)
00069 
00070 };
00071 #endif // GEOMEDIUM_H

Generated on Mon Feb 15 11:06:45 2010 for loon by  doxygen 1.3.9.1