Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:53

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4BBCDETECTOR_H
0004 #define G4DETECTORS_PHG4BBCDETECTOR_H
0005 
0006 #include <g4main/PHG4Detector.h>
0007 
0008 #include <cmath>
0009 #include <set>
0010 #include <string>
0011 
0012 class G4LogicalVolume;
0013 class G4VPhysicalVolume;
0014 class PHG4BbcDisplayAction;
0015 class PHCompositeNode;
0016 class PHG4Subsystem;
0017 class PHParameters;
0018 
0019 class PHG4BbcDetector : public PHG4Detector
0020 {
0021  public:
0022   //! constructor
0023   PHG4BbcDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *params, const std::string &dnam = "BBC");
0024 
0025   //! destructor
0026   ~PHG4BbcDetector() override = default;
0027 
0028   //! construct BBC/MBD
0029   void ConstructMe(G4LogicalVolume *world) override;
0030   void ConstructSupport(G4LogicalVolume *world);
0031 
0032   void Print(const std::string &what = "ALL") const override;
0033 
0034   int IsInBbc(G4VPhysicalVolume *) const;
0035 
0036   void SuperDetector(const std::string &name) { m_SuperDetector = name; }
0037   const std::string &SuperDetector() const { return m_SuperDetector; }
0038 
0039   PHG4BbcDisplayAction *GetDisplayAction() { return m_DisplayAction; }
0040 
0041  protected:
0042   PHG4BbcDisplayAction *m_DisplayAction = nullptr;
0043 
0044   PHParameters *m_Params = nullptr;
0045 
0046   int m_ActiveFlag = 0;
0047   int m_SupportActiveFlag = 0;
0048 
0049   float m_bbcz = NAN;      // z-location of mid-point of quartz ckov crystals
0050   float front_bbcz = NAN;  // z-location of front of BBC housing
0051 
0052   std::set<G4LogicalVolume *> m_PhysLogicalVolSet;
0053   std::set<G4LogicalVolume *> m_SupportLogicalVolSet;
0054 
0055   std::string m_SuperDetector;
0056 };
0057 
0058 #endif