File indexing completed on 2025-08-05 08:15:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef __HitCountEval_H__
0019 #define __HitCountEval_H__
0020
0021 #include <string>
0022 #include <TTree.h>
0023 #include <TH1F.h>
0024 #include <phool/PHCompositeNode.h>
0025 #include <g4main/PHG4HitContainer.h>
0026 #include <g4main/PHG4TruthInfoContainer.h>
0027 #include <fun4all/SubsysReco.h>
0028
0029 #define NHITCONTAINERS 10
0030
0031 #define NELEMS(a) (sizeof(a)/sizeof(a[0]))
0032 class HitCountEval: public SubsysReco
0033 {
0034 public:
0035 HitCountEval(const std::string &name = "HitCountEval",
0036 const std::string &file_name = "g4eval.root");
0037 int Init(PHCompositeNode *const);
0038 int process_event(PHCompositeNode *const);
0039 int End(PHCompositeNode *const);
0040 void set_filename(const char *const file);
0041 private:
0042 std::string output_file_name;
0043
0044 unsigned event;
0045 static const char *const hit_containers[NHITCONTAINERS];
0046
0047 TTree *hits[NELEMS(HitCountEval::hit_containers)];
0048 TTree *normalized_hits[NELEMS(HitCountEval::hit_containers)];
0049 TH1F *hit_count[NELEMS(HitCountEval::hit_containers)];
0050 TH1F *eta_count[NELEMS(HitCountEval::hit_containers)];
0051
0052
0053 Float_t hit_x;
0054 Float_t hit_y;
0055 Float_t hit_z;
0056 Float_t hit_px;
0057 Float_t hit_py;
0058 Float_t hit_pz;
0059 Float_t particle_initial_px;
0060 Float_t particle_initial_py;
0061 Float_t particle_initial_pz;
0062
0063 Int_t hit_id;
0064 Int_t hit_layer;
0065 Int_t hit_event;
0066
0067 Double_t normalized_hit_eta;
0068 Double_t normalized_hit_count;
0069 };
0070
0071 #endif