Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:14:30

0001 #ifndef __PHOTONS_H__
0002 #define __PHOTONS_H__
0003 
0004 #include <fun4all/SubsysReco.h>
0005 #include <vector>
0006 
0007 #include <TFile.h>
0008 #include <TH1.h>
0009 #include <TH2.h>
0010 #include <TMath.h>
0011 #include <TTree.h>
0012 
0013 class PHCompositeNode;
0014 class RawClusterContainer;
0015 class RawCluster;
0016 class SvtxTrackMap;
0017 class JetMap;
0018 class JetEvalStack;
0019 class JetRecoEval;
0020 class SvtxTrackEval;
0021 class PHG4TruthInfoContainer;
0022 class PHHepMCGenEvent;
0023 //class RawTowerGeom;
0024 //class RawTowerGeomContainer;
0025 class GlobalVertex;
0026 class Photons : public SubsysReco
0027 {
0028  public:
0029   Photons(const std::string &name = "photonjet.root");
0030   double isoconeradius, mincluspt;
0031   float jet_cone_size;
0032   float _etalow, _etahi;
0033 
0034   int _embed;
0035   int Init(PHCompositeNode *);
0036   int process_event(PHCompositeNode *);
0037   int End(PHCompositeNode *);
0038 
0039   void set_cluspt_mincut(double pt) { mincluspt = pt; };
0040   void SetFirstEventNum(int eventnum) { nevents = eventnum; };
0041   void set_eta_lowhigh(float etalow, float etahi)
0042   {
0043     _etalow = etalow;
0044     _etahi = etahi;
0045   };
0046   void use_embedding(int yesorno) { _embed = yesorno; };
0047  private:
0048   void Set_Tree_Branches();
0049   void initialize_to_zero();
0050 
0051   TFile *file;
0052   TTree *tree;
0053   TTree *cluster_tree;
0054   TTree *truth_g4particles;
0055   TTree *inhcal_tree;
0056   TTree *fcluster_tree;
0057   TTree *recal_cluster_tree;
0058 
0059   std::string outfilename;
0060 
0061   int nevents;
0062   TH1F *histo;
0063 
0064   //hcalcluster info
0065   float hcal_energy;
0066   float hcal_eta;
0067   float hcal_phi;
0068   float hcal_pt;
0069   float hcal_px;
0070   float hcal_py;
0071   float hcal_pz;
0072   float hcal_theta;
0073   float hcal_x, hcal_y, hcal_z, hcal_t;
0074 
0075   //cluster info
0076   float clus_energy;
0077   float clus_eta;
0078   float clus_phi;
0079   float clus_pt;
0080   float clus_px;
0081   float clus_py;
0082   float clus_pz;
0083   float clus_theta;
0084   float clus_x, clus_y, clus_z, clus_t;
0085   float fmodphi, fmodeta;
0086   float clus_ecore;
0087   float clus_chi2;
0088   float clus_prob;
0089 
0090   //recal cluster info
0091   float rclus_energy;
0092   float rclus_eta;
0093   float rclus_phi;
0094   float rclus_pt;
0095   float rclus_px;
0096   float rclus_py;
0097   float rclus_pz;
0098   float rclus_theta;
0099   float rclus_x, rclus_y, rclus_z, rclus_t;
0100   float rclus_ecore, rclus_chi2, rclus_prob;
0101 
0102   //all truth particles
0103   float truthpx, truthpy, truthpz;
0104   float truthp;
0105   float truthphi;
0106   float trutheta;
0107   float truthpt;
0108   float truthenergy;
0109   int truthpid;
0110   int numparticlesinevent;
0111   int process_id;
0112 
0113   //clust truth variables
0114   float clustruthpx;
0115   float clustruthpy;
0116   float clustruthpz;
0117   float clustruthenergy;
0118   float clustruthpt;
0119   float clustruthphi;
0120   float clustrutheta;
0121   int clustruthpid;
0122   float hclustruthpx;
0123   float hclustruthpy;
0124   float hclustruthpz;
0125   float hclustruthenergy;
0126   float hclustruthpt;
0127   float hclustruthphi;
0128   float hclustrutheta;
0129   int hclustruthpid;
0130 
0131   //forward clusters
0132   float fclusenergy;
0133   float fclus_eta;
0134   float fclus_phi;
0135   float fclus_theta;
0136   float fclus_pt;
0137   int fclustruthpid;
0138   float fclustruthpx;
0139   float fclustruthpy;
0140   float fclustruthpz;
0141   float fclustruthenergy;
0142   float fclustruthpt;
0143   float fclustruthphi;
0144   float fclustrutheta;
0145   float fclus_px;
0146   float fclus_py;
0147   float fclus_pz;
0148 
0149   const float pi2 = -1.5707963;
0150   const float threepi2 = 4.71238898;
0151   const float pi = 3.1415926;
0152 };
0153 
0154 #endif  // __PHOTONS_H__