Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetReco.h
1 #ifndef JETBASE_JETRECO_H
2 #define JETBASE_JETRECO_H
3 
4 //===========================================================
8 //===========================================================
9 
10 // PHENIX includes
11 #include <fun4all/SubsysReco.h>
12 
13 // standard includes
14 #include <string> // for string
15 #include <vector>
16 
17 // forward declarations
18 class Jet;
19 class JetAlgo;
20 class JetInput;
21 class PHCompositeNode;
22 
31 class JetReco : public SubsysReco
32 {
33  public:
35  {
39  PRETEND_BOTH // do just JET_CONTAINER, but still append _JC to the name
40  };
41 
42  JetReco(const std::string &name = "JetReco", TRANSITION _which_fill=JET_CONTAINER); // , bool fill_JetContainer=false);
43  ~JetReco() override;
44 
45  int InitRun(PHCompositeNode *topNode) override;
46  int process_event(PHCompositeNode *topNode) override;
47 
48  void add_input(JetInput *input) { _inputs.push_back(input); }
50  {
51  _algos.push_back(algo);
52  _outputs.push_back(output);
53  }
54 
55  void set_algo_node(const std::string &algonode) { _algonode = algonode; }
56  void set_input_node(const std::string &inputnode) { _inputnode = inputnode; }
57  /* void set_fill_JetContainer(bool b) { _fill_JetContainer = b; } */
58 
59  JetAlgo* get_algo(unsigned int which_algo=0);
60 
61  private:
62  int CreateNodes(PHCompositeNode *topNode);
63  void FillJetNode(PHCompositeNode *topNode, int ialgo, std::vector<Jet *> jets);
64  void FillJetContainer(PHCompositeNode *topNode, int ialgo, std::vector<Jet*>& jets);
65 
66  std::vector<JetInput *> _inputs;
67  std::vector<JetAlgo *> _algos;
70  std::vector<std::string> _outputs;
71 
72  // transition functions, while moving from JetMap to JetContainer.
73  // May be removed after transition is made, depending on state of
74  // functions
76  if (which_fill == TRANSITION::BOTH || which_fill==TRANSITION::PRETEND_BOTH) return name+"_JC";
77  else return name;
78  }
79  TRANSITION which_fill;// fill both container and map
80  bool use_jetcon;
81  bool use_jetmap;
82 };
83 
84 #endif // JETBASE_JETRECO_H