Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 // This file is really -*- C++ -*-.
0003 #ifndef G4INTT_PHG4INTTDETECTOR_H
0004 #define G4INTT_PHG4INTTDETECTOR_H
0005 
0006 #include <g4main/PHG4Detector.h>
0007 
0008 #include <map>
0009 #include <set>
0010 #include <string>  // for string
0011 #include <tuple>
0012 #include <utility>  // for pair
0013 #include <vector>
0014 
0015 class G4LogicalVolume;
0016 class G4VPhysicalVolume;
0017 class PHCompositeNode;
0018 class PHG4InttDisplayAction;
0019 class PHG4Subsystem;
0020 class PHParametersContainer;
0021 
0022 class PHG4InttDetector : public PHG4Detector
0023 {
0024  public:
0025   //! constructor
0026   PHG4InttDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParametersContainer *parameters, const std::string &dnam, const std::pair<std::vector<std::pair<int, int>>::const_iterator, std::vector<std::pair<int, int>>::const_iterator> &layer_b_e);
0027 
0028   //! destructor
0029   ~PHG4InttDetector() override = default;
0030   //! construct
0031   void ConstructMe(G4LogicalVolume *world) override;
0032 
0033   //!@name volume accessors
0034   //@{
0035   int IsInIntt(G4VPhysicalVolume *) const;
0036   //@}
0037 
0038   void SuperDetector(const std::string &name)
0039   {
0040     m_SuperDetector = name;
0041   }
0042   const std::string &SuperDetector() const
0043   {
0044     return m_SuperDetector;
0045   }
0046   void Detector(const std::string &name)
0047   {
0048     m_DetectorType = name;
0049   }
0050   const std::string &Detector() const
0051   {
0052     return m_DetectorType;
0053   }
0054   void useSurveyGeometry(bool b)
0055   {
0056     useSurvey = b;
0057   }
0058 
0059   std::map<G4VPhysicalVolume *, std::tuple<int, int, int, int>>::const_iterator get_ActiveVolumeTuple(G4VPhysicalVolume *physvol) const;
0060   std::map<G4LogicalVolume *, std::tuple<int, int>>::const_iterator get_PassiveVolumeTuple(G4LogicalVolume *logvol) const;
0061 
0062  private:
0063   void AddGeometryNode();
0064   int ConstructIntt(G4LogicalVolume *sandwich);
0065 
0066   PHG4InttDisplayAction *m_DisplayAction{nullptr};
0067   PHParametersContainer *m_ParamsContainer{nullptr};
0068 
0069   double m_PosZ[8][2]{};
0070   double m_SensorRadius[8]{};
0071   double m_StripOffsetX[8]{};
0072 
0073   int m_IsSupportActive{0};
0074   int m_IsEndcapActive{0};
0075 
0076   bool useSurvey{true};
0077 
0078   std::string m_DetectorType;
0079   std::string m_SuperDetector;
0080 
0081   std::set<G4LogicalVolume *> m_ActiveLogVols;
0082   std::map<int, int> m_IsActiveMap;
0083   std::map<int, int> m_IsAbsorberActiveMap;
0084   std::pair<std::vector<std::pair<int, int>>::const_iterator, std::vector<std::pair<int, int>>::const_iterator> m_LayerBeginEndIteratorPair;
0085   std::map<G4VPhysicalVolume *, std::tuple<int, int, int, int>> m_ActiveVolumeTuple;
0086   std::map<G4LogicalVolume *, std::tuple<int, int>> m_PassiveVolumeTuple;
0087 };
0088 
0089 #endif