Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:17

0001 /*!
0002  *  \file       HitCountEval.h
0003  *  \brief      Evaluation module for PHG4TrackFastSim output
0004  *  \details     input: PHG4TruthInfoContainer G4TruthInfo
0005  *              PHG4HitContainer G4HIT_EGEM_0
0006  *              PHG4HitContainer G4HIT_EGEM_1 
0007  *              PHG4HitContainer G4HIT_EGEM_3
0008  *          PHG4HitContainer G4HIT_FGEM_0
0009  *          PHG4HitContainer G4HIT_FGEM_1
0010  *          PHG4HitContainer G4HIT_FGEM_2
0011  *              PHG4HitContainer G4HIT_FGEM_3
0012  *          PHG4HitContainer G4HIT_FGEM_4
0013  *          PHG4HitContainer G4HIT_MAPS
0014  *          PHG4HitContainer G4HIT_SVTX
0015  *  \author     Giorgian Borca-Tasciuc <giorgian.borca-tasciuc@stonybrook.edu>
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         /* For Trees */
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 //* __HitCountEval_H__ *//