File indexing completed on 2025-08-05 08:12:12
0001
0002
0003
0004
0005
0006
0007 #ifndef TRACKRECO_PHTRUTHCLUSTERING_H
0008 #define TRACKRECO_PHTRUTHCLUSTERING_H
0009
0010 #include <fun4all/SubsysReco.h>
0011
0012
0013 #include <gsl/gsl_rng.h>
0014
0015
0016 #include <string> // for string
0017 #include <vector>
0018 #include <map>
0019 #include <set>
0020 #include <memory>
0021
0022 #include <TFile.h>
0023 #include <TNtuple.h>
0024 #include "TMVA/Tools.h"
0025 #include "TMVA/Reader.h"
0026 #include <TMVA/MethodCuts.h>
0027
0028
0029 class PHCompositeNode;
0030 class SvtxTrackMap;
0031 class SvtxTrack;
0032 class TrackPidAssoc;
0033 class PHG4TruthInfoContainer;
0034 class PHG4Particle;
0035
0036 class SvtxTrack;
0037
0038 class ElectronID : public SubsysReco
0039 {
0040 public:
0041 ElectronID(const std::string &name = "ElectronID", const std::string &filename = "_ElectronID.root");
0042 virtual ~ElectronID();
0043
0044 int Init(PHCompositeNode *topNode);
0045 int InitRun(PHCompositeNode *topNode);
0046 int process_event(PHCompositeNode *topNode);
0047 int End(PHCompositeNode *topNode);
0048
0049
0050 void setEMOPcutlimits(float EMOPlowerlimit, float EMOPhigherlimit) { EMOP_lowerlimit = EMOPlowerlimit; EMOP_higherlimit = EMOPhigherlimit; }
0051
0052
0053 void setHinOEMcutlimit(float HinOEMhigherlimit) { HinOEM_higherlimit = HinOEMhigherlimit; }
0054
0055
0056 void setPtcutlimit(float Ptlowerlimit, float Pthigherlimit) { Pt_lowerlimit = Ptlowerlimit; Pt_higherlimit = Pthigherlimit; }
0057
0058
0059 void setHOPcutlimit(float HOPlowerlimit) { HOP_lowerlimit = HOPlowerlimit; }
0060
0061
0062 void setTrackcutlimits(int Nmvtxlowerlimit, int Ninttlowerlimit, int Ntpclowerlimit, float Nqualityhigherlimit) {
0063 Nmvtx_lowerlimit = Nmvtxlowerlimit;
0064 Nintt_lowerlimit = Ninttlowerlimit;
0065 Ntpc_lowerlimit = Ntpclowerlimit;
0066 Nquality_higherlimit = Nqualityhigherlimit;
0067 }
0068
0069
0070 void setPROBcut(float tmp) {PROB_cut = tmp;}
0071
0072 void set_output_ntuple(bool outputntuple) {output_ntuple = outputntuple;}
0073
0074
0075 void setBDTcut(int isuseBDT_p, int isuseBDT_n, float bdtcut_p, float bdtcut_n) {ISUSE_BDT_p= isuseBDT_p; ISUSE_BDT_n= isuseBDT_n; BDT_cut_p = bdtcut_p; BDT_cut_n = bdtcut_n;}
0076
0077
0078 protected:
0079 bool output_ntuple;
0080
0081 TFile* OutputNtupleFile;
0082 std::string OutputFileName;
0083 TNtuple* ntpBDTresponse;
0084 TNtuple* ntpbeforecut;
0085 TNtuple* ntpcutEMOP;
0086 TNtuple* ntpcutEMOP_HinOEM;
0087 TNtuple* ntpcutEMOP_HinOEM_Pt;
0088 TNtuple* ntpcutEMOP_HinOEM_Pt_read;
0089 TNtuple* ntpcutBDT_read;
0090
0091 TNtuple* ntpcutHOP;
0092
0093 int EventNumber;
0094
0095 private:
0096
0097 int GetNodes(PHCompositeNode *topNode);
0098
0099 PHG4Particle* findMCmatch(SvtxTrack* track, PHG4TruthInfoContainer* truth_container);
0100
0101 TrackPidAssoc *_track_pid_assoc;
0102 SvtxTrackMap *_track_map;
0103
0104
0105 float EMOP_lowerlimit;
0106
0107 float EMOP_higherlimit;
0108
0109
0110 float PROB_cut;
0111
0112
0113 float HinOEM_higherlimit;
0114
0115
0116 float Pt_lowerlimit;
0117
0118 float Pt_higherlimit;
0119
0120
0121 float HOP_lowerlimit;
0122
0123
0124 int Nmvtx_lowerlimit;
0125
0126
0127 int Nintt_lowerlimit;
0128
0129
0130 int Ntpc_lowerlimit;
0131
0132
0133 float Nquality_higherlimit;
0134
0135
0136 float BDT_cut_p, BDT_cut_n;
0137 int ISUSE_BDT_p, ISUSE_BDT_n;
0138
0139 unsigned int _nlayers_maps = 3;
0140 unsigned int _nlayers_intt = 4;
0141 unsigned int _nlayers_tpc = 48;
0142
0143
0144 };
0145
0146 #endif