Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:52

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4SPACALDISPLAYACTION_H
0004 #define G4DETECTORS_PHG4SPACALDISPLAYACTION_H
0005 
0006 #include <g4main/PHG4DisplayAction.h>
0007 
0008 #include <map>
0009 #include <string>
0010 #include <vector>
0011 
0012 class G4VisAttributes;
0013 class G4LogicalVolume;
0014 class G4VPhysicalVolume;
0015 class PHG4CylinderGeom_Spacalv1;
0016 
0017 class PHG4SpacalDisplayAction : public PHG4DisplayAction
0018 {
0019  public:
0020   explicit PHG4SpacalDisplayAction(const std::string &name);
0021 
0022   ~PHG4SpacalDisplayAction() override;
0023 
0024   void ApplyDisplayAction(G4VPhysicalVolume *physvol) override;
0025   void AddVolume(G4LogicalVolume *logvol, const std::string &mat) { m_LogicalVolumeMap[logvol] = mat; }
0026   void SetGeom(const PHG4CylinderGeom_Spacalv1 *geo) { m_Geom = geo; }
0027   void AddMaterial(const std::string &name, const std::string &mat) { m_MaterialMap[name] = mat; }
0028 
0029  private:
0030   const PHG4CylinderGeom_Spacalv1 *m_Geom = nullptr;
0031   std::map<G4LogicalVolume *, std::string> m_LogicalVolumeMap;
0032   std::vector<G4VisAttributes *> m_VisAttVec;
0033   std::map<std::string, std::string> m_MaterialMap;
0034 };
0035 
0036 #endif  // G4DETECTORS_PHG4TPCDISPLAYACTION_H