File indexing completed on 2025-08-03 08:15:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef TRUTHCONVERSIONEVAL_H__
0011 #define TRUTHCONVERSIONEVAL_H__
0012
0013 #include <fun4all/SubsysReco.h>
0014 #include <calobase/RawClusterContainer.h>
0015 #include <queue>
0016
0017 class PHCompositeNode;
0018 class PHG4TruthInfoContainer;
0019 class PHG4Particle;
0020 class PHG4VtxPoint;
0021 class Conversion;
0022 class SvtxTrackEval;
0023 class SvtxHitMap;
0024 class SvtxHit;
0025 class SvtxClusterMap;
0026 class SvtxCluster;
0027 class RawClusterContainer;
0028 class TTree;
0029 class TFile;
0030 class SVReco;
0031 class TrkrClusterContainer;
0032
0033 class VtxTest: public SubsysReco
0034 {
0035
0036 public:
0037
0038
0039
0040
0041
0042
0043
0044
0045 VtxTest(const std::string &name,unsigned int runnumber,
0046 int particleEmbed, int pythiaEmbed,bool makeTTree);
0047 ~VtxTest();
0048 int InitRun(PHCompositeNode*);
0049
0050
0051
0052
0053 int process_event(PHCompositeNode*);
0054 int End(PHCompositeNode*);
0055
0056 const RawClusterContainer* getClusters()const;
0057
0058 private:
0059 void doNodePointers(PHCompositeNode* topNode);
0060
0061
0062
0063
0064
0065 std::queue<std::pair<int,int>> numUnique(std::map<int,Conversion>* map,SvtxTrackEval* trackEval,RawClusterContainer* mainClusterContainer);
0066
0067 void findChildren(std::queue<std::pair<int,int>> missing,PHG4TruthInfoContainer* truthinfo);
0068
0069
0070 void processBackground(std::map<int,Conversion>* map,SvtxTrackEval* trackEval,TTree* tree);
0071
0072 int get_embed(PHG4Particle* particle, PHG4TruthInfoContainer* truthinfo) const;
0073 float vtoR(PHG4VtxPoint* vtx)const;
0074
0075 const static int s_kMAXParticles=200;
0076 const static int s_kMAXRecoMatch=20;
0077 const unsigned int _kRunNumber;
0078 const int _kParticleEmbed;
0079 const int _kPythiaEmbed;
0080 const bool _kMakeTTree;
0081 int _runNumber;
0082 TFile *_f=NULL;
0083 TTree *_tree=NULL;
0084 TTree *_signalCutTree=NULL;
0085 TTree *_h_backgroundCutTree=NULL;
0086 TTree *_e_backgroundCutTree=NULL;
0087 RawClusterContainer *_mainClusterContainer;
0088 PHG4TruthInfoContainer *_truthinfo;
0089 TrkrClusterContainer* _clusterMap;
0090 SvtxHitMap *_hitMap;
0091 std::string _foutname;
0092 SVReco *_vertexer=NULL;
0093
0094
0095 int _b_event;
0096 int _b_nVtx;
0097 int _b_Tpair;
0098 int _b_Rpair;
0099 double _b_rVtx[s_kMAXParticles];
0100 bool _b_pythia[s_kMAXParticles];
0101 float _b_electron_pt[s_kMAXParticles];
0102 float _b_positron_pt[s_kMAXParticles];
0103 float _b_electron_reco_pt[s_kMAXParticles];
0104 float _b_positron_reco_pt[s_kMAXParticles];
0105 float _b_e_deta[s_kMAXParticles];
0106 float _b_e_dphi[s_kMAXParticles];
0107 float _b_parent_pt [s_kMAXParticles];
0108 float _b_parent_eta [s_kMAXParticles];
0109 float _b_parent_phi [s_kMAXParticles];
0110 int _b_grandparent_id [s_kMAXParticles];
0111
0112
0113 int _b_nCluster [s_kMAXRecoMatch];
0114 int _b_fLayer [s_kMAXRecoMatch];
0115 float _b_cluster_dphi [s_kMAXRecoMatch];
0116 float _b_cluster_deta [s_kMAXRecoMatch];
0117 float _b_Mcluster_prob[s_kMAXRecoMatch];
0118 float _b_Scluster_prob[s_kMAXRecoMatch];
0119
0120
0121
0122 float _b_track_deta ;
0123 int _b_track_layer ;
0124 int _b_track_dlayer ;
0125 float _b_track_pT;
0126 float _b_ttrack_pT;
0127 double _b_approach ;
0128 double _b_vtx_radius ;
0129 double _b_vtx_phi ;
0130 double _b_vtx_eta ;
0131 double _b_vtx_x ;
0132 double _b_vtx_y ;
0133 double _b_vtx_z ;
0134 double _b_tvtx_eta ;
0135 double _b_tvtx_x ;
0136 double _b_tvtx_y ;
0137 double _b_tvtx_z ;
0138 double _b_tvtx_radius ;
0139 double _b_tvtx_phi ;
0140 double _b_vtxTrack_dist;
0141 float _b_vtx_chi2;
0142 float _b_photon_m;
0143 float _b_photon_pT;
0144 float _b_cluster_prob;
0145 float _b_track_dphi;
0146
0147
0148
0149
0150 float _bb_track_deta ;
0151 int _bb_track_layer ;
0152 int _bb_track_dlayer ;
0153 float _bb_track_pT;
0154 double _bb_approach ;
0155 double _bb_vtx_radius;
0156 double _bb_vtxTrack_dist;
0157 float _bb_vtx_chi2;
0158 float _bb_photon_m;
0159 float _bb_photon_pT;
0160 float _bb_cluster_prob;
0161 float _bb_track_dphi;
0162 int _bb_pid;
0163
0164
0165
0166 RawClusterContainer _conversionClusters;
0167
0168 const static int s_kTPCRADIUS=21;
0169
0170 float _kRAPIDITYACCEPT=1;
0171 };
0172
0173
0174
0175 #endif
0176
0177
0178