File indexing completed on 2025-08-03 08:14:07
0001 #ifndef __RICHEvaluator_H__
0002 #define __RICHEvaluator_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <math.h>
0006
0007 class TTree;
0008 class TFile;
0009 class TH1D;
0010
0011 class PHCompositeNode;
0012 class PHG4TruthInfoContainer;
0013 class PHG4Hit;
0014 class PHG4HitContainer;
0015 class SvtxTrackMap;
0016 class SvtxTrack;
0017 class TDatabasePDG;
0018
0019 class TrackProjectorPid;
0020 class SetupDualRICHAnalyzer;
0021
0022 class RICHEvaluator : public SubsysReco
0023 {
0024
0025 public:
0026
0027 RICHEvaluator(std::string richname, std::string tracksname, std::string filename);
0028
0029 int
0030 Init(PHCompositeNode*);
0031 int
0032 InitRun(PHCompositeNode*);
0033 int
0034 process_event(PHCompositeNode*);
0035 int
0036 End(PHCompositeNode*);
0037
0038
0039 void set_refractive_index( float newidx )
0040 {
0041 _refractive_index = newidx;
0042 return;
0043 }
0044
0045 private:
0046
0047
0048 void reset_tree_vars();
0049
0050
0051 int init_tree();
0052 int init_tree_small();
0053
0054
0055 double calculate_true_emission_angle( PHG4TruthInfoContainer* truthinfo, SvtxTrack * track, double index );
0056
0057
0058 double calculate_reco_mass( double mom, double theta_reco, double index );
0059
0060
0061 double calculate_true_mass( PHG4TruthInfoContainer* truthinfo, SvtxTrack * track);
0062
0063 bool _verbose;
0064
0065 int _ievent;
0066
0067
0068 std::string _detector;
0069
0070
0071 std::string _trackmap_name;
0072
0073
0074 std::string _richhits_name;
0075
0076
0077 float _refractive_index;
0078
0079
0080 std::string _foutname;
0081 TFile *_fout_root;
0082
0083
0084 TTree* _tree_rich;
0085 TTree* _tree_rich_small;
0086
0087 double _hit_x0;
0088 double _hit_y0;
0089 double _hit_z0;
0090
0091 double _emi_x;
0092 double _emi_y;
0093 double _emi_z;
0094
0095 double _track_px;
0096 double _track_py;
0097 double _track_pz;
0098
0099 double _mtrack_px;
0100 double _mtrack_py;
0101 double _mtrack_pz;
0102 double _mtrack_ptot;
0103
0104 double _track_e;
0105 double _mtrack_e;
0106 double _edep;
0107
0108 int _bankid;
0109 int _volumeid;
0110 int _hitid;
0111 int _pid;
0112 int _mpid;
0113 int _trackid;
0114 int _mtrackid;
0115 int _otrackid;
0116
0117 double _theta_true;
0118 double _theta_reco;
0119 double _theta_mean;
0120 double _theta_rms;
0121
0122
0123 TrackProjectorPid *_trackproj;
0124
0125
0126 SetupDualRICHAnalyzer *_acquire;
0127
0128
0129 TDatabasePDG *_pdg;
0130
0131
0132 float _radius;
0133
0134 };
0135
0136 #endif