Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TRIGGERCOUNTMODULE_H
0002 #define TRIGGERCOUNTMODULE_H
0003 #include <fun4all/SubsysReco.h>
0004 #include <string>
0005 #include <globalvertex/GlobalVertex.h>
0006 #include <TFile.h>
0007 #include <TTree.h>
0008 #include <TH1D.h>
0009 class PHCompositeNode;
0010 class CentralityInfo;
0011 class triggercountmodule : public SubsysReco
0012 {
0013  public:
0014 
0015   triggercountmodule(const std::string &filename, int rn, int segn, int maxseg, int debug = 0, const std::string &name = "triggercountmodule");
0016 
0017   virtual ~triggercountmodule();
0018 
0019   int Init(PHCompositeNode *topNode) override;
0020 
0021   int InitRun(PHCompositeNode *topNode) override;
0022 
0023   int process_event(PHCompositeNode *topNode) override;
0024 
0025   int ResetEvent(PHCompositeNode *topNode) override;
0026 
0027   int EndRun(const int runnumber) override;
0028 
0029   int End(PHCompositeNode *topNode) override;
0030 
0031   int Reset(PHCompositeNode * /*topNode*/) override;
0032 
0033   void Print(const std::string &what = "ALL") const override;
0034 
0035 
0036  private:
0037   std::string _name;
0038   std::string _filename;
0039   TFile* _outfile;
0040   TTree* _tree;
0041   int _debug;
0042   TH1D* _mbzhist;
0043   TH1D* _bunchHist;
0044   long long unsigned int _startBCO = 0;
0045   long long unsigned int _endBCO = 0;
0046   int _nBunch = 0;
0047   int _rn;
0048   int _lastseg;
0049   int _nseg;
0050   long long unsigned int _evtn = 0;
0051   long long unsigned int _startLive[64] = {0};
0052   long long unsigned int _startScal[64] = {0};
0053   long long unsigned int _endLive[64] = {0};
0054   long long unsigned int _endScal[64] = {0};
0055   long long unsigned int _startRaw[64] = {0};
0056   long long unsigned int _endRaw[64] = {0};
0057   double _avgPS[64] = {0};
0058   long long unsigned int _trigCounts[6][64] = {0};
0059   double _eMBDlive[5] = {0};
0060   int _badFlag = 0;
0061   GlobalVertex::VTXTYPE _vtxtype = GlobalVertex::MBD;
0062 };
0063 
0064 #endif