File indexing completed on 2025-08-05 08:12:41
0001 #ifndef UPCTRIGSTUDY_H
0002 #define UPCTRIGSTUDY_H
0003
0004 #include <Rtypes.h>
0005 #include <fun4all/SubsysReco.h>
0006
0007
0008 class Fun4AllHistoManager;
0009 class PHCompositeNode;
0010 class TFile;
0011 class TTree;
0012 class TH1;
0013 class TH2;
0014 class PHCompositeNode;
0015 class GlobalVertex;
0016 class CaloTriggerInfo;
0017 class EventHeader;
0018 class Gl1Packet;
0019 class MbdOut;
0020 class TowerInfoContainer;
0021
0022
0023 class UPCTrigStudy : public SubsysReco
0024 {
0025 public:
0026
0027 UPCTrigStudy(const std::string &name = "UPCTrigStudy",
0028 const std::string &outputfname = "UPCTrigStudy.root");
0029
0030
0031 virtual ~UPCTrigStudy();
0032
0033
0034 int Init(PHCompositeNode *) override;
0035
0036
0037 int process_event(PHCompositeNode *) override;
0038
0039
0040 int End(PHCompositeNode *) override;
0041
0042
0043
0044
0045 private:
0046
0047 std::string m_outfilename;
0048
0049
0050 Fun4AllHistoManager *m_hm;
0051
0052
0053 int process_triggers();
0054 void process_zdc();
0055 int Getpeaktime(TH1 *);
0056
0057
0058 TFile *m_outfile{nullptr};
0059 TTree *_globaltree{nullptr};
0060
0061 TH1 *h_trig{nullptr};
0062 TH1 *h_ntracks{nullptr};
0063 TH1 *h_zdcse{nullptr};
0064 TH1 *h_zdcne{nullptr};
0065 TH1 *h_zdce{nullptr};
0066 TH1 *h_zdctimecut{nullptr};
0067
0068 Gl1Packet* _gl1raw {nullptr};
0069 MbdOut *_mbdout{nullptr};
0070 TowerInfoContainer* _zdctowers{nullptr};
0071
0072
0073 int GetNodes(PHCompositeNode *topNode);
0074
0075
0076
0077 EventHeader *evthdr{nullptr};
0078
0079 void resetVariables();
0080 void initializeTrees();
0081
0082
0083
0084
0085
0086
0087 Int_t f_run{ 0 };
0088 Int_t f_evt{ 0 };
0089 ULong64_t f_rtrig{ 0 };
0090 ULong64_t f_ltrig{ 0 };
0091 ULong64_t f_strig{ 0 };
0092 Float_t f_zdcse{ 0 };
0093 Float_t f_zdcne{ 0 };
0094 Short_t f_cross{ 0 };
0095 Short_t f_mbdsn{ 0 };
0096 Short_t f_mbdnn{ 0 };
0097
0098 Int_t f_ntracks{ 0 };
0099 Int_t _mbdwide{ 0 };
0100 Int_t _nprocessed{ 0 };
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114 };
0115
0116 #endif