File indexing completed on 2025-08-05 08:11:07
0001 #ifndef __MBDLASER_H__
0002 #define __MBDLASER_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <string>
0006 #include <map>
0007 #include <TFile.h>
0008
0009
0010 class PHCompositeNode;
0011 class EventHeader;
0012 class MbdOut;
0013 class MbdPmtContainer;
0014 class TFile;
0015 class TTree;
0016 class TDatabasePDG;
0017 class TRandom3;
0018 class TH1;
0019 class TH2;
0020 class TGraphErrors;
0021 class TF1;
0022 class TCanvas;
0023
0024
0025
0026 class MbdLaser: public SubsysReco
0027 {
0028 public:
0029
0030
0031 MbdLaser(const std::string &name="MbdLaser");
0032
0033
0034 int Init(PHCompositeNode *);
0035
0036
0037 int InitRun(PHCompositeNode *);
0038
0039
0040 int process_event(PHCompositeNode *);
0041
0042
0043 int End(PHCompositeNode *);
0044
0045
0046 void set_savefile(const char *f) { _savefname = f; }
0047
0048 void set_run(const int r) { f_run = r; }
0049
0050 private:
0051
0052
0053 void LaserDST(PHCompositeNode *topNode);
0054
0055 int Getpeaktime(TH1 *h);
0056
0057
0058 std::string _savefname;
0059 TFile* _savefile{ nullptr };
0060
0061
0062
0063
0064 int nprocessed{0};
0065
0066
0067 TTree* _tree{ nullptr };
0068 Int_t f_run;
0069 Int_t f_evt{ 0 };
0070 Int_t f_ch;
0071 Float_t f_qmean;
0072 Float_t f_qmerr;
0073 Float_t f_tmean;
0074 Float_t f_tmerr;
0075
0076
0077 Float_t f_mbdq[2];
0078 Float_t f_mbdt[2];
0079 Float_t f_mbdte[2];
0080 Float_t f_mbdt0;
0081
0082 TH1 *h_mbdq[128];
0083 TH1* h_mbdt[128];
0084
0085 TH2* h2_mbdbtt;
0086 TH2* h2_mbdbq;
0087
0088 TGraphErrors *g_mbdq[128];
0089 TGraphErrors *g_mbdt[128];
0090
0091
0092 TCanvas *c_mbdt;
0093 TH1 *hevt_mbdt[2];
0094
0095
0096 TRandom3* _rndm;
0097
0098
0099 void GetNodes(PHCompositeNode *);
0100
0101
0102 EventHeader* _evtheader;
0103 MbdOut* _mbdout;
0104 MbdPmtContainer* _mbdpmts;
0105
0106
0107 };
0108
0109 #endif
0110
0111