00001 00007 #ifndef _MUON_TREE_H_ 00008 #define _MUON_TREE_H_ 00009 00010 #include "TFile.h" 00011 #include "TTree.h" 00012 #include "TH1F.h" 00013 00014 #include <iostream> 00015 00017 #define MaxSimHitEntries 10000 00018 00019 #define MaxOpticalPhoton 10000 00020 00021 using namespace std; 00022 00023 class MuonTree 00024 { 00025 public: 00026 MuonTree(); 00027 ~MuonTree(); 00028 00029 public: 00030 int create(const char* filename = "MuonRpc.root"); 00031 int reset(); 00032 int fill(); 00033 int close(); 00034 00035 string IntToString(int intValue); 00036 00038 public: 00039 int run; 00040 int evt; 00041 00043 int nhits_RPC; 00044 int nhits_AD1; 00045 int nhits_AD2; 00046 int nhits_IWS; 00047 int nhits_OWS; 00048 00050 int trk1_pdgId; 00051 00052 double trk1_t; 00053 double trk1_x; 00054 double trk1_y; 00055 double trk1_z; 00056 double trk1_r; 00057 00058 double trk1_e; 00059 double trk1_px; 00060 double trk1_py; 00061 double trk1_pz; 00062 double trk1_phi; 00063 00064 double trk1_ke; // kinematic energy 00065 double trk1_ve; // visible energy 00066 00067 // AD 1 hit information 00068 double npe[8][24]; // number of pe: 8 rings, 24 in each ring 00069 double tpe[8][24]; // time of first pe: 8 rings, 24 in each ring 00070 00071 // G4 truth statistics 00072 double TotDeInOil1; 00073 double TotDeInOil2; 00074 double TotDeInLso1; 00075 double TotDeInLso2; 00076 00077 double MuDeInOil1; 00078 double MuDeInOil2; 00079 double MuDeInLso1; 00080 double MuDeInLso2; 00081 00082 double MuDxInOil1; 00083 double MuDxInOil2; 00084 double MuDxInLso1; 00085 double MuDxInLso2; 00086 00087 // The first vertex of the first track from historian 00088 double his_t1; 00089 double his_x1; 00090 double his_y1; 00091 double his_z1; 00092 00093 // ------------------------------------------------------------- 00094 double oil1_p_x; // primary vertex in oil1 00095 double oil1_p_y; 00096 double oil1_p_z; 00097 00098 // Something might happen in this last step before it enters SST 00099 double oil1_e_x; // last vertex in oil1. 00100 double oil1_e_y; 00101 double oil1_e_z; 00102 00103 double oil1_p_px; // momentum at primary vertex in oil1 00104 double oil1_p_py; 00105 double oil1_p_pz; 00106 00107 // ------------------------------------------------------------- 00108 double oil2_p_x; // primary vertex in oil2 00109 double oil2_p_y; 00110 double oil2_p_z; 00111 00112 // Something might happen in this last step before it enters SST 00113 double oil2_e_x; // last vertex in oil2 00114 double oil2_e_y; 00115 double oil2_e_z; 00116 00117 double oil2_p_px; // momentum at primary vertex in oil2 00118 double oil2_p_py; 00119 double oil2_p_pz; 00120 // 00121 00122 // reconstructed values 00123 double phiRec; 00124 00125 double oil1_p_x_rec; // last vertex in oil1. 00126 double oil1_p_y_rec; 00127 double oil1_p_z_rec; 00128 00129 double oil2_p_x_rec; // last vertex in oil2 00130 double oil2_p_y_rec; 00131 double oil2_p_z_rec; 00132 00133 // Number of spallation neutrons 00134 int nNeutron; 00135 int nInOws; 00136 int nInOil1; 00137 int nInOil2; 00138 int nInLso1; 00139 int nInLso2; 00140 00141 private: 00142 TFile* m_file; 00143 TTree* m_tree; 00144 }; 00145 00146 00147 #endif // _MUON_TREE_H_