File indexing completed on 2025-08-05 08:12:37
0001 #ifndef __JETENERGIES_H__
0002 #define __JETENERGIES_H__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <g4eval/JetEvalStack.h>
0015
0016 #include <fun4all/SubsysReco.h>
0017 #include <phool/PHCompositeNode.h>
0018 #include <g4main/PHG4HitContainer.h>
0019
0020 #include <TNtuple.h>
0021 #include <TFile.h>
0022
0023 #include <string>
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class JetEnergies : public SubsysReco {
0037
0038 public:
0039
0040 JetEnergies(const std::string &name = "JETENERGIES",
0041 const std::string &recojetname = "AntiKt_Tower_r0.3",
0042 const std::string &truthjetname = "AntiKt_Truth_r0.3",
0043 const std::string &filename = "g4eval_jets.root");
0044 virtual ~JetEnergies() {};
0045
0046 int Init(PHCompositeNode *topNode);
0047 int InitRun(PHCompositeNode *topNode);
0048 int process_event(PHCompositeNode *topNode);
0049 int End(PHCompositeNode *topNode);
0050
0051 void set_strict(bool b) {_strict = b;}
0052
0053 private:
0054
0055 float GetTotalEnergy(PHG4HitContainer* hit_object);
0056
0057 std::string _recojetname;
0058 std::string _truthjetname;
0059
0060 unsigned long _ievent;
0061
0062 JetEvalStack* _jetevalstack;
0063
0064
0065
0066
0067 bool _strict;
0068 unsigned int _errors;
0069
0070 bool _do_recojet_eval;
0071 bool _do_truthjet_eval;
0072
0073 TNtuple *_ntp_recojet;
0074 TNtuple *_ntp_truthjet;
0075
0076
0077 std::string _filename;
0078 TFile *_tfile;
0079
0080
0081 PHG4HitContainer* _FluxReturn_plus_hit_container;
0082 PHG4HitContainer* _FluxReturn_minus_hit_container;
0083 PHG4HitContainer* _BH_1_hit_container;
0084 PHG4HitContainer* _BH_Forward_hit_container;
0085 PHG4HitContainer* _BH_Negative_hit_container;
0086
0087
0088 void printInputInfo(PHCompositeNode *topNode);
0089 void fillOutputNtuples(PHCompositeNode *topNode);
0090 void printOutputInfo(PHCompositeNode *topNode);
0091 };
0092
0093 #endif