Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:02

0001 // $Id: $
0002 
0003 /*!
0004  * \file PHG4GDMLConfig.hh
0005  * \brief 
0006  * \author Jin Huang <jhuang@bnl.gov>
0007  * \version $Revision:   $
0008  * \date $Date: $
0009  */
0010 
0011 #ifndef SIMULATION_CORESOFTWARE_SIMULATION_G4SIMULATION_G4GDML_PHG4GDMLCONFIG_HH_
0012 #define SIMULATION_CORESOFTWARE_SIMULATION_G4SIMULATION_G4GDML_PHG4GDMLCONFIG_HH_
0013 
0014 #include <phool/PHObject.h>
0015 
0016 #include <iostream>  // for operator<<, basic_ostream, basic_ostream...
0017 #include <set>
0018 
0019 class G4VPhysicalVolume;
0020 class G4LogicalVolume;
0021 
0022 /*!
0023  * \brief PHG4GDMLConfig
0024  */
0025 class PHG4GDMLConfig : public PHObject
0026 {
0027  public:
0028   PHG4GDMLConfig() {}
0029   virtual ~PHG4GDMLConfig() {}
0030 
0031   virtual void Reset()
0032   {
0033     excluded_physical_vol.clear();
0034     excluded_logical_vol.clear();
0035   }
0036   virtual int isValid() const { return 1; }
0037   virtual void identify(std::ostream &os = std::cout) const
0038   {
0039     os << "PHG4GDMLConfig with " << excluded_physical_vol.size() << "excluded physical volume and "
0040               << excluded_logical_vol.size() << " excluded logical volume" << std::endl;
0041   }
0042 
0043   void exclude_physical_vol(const G4VPhysicalVolume *vol) { excluded_physical_vol.insert(vol); }
0044   void exclude_logical_vol(const G4LogicalVolume *vol) { excluded_logical_vol.insert(vol); }
0045   const std::set<const G4VPhysicalVolume *> &get_excluded_physical_vol() const { return excluded_physical_vol; }
0046   const std::set<const G4LogicalVolume *> &get_excluded_logical_vol() const { return excluded_logical_vol; }
0047 
0048  private:
0049   std::set<const G4VPhysicalVolume *> excluded_physical_vol;
0050   std::set<const G4LogicalVolume *> excluded_logical_vol;
0051 };
0052 
0053 #endif /* SIMULATION_CORESOFTWARE_SIMULATION_G4SIMULATION_G4GDML_PHG4GDMLCONFIG_HH_ */