Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef EVENTCHECK_H
0004 #define EVENTCHECK_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 #include <vector>
0010 
0011 #include <calotrigger/TriggerAnalyzer.h>
0012 
0013 // Jet Utils
0014 #include "JetUtils.h"
0015 
0016 using std::string;
0017 using std::vector;
0018 using std::pair;
0019 
0020 class PHCompositeNode;
0021 
0022 class EventCheck : public SubsysReco
0023 {
0024  public:
0025   EventCheck();
0026 
0027   ~EventCheck() override;
0028 
0029   /** Called during initialization.
0030       Typically this is where you can book histograms, and e.g.
0031       register them to Fun4AllServer (so they can be output to file
0032       using Fun4AllServer::dumpHistos() method).
0033    */
0034   int Init(PHCompositeNode *topNode) override;
0035 
0036   /** Called for each event.
0037       This is where you do the real work.
0038    */
0039   int process_event(PHCompositeNode *topNode) override;
0040 
0041   /// Clean up internals after each event.
0042   int ResetEvent(PHCompositeNode *topNode) override;
0043 
0044   /// Called at the end of all processing.
0045   int End(PHCompositeNode *topNode) override;
0046 
0047   void set_zvtx_max(float m_zvtx_max) {
0048     this->m_zvtx_max = m_zvtx_max;
0049   }
0050 
0051   void set_trigger(int m_triggerBit) {
0052     this->m_triggerBit = m_triggerBit;
0053   }
0054 
0055   void set_eventList(const string &m_eventList) {
0056     this->m_eventList = m_eventList;
0057     m_doSpecificEvents = !JetUtils::readEventList(m_eventList, m_eventList_vec, 0, true);
0058   }
0059 
0060  private:
0061 
0062   int m_triggerBit;
0063   float m_zvtx_max;
0064   bool m_doSpecificEvents;
0065   string m_eventList;
0066 
0067   vector<pair<int, int>> m_eventList_vec;
0068 
0069   TriggerAnalyzer* m_triggeranalyzer = nullptr;
0070 };
0071 
0072 #endif  // EVENTCHECK_H