Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:24

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef CALORECO_CALOGEOMMAPPING_H
0004 #define CALORECO_CALOGEOMMAPPING_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 #include <calobase/RawTowerDefs.h>
0008 
0009 #include <string>
0010 
0011 class PHCompositeNode;
0012 class RawTowerGeomContainer;
0013 
0014 class CaloGeomMapping : public SubsysReco
0015 {
0016  public:
0017   CaloGeomMapping(const std::string &name = "CaloGeomMapping");
0018   ~CaloGeomMapping() override = default;
0019 
0020   /** Called during initialization.
0021       Typically this is where you can book histograms, and e.g.
0022       register them to Fun4AllServer (so they can be output to file
0023       using Fun4AllServer::dumpHistos() method).
0024    */
0025   int Init(PHCompositeNode *topNode) override;
0026 
0027   // Create tower geometry mapping node
0028   void CreateGeomNode(PHCompositeNode *topNode);
0029   void BuildFormerGeometry();
0030   void BuildDetailedGeometry();
0031 
0032   void set_detector_name(const std::string &name)
0033   {
0034     m_Detector = name;
0035   }
0036   const std::string &get_detector_name()
0037   {
0038     return m_Detector;
0039   }
0040   
0041   void set_UseDetailedGeometry(const bool useDetailedGeometry)
0042   {
0043     m_UseDetailedGeometry = useDetailedGeometry;
0044   }
0045 
0046  protected:
0047   std::string m_Detector;  // CEMC, HCALIN or HCALOUT
0048   std::string m_TowerGeomNodeName;
0049   RawTowerGeomContainer *m_RawTowerGeomContainer {nullptr};
0050   RawTowerDefs::CalorimeterId m_caloid;
0051   bool m_UseDetailedGeometry {false};
0052   // Use a more detailed calorimeter geometry
0053   // Only available for CEMC
0054 };
0055 
0056 #endif  // CALOGEOMMAPPING_H