Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:13:03

0001 
0002 
0003 #ifndef __EpFinderEval_H__
0004 #define __EpFinderEval_H__
0005 
0006 #include <fun4all/SubsysReco.h>
0007 #include <string>
0008 #include <vector>
0009 
0010 //Forward declerations
0011 class PHCompositeNode;
0012 class TFile; 
0013 class TTree;
0014 class EpFinder; 
0015 class PHG4TruthInfoContainer;
0016 class RawTowerContainer; 
0017 class RawTowerGeomContainer; 
0018 
0019 #define PHI_BINS 20
0020 
0021 #define FPRIM_PHI_BINS 20
0022 #define FPRIM_ETA_BINS 20
0023 #define RFPRIM_ETA_BINS 5
0024 
0025 //Brief: basic ntuple and histogram creation for sim evaluation
0026 class EpFinderEval: public SubsysReco
0027 {
0028  public: 
0029   //Default constructor
0030   EpFinderEval(const std::string &name="EpFinderEval");
0031 
0032   //Initialization, called for initialization
0033   int Init(PHCompositeNode *);
0034 
0035   int InitRun(PHCompositeNode *); 
0036 
0037   //Process Event, called for each event
0038   int process_event(PHCompositeNode *);
0039 
0040   //End, write and close files
0041   int End(PHCompositeNode *);
0042 
0043   //Change output filename
0044   void set_filename(const char* file)
0045   { if(file) _outfile_name = file; }
0046 
0047  private:
0048   //output filename
0049   std::string _outfile_name;
0050    
0051   //Event counter
0052   int _event;
0053 
0054   //User modules
0055   void fill_tree(PHCompositeNode*);
0056 
0057   //Get all the nodes
0058   int GetNodes(PHCompositeNode *);
0059   
0060   // Sum tower energy
0061   void sumTowerEnergy( PHCompositeNode *topNode, std::string detName ); 
0062 
0063   // Determine phi,eta bin
0064   int GetPhiBin(float tphi, float numPhiDivisions); 
0065   int GetEtaBin(float teta, float eta_low, float eta_high, float numEtaDivisions); 
0066 
0067   //TTrees
0068   TTree* _eval_tree_event;
0069 
0070   float rplane_angle; 
0071   float bimpact; 
0072   float prim_rplane_angle; 
0073 
0074   float fprim_rplane_angle; 
0075   float fprim_phiweighted_rplane_angle; 
0076   float fprim_phiweightedandshifted_rplane_angle; 
0077 
0078   float rfprim_rplane_angle; 
0079   float rfprim_phiweighted_rplane_angle; 
0080   float rfprim_phiweightedandshifted_rplane_angle; 
0081 
0082   float femc_raw_rplane_angle; 
0083   float femc_phiweighted_rplane_angle; 
0084   float femc_phiweightedandshifted_rplane_angle; 
0085 
0086   float rfemc_raw_rplane_angle; 
0087   float rfemc_phiweighted_rplane_angle; 
0088   float rfemc_phiweightedandshifted_rplane_angle; 
0089 
0090   float femcL_raw_rplane_angle; 
0091   float femcL_phiweighted_rplane_angle; 
0092   float femcL_phiweightedandshifted_rplane_angle; 
0093 
0094   float femcR_raw_rplane_angle; 
0095   float femcR_phiweighted_rplane_angle; 
0096   float femcR_phiweightedandshifted_rplane_angle; 
0097 
0098   float femc_h_clE; 
0099 
0100   PHG4TruthInfoContainer* _truth_container;
0101   RawTowerContainer* towers; 
0102   RawTowerGeomContainer *towergeom; 
0103 
0104   EpFinder *RpFinder; 
0105   EpFinder *rRpFinder; 
0106   EpFinder *RpFinderL; 
0107   EpFinder *RpFinderR; 
0108   EpFinder *primRpFinder; 
0109   EpFinder *fprimRpFinder; 
0110   EpFinder *rfprimRpFinder; 
0111 
0112   // phi binning
0113 
0114   std::vector<std::pair<int,int>> phi_list[PHI_BINS]; 
0115   std::vector<std::pair<int,int>> rphi_list[PHI_BINS]; 
0116   std::vector<std::pair<int,int>> fprim_phi_list[FPRIM_PHI_BINS]; 
0117   std::vector<std::pair<int,int>> rfprim_phi_list[FPRIM_PHI_BINS]; 
0118 
0119 };
0120 
0121 #endif //* __EpFinderEval_H__ *//