File indexing completed on 2025-08-05 08:12:43
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __BDiJetModule_H__
0009 #define __BDiJetModule_H__
0010
0011
0012 #include <fun4all/SubsysReco.h>
0013
0014
0015 #include <string>
0016 #include <vector>
0017
0018 #include "TMath.h"
0019
0020
0021 namespace PHGenFit {
0022 class Track;
0023 }
0024
0025 namespace genfit {
0026 class GFRaveVertexFactory;
0027 class Track;
0028 class GFRaveVertex;
0029 }
0030
0031 namespace PHGenFit {
0032 class Fitter;
0033 }
0034
0035 class SvtxTrack;
0036 class SvtxTrackMap;
0037 class SvtxVertexMap;
0038 class SvtxVertex;
0039 class PHCompositeNode;
0040 class PHG4TruthInfoContainer;
0041 class SvtxClusterMap;
0042 class SvtxEvalStack;
0043 class JetMap;
0044
0045 class TFile;
0046 class TTree;
0047
0048 class BDiJetModule: public SubsysReco {
0049
0050 public:
0051
0052 BDiJetModule(const std::string &name = "BDiJetModule",
0053 const std::string &ofName = "out.root");
0054
0055 int Init(PHCompositeNode*);
0056 int InitRun(PHCompositeNode*);
0057 int process_event(PHCompositeNode*);
0058 int End(PHCompositeNode*);
0059
0060 private:
0061
0062
0063 void ResetVariables();
0064 int GetNodes(PHCompositeNode *);
0065 void InitTree();
0066
0067 PHGenFit::Track* MakeGenFitTrack(PHCompositeNode *,
0068 const SvtxTrack* intrack,
0069 const SvtxVertex* vertex);
0070
0071
0072 void FillVertexMap(
0073 const std::vector<genfit::GFRaveVertex*> & rave_vertices,
0074 const std::vector<genfit::Track*> & gf_tracks);
0075
0076 int GetSVMass_mom(
0077 const genfit::GFRaveVertex* rave_vtx,
0078 float & vtx_mass,
0079 float & vtx_px,
0080 float & vtx_py,
0081 float & vtx_pz);
0082
0083
0084
0085 JetMap* _jetmap_truth;
0086 SvtxClusterMap* _clustermap;
0087 SvtxTrackMap* _trackmap;
0088 SvtxVertexMap* _vertexmap;
0089
0090
0091
0092 bool _verbose;
0093 bool _write_tree;
0094 bool _ana_truth;
0095 bool _ana_reco;
0096 bool _do_evt_display;
0097 bool _use_ladder_geom;
0098 bool _cut_jet;
0099 bool _cut_Ncluster;
0100
0101
0102 std::string _foutname;
0103 TFile *_f;
0104 TTree *_tree;
0105
0106
0107 int _b_event;
0108
0109 int _truthjet_n;
0110 int _truthjet_parton_flavor[10];
0111 int _truthjet_hadron_flavor[10];
0112 float _truthjet_pt[10];
0113 float _truthjet_eta[10];
0114 float _truthjet_phi[10];
0115
0116 float gf_prim_vtx[3];
0117 float gf_prim_vtx_err[3];
0118 int gf_prim_vtx_ntrk;
0119 float rv_prim_vtx[3];
0120 float rv_prim_vtx_err[3];
0121 int rv_prim_vtx_ntrk;
0122
0123 int rv_sv_njets;
0124 int rv_sv_jet_id[10];
0125 int rv_sv_jet_prop[10][2];
0126 float rv_sv_jet_pT[10];
0127 float rv_sv_jet_phi[10];
0128
0129 int rv_sv_pT00_nvtx[10];
0130 float rv_sv_pT00_vtx_x[10][30];
0131 float rv_sv_pT00_vtx_y[10][30];
0132 float rv_sv_pT00_vtx_z[10][30];
0133 float rv_sv_pT00_vtx_ex[10][30];
0134 float rv_sv_pT00_vtx_ey[10][30];
0135 float rv_sv_pT00_vtx_ez[10][30];
0136 int rv_sv_pT00_vtx_ntrk[10][30];
0137 int rv_sv_pT00_vtx_ntrk_good[10][30];
0138 float rv_sv_pT00_vtx_mass[10][30];
0139 float rv_sv_pT00_vtx_mass_corr[10][30];
0140 float rv_sv_pT00_vtx_pT[10][30];
0141
0142
0143
0144 int _ievent;
0145
0146 int _primary_pid_guess;
0147
0148 double _cut_min_pT;
0149 double _cut_chi2_ndf;
0150 double _cut_jet_pT;
0151 double _cut_jet_eta;
0152 double _cut_jet_R;
0153
0154 std::string _track_fitting_alg_name;
0155 PHGenFit::Fitter* _fitter;
0156
0157
0158 std::string _vertexing_method;
0159 genfit::GFRaveVertexFactory* _vertex_finder;
0160
0161 };
0162
0163 #endif