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

GeoShield.h

Go to the documentation of this file.
00001 
00002 //
00003 // GeoShield
00004 //
00005 // GeoShield is a helper class used by GeoGeometry to manage the
00006 // grouping of detector shield planes into uber-volumes
00007 //
00008 // Author:  S. Kasahara 10/05
00010 
00011 #ifndef GEOSHIELD_H
00012 #define GEOSHIELD_H
00013 
00014 #include <map>
00015 #include <list>
00016 #include "TObject.h" // base class, in case we decide to persist
00017 #include "Plex/PlexPlaneId.h"
00018 
00019 class TGeoVolume;
00020 class UgliDbiSteelPln;
00021 class GeoShieldGroup;
00022 class GeoGeometry;
00023 
00024 class GeoShield : public TObject {
00025 
00026   friend class GeoGeometry; // constructs GeoShield
00027   
00028  public:
00029 
00030   // Typedefs and enumerations
00031   enum EGroupType {
00032     // Shield group. Every shield volume is assigned to only one group
00033     // and all shield volumes within a group are enclosed by a common
00034     // mother volume. 
00035     kFarInnerE, // Inner vertical(|) planes hugging east side of detector
00036     kFarInnerW, // Inner vertical(|) planes hugging west side of detector
00037     kFarOuterE, // Outer wall planes of both vertical(|) and slant(e) on east 
00038     kFarOuterW, // Outer wall planes of both vertical(|) and slant(w) on west 
00039     kFarTop,    // Planes of type -,/,\ overlaying top of detector
00040     kUnknown    
00041   };
00042 
00043   typedef std::map<EGroupType,GeoShieldGroup*>::iterator GroupMapItr;
00044   typedef std::map<EGroupType,GeoShieldGroup*>::const_iterator 
00045                                                            GroupMapConstItr;
00046   
00047   // Constructors/Destructors
00048   GeoShield() : fGeoGeometry(0) {} // def ctor
00049   virtual ~GeoShield(); // dtor
00050       
00051   // State testing methods
00052   std::list<const TGeoVolume*> GetListOfVolumes(EGroupType group) const;
00053   virtual void Print(Option_t* option="") const;
00054   static const char* AsString(EGroupType group);
00055 
00056   // State changing methods
00057   // add volume to group list, volume is not adopted
00058   EGroupType AddVolume(const TGeoVolume* volume, PlexPlaneId steelId,
00059                        const UgliDbiSteelPln* stRow); 
00060 
00061  protected:
00062 
00063   GeoShield(GeoGeometry* geo); // normal ctor invoked by friend GeoGeometry
00064   // invoked by GeoGeometry after all volumes added: 
00065   void BuildGroupNodes(TGeoVolume* hallVol); 
00066   
00067  private:
00068     
00069   // Disable copy and assignment ctor by making them private and w/no imp
00070   GeoShield(const GeoShield& that);
00071   GeoShield& operator=(const GeoShield& that);
00072   
00073   // list of shield volumes of each group type
00074   GeoGeometry* fGeoGeometry;  
00075   std::map<EGroupType, GeoShieldGroup* > fGroupMap;
00076   
00077   ClassDef(GeoShield,1)
00078 };
00079 
00080 #endif // GEOSHIELD_H

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