Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetEnergies.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetEnergies.h
1 #ifndef __JETENERGIES_H__
2 #define __JETENERGIES_H__
3 
4 //===============================================
7 
8 // VERY IMPORTANT: In order to get the flux return energy the Flux Return must be set to active in the G4Setup file otherwise this may not work
9 
12 //===============================================
13 
14 #include <g4eval/JetEvalStack.h>
15 
16 #include <fun4all/SubsysReco.h>
17 #include <phool/PHCompositeNode.h>
19 
20 #include <TNtuple.h>
21 #include <TFile.h>
22 
23 #include <string>
24 
25 //class PHG4HitContainer;
26 
36 class JetEnergies : public SubsysReco {
37 
38  public:
39 
40  JetEnergies(const std::string &name = "JETENERGIES",
41  const std::string &recojetname = "AntiKt_Tower_r0.3",
42  const std::string &truthjetname = "AntiKt_Truth_r0.3",
43  const std::string &filename = "g4eval_jets.root");
44  virtual ~JetEnergies() {};
45 
46  int Init(PHCompositeNode *topNode);
47  int InitRun(PHCompositeNode *topNode);
48  int process_event(PHCompositeNode *topNode);
49  int End(PHCompositeNode *topNode);
50 
51  void set_strict(bool b) {_strict = b;}
52 
53  private:
54 
55  float GetTotalEnergy(PHG4HitContainer* hit_object);
56 
59 
60  unsigned long _ievent;
61 
63 
64  //----------------------------------
65  // evaluator output ntuples
66 
67  bool _strict;
68  unsigned int _errors;
69 
72 
73  TNtuple *_ntp_recojet;
74  TNtuple *_ntp_truthjet;
75 
76  // evaluator output file
78  TFile *_tfile;
79 
80  //For some reason this declaration has to go here
86 
87  // subroutines
88  void printInputInfo(PHCompositeNode *topNode);
89  void fillOutputNtuples(PHCompositeNode *topNode);
90  void printOutputInfo(PHCompositeNode *topNode);
91 };
92 
93 #endif // __JETENERGIES_H__