File indexing completed on 2025-08-06 08:13:26
0001 #ifndef __LARGERLENC_LEDPEDESTALSCAN_H__
0002 #define __LARGERLENC_LEDPEDESTALSCAN_H__
0003
0004
0005 #include <fun4all/SubsysReco.h>
0006 #include <fun4all/Fun4AllBase.h>
0007 #include <fun4all/Fun4AllReturnCodes.h>
0008
0009
0010 #include <phool/PHCompositeNode.h>
0011 #include <phool/getClass.h>
0012
0013
0014 #include <calobase/TowerInfoContainer.h>
0015 #include <calobase/TowerInfoContainerv1.h>
0016 #include <calobase/TowerInfoContainerv2.h>
0017 #include <calobase/TowerInfov2.h>
0018 #include <calobase/TowerInfov1.h>
0019 #include <calobase/TowerInfo.h>
0020 #include <calobase/RawTowerDefs.h>
0021 #include <calobase/RawTowerContainer.h>
0022 #include <calobase/RawTowerGeomContainer.h>
0023 #include <calobase/RawTowerGeomContainer_Cylinderv1.h>
0024
0025 #include "LargeRLENC.h"
0026 #include <string>
0027 #include <map>
0028 #include <array>
0029
0030 class PHCompositeNode;
0031 class LargeRLENC;
0032
0033 class LEDPedestalScan: public SubsysReco
0034 {
0035 public:
0036
0037 LEDPedestalScan(const int n_run, const int n_segment, const bool doE2C=false, const bool act_loc=true, const std::string& name="LEDPedestalScan");
0038 ~LEDPedestalScan() override {}
0039 int Init(PHCompositeNode *topNode) override {
0040 return Fun4AllReturnCodes::EVENT_OK;
0041 }
0042
0043
0044
0045
0046
0047
0048 int InitRun(PHCompositeNode *topNode) override {return Fun4AllReturnCodes::EVENT_OK;}
0049
0050
0051
0052
0053 int process_event(PHCompositeNode *topNode) override;
0054
0055
0056 int ResetEvent(PHCompositeNode *topNode) override {return Fun4AllReturnCodes::EVENT_OK;}
0057
0058
0059 int EndRun(const int runnumber) override {return Fun4AllReturnCodes::EVENT_OK;}
0060
0061
0062 int End(PHCompositeNode *topNode) override {
0063
0064 return Fun4AllReturnCodes::EVENT_OK;
0065 };
0066
0067
0068 int Reset(PHCompositeNode * ) override {return Fun4AllReturnCodes::EVENT_OK;};
0069
0070 void Print(const std::string &what = "ALL") const override;
0071 int n_evts=0;
0072 JetContainerv1* getJets(float radius, std::array<float, 3> vertex, std::map<std::array<float, 3>, float> towers);
0073
0074 private:
0075 LargeRLENC* encCalc;
0076 TH2F* jet_loc;
0077 TH2F* lead_jet_loc;
0078 TH2F* jet_loc_center;
0079 TH2F* lead_jet_loc_center;
0080 std::vector<TH2F*> ohcal_energy_i, ihcal_energy_i, emcal_energy_i;
0081 std::vector<TH2F*> ohcal_energy_node, ihcal_energy_node, emcal_energy_node;
0082 std::vector<std::array<float, 5>> energy_thresholds;
0083 TH1F* ohcal_energy, *ihcal_energy, *emcal_energy, *allcal_energy;
0084 TH1F* ohcal_energy_total, *ihcal_energy_total, *emcal_energy_total, *allcal_energy_total;
0085 TH1F* ohcal_hit_plot, *ihcal_hit_plot, *emcal_hit_plot, *allcal_hit_plot;
0086 int run;
0087 int segement;
0088 bool run_e2c;
0089 bool local;
0090 };
0091 #endif