File indexing completed on 2025-08-03 08:13:13
0001 #ifndef __HCALIB_H__
0002 #define __HCALIB_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <string>
0006
0007 class PHCompositeNode;
0008 class RawTowerContainer;
0009 class RawTowerGeomContainer;
0010 class PHG4CellContainer;
0011 class PHG4ScintillatorSlatContainer;
0012 class TFile;
0013 class TH1F;
0014 class RawTower;
0015
0016 #include <g4detectors/PHG4ScintillatorSlatDefs.h>
0017 #include <calobase/RawTowerDefs.h>
0018 #include <map>
0019
0020 class HCalib : public SubsysReco
0021 {
0022 public:
0023 typedef std::map<PHG4ScintillatorSlatDefs::keytype,TH1F *> SlatMap;
0024 typedef std::map<RawTowerDefs::keytype, TH1F *> TowerMap;
0025
0026 HCalib();
0027 virtual ~HCalib() {}
0028
0029 int Init(PHCompositeNode *topNode);
0030 int process_event(PHCompositeNode *topNode);
0031 int End(PHCompositeNode *topNode);
0032 int genkey(const int detid, const int etabin, const int phibin);
0033 enum detid { HCALIN=0, HCALOUT=1 };
0034 protected:
0035 bool is_proto;
0036 void GetNodes(PHCompositeNode *topNode, const std::string &det = "None");
0037
0038 PHCompositeNode *topNode;
0039 RawTowerContainer *towers;
0040 PHG4CellContainer* slats;
0041 PHG4ScintillatorSlatContainer* proto_slats;
0042 float threshold;
0043 TFile *outfile;
0044 SlatMap slat_hists;
0045 TowerMap tower_hists;
0046 bool fill_towers;
0047 bool fill_slats;
0048 };
0049
0050 #endif