Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:41

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef INTTXYVERTEXFINDER_H
0004 #define INTTXYVERTEXFINDER_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <array>
0009 #include <string>
0010 
0011 class PHCompositeNode;
0012 class InttVertexMap;
0013 class INTTXYvtx;
0014 
0015 class InttXYVertexFinder : public SubsysReco
0016 {
0017   typedef std::array<double, 3> VertexPos;
0018 
0019  public:
0020   explicit InttXYVertexFinder(const std::string &name = "InttXYVertexFinder");
0021 
0022   ~InttXYVertexFinder() override;
0023 
0024   int Init(PHCompositeNode *topNode) override;
0025 
0026   int InitRun(PHCompositeNode *topNode) override;
0027 
0028   int process_event(PHCompositeNode *topNode) override;
0029 
0030   /// Called at the end of all processing.
0031   int End(PHCompositeNode *topNode) override;
0032 
0033   void Print(const std::string &what = "ALL") const override;
0034 
0035   void SetPeriod(const int period) { m_period = period; }
0036 
0037   void SetBeamCenter(const double beamx, const double beamy);
0038   void SetSaveHisto(const bool savehist);
0039   void EnableDrawHisto(const bool enable);
0040   void EnableQA(const bool enable);
0041 
0042  private:
0043   int createNodes(PHCompositeNode *topNode);
0044 
0045  private:
0046   INTTXYvtx *m_inttxyvtx{nullptr};
0047   InttVertexMap *m_inttvertexmap{nullptr};
0048   int m_period{1000};
0049 
0050   VertexPos m_vertex_quad{0, 0, -9999.};
0051   VertexPos m_vertex_line{0, 0, -9999.};
0052 };
0053 
0054 #endif  // INTTXYVERTEXFINDER_H