Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:13:11

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 
0004 #ifndef DETINFO_H
0005 #define DETINFO_H
0006 
0007 #include <fun4all/SubsysReco.h>
0008 
0009 #include <string>
0010 #include <vector>
0011 #include <TMath.h>
0012 
0013 
0014 class TFile;
0015 class TTree;
0016 class TNtuple;
0017 class TH1;
0018 
0019 class PHCompositeNode;
0020 class CDBTTree;
0021 
0022 class Detinfo : public SubsysReco
0023 {
0024  public:
0025 
0026   Detinfo(const std::string &name = "Detinfo");
0027 
0028   ~Detinfo() override;
0029 
0030   int Init(PHCompositeNode *topNode) override;
0031   int InitRun(PHCompositeNode *topNode) override;
0032   int process_event(PHCompositeNode *topNode) override;
0033   int ResetEvent(PHCompositeNode *topNode) override;
0034   int EndRun(const int runnumber) override;
0035   int End(PHCompositeNode *topNode) override;
0036   int Reset(PHCompositeNode * /*topNode*/) override;
0037   
0038   void set_filename(const char* file)
0039   { if(file) _outfile_name = file; }
0040     
0041  private:
0042  std::string _outfile_name;
0043  double StoreZDCInfo(std::vector < float > _z);
0044  double StoreEPDInfo(std::vector < float > _e);
0045  double StoreMBDInfo(std::vector < float > _m); 
0046 
0047   TNtuple *zdc;
0048   TNtuple *sepd;
0049   TNtuple *mbd;
0050 
0051   TNtuple *coor;
0052 
0053   TH1* hepdtime;
0054   TH1* hzdctime;
0055   TH1* hzvertex;
0056 
0057 
0058   std::vector < float > _f; //zdc
0059   std::vector < float > _g; //sepd
0060   std::vector < float > _b; //mbd
0061 
0062 
0063   float ztower_info[32] = {};
0064   float etower_info[1536] = {};
0065   float mtower_info[256] = {};
0066   float event_info[5] = {};
0067 
0068   int _event;
0069 
0070   CDBTTree *cdbttree = nullptr;
0071 
0072 };
0073 
0074 #endif // DETINFO_H