File indexing completed on 2025-12-16 09:20:05
0001 #ifndef JETBASE_TOWERJETINPUT_H
0002 #define JETBASE_TOWERJETINPUT_H
0003
0004 #include "Jet.h"
0005 #include "JetInput.h"
0006
0007 #include <calobase/RawTowerDefs.h>
0008 #include <globalvertex/GlobalVertex.h>
0009
0010 #include <iostream> // for cout, ostream
0011
0012 #include <vector>
0013
0014 class PHCompositeNode;
0015 class GlobalVertex;
0016 class TowerJetInput : public JetInput
0017 {
0018 public:
0019 TowerJetInput(Jet::SRC input, const std::string &prefix = "TOWERINFO_CALIB");
0020 ~TowerJetInput() override {}
0021
0022 void identify(std::ostream& os = std::cout) override;
0023
0024 Jet::SRC get_src() override { return m_input; }
0025
0026 std::vector<Jet*> get_input(PHCompositeNode* topNode) override;
0027
0028 void reset_GlobalVertexType()
0029 {
0030 m_use_vertextype = false;
0031 m_vertex_type.clear();
0032 }
0033
0034 void set_GlobalVertexType(GlobalVertex::VTXTYPE type)
0035 {
0036 reset_GlobalVertexType();
0037 m_use_vertextype = true;
0038 m_vertex_type.push_back(type);
0039 }
0040
0041 void add_GlobalVertexType(GlobalVertex::VTXTYPE type)
0042 {
0043 m_use_vertextype = true;
0044 m_vertex_type.push_back(type);
0045 }
0046
0047 void set_GlobalVertexTypes(const std::vector<GlobalVertex::VTXTYPE>& types)
0048 {
0049 reset_GlobalVertexType();
0050 m_use_vertextype = true;
0051 for(unsigned int i=0; i<types.size(); ++i)
0052 {
0053 m_vertex_type.push_back(types.at(i));
0054 }
0055 }
0056
0057 float get_timing_e_threshold() { return m_timing_e_threshold; }
0058
0059 void set_timing_e_threshold(float new_threshold) { m_timing_e_threshold = new_threshold; }
0060
0061 private:
0062 Jet::SRC m_input;
0063 RawTowerDefs::CalorimeterId geocaloid{RawTowerDefs::CalorimeterId::NONE};
0064 bool m_use_towerinfo {false};
0065 std::string m_towerNodePrefix;
0066 std::string towerName;
0067 bool m_use_vertextype {false};
0068 std::vector<GlobalVertex::VTXTYPE> m_vertex_type{GlobalVertex::UNDEFINED};
0069 float m_timing_e_threshold{0.1};
0070 };
0071
0072 #endif