Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ElectronID.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ElectronID.h
1 
7 #ifndef TRACKRECO_PHTRUTHCLUSTERING_H
8 #define TRACKRECO_PHTRUTHCLUSTERING_H
9 
10 #include <fun4all/SubsysReco.h>
11 
12 // rootcint barfs with this header so we need to hide it
13 #include <gsl/gsl_rng.h>
14 
15 
16 #include <string> // for string
17 #include <vector>
18 #include <map>
19 #include <set>
20 #include <memory>
21 
22 #include <TFile.h>
23 #include <TNtuple.h>
24 #include "TMVA/Tools.h"
25 #include "TMVA/Reader.h"
26 #include <TMVA/MethodCuts.h>
27 
28 // forward declarations
29 class PHCompositeNode;
30 class SvtxTrackMap;
31 class SvtxTrack;
32 class TrackPidAssoc;
34 class PHG4Particle;
35 
36 class SvtxTrack;
37 
38 class ElectronID : public SubsysReco
39 {
40 public:
41  ElectronID(const std::string &name = "ElectronID", const std::string &filename = "_ElectronID.root");
42  virtual ~ElectronID();
43 
44  int Init(PHCompositeNode *topNode);
45  int InitRun(PHCompositeNode *topNode);
46  int process_event(PHCompositeNode *topNode);
47  int End(PHCompositeNode *topNode);
48 
50  void setEMOPcutlimits(float EMOPlowerlimit, float EMOPhigherlimit) { EMOP_lowerlimit = EMOPlowerlimit; EMOP_higherlimit = EMOPhigherlimit; }
51 
53  void setHinOEMcutlimit(float HinOEMhigherlimit) { HinOEM_higherlimit = HinOEMhigherlimit; }
54 
56  void setPtcutlimit(float Ptlowerlimit, float Pthigherlimit) { Pt_lowerlimit = Ptlowerlimit; Pt_higherlimit = Pthigherlimit; }
57 
59  void setHOPcutlimit(float HOPlowerlimit) { HOP_lowerlimit = HOPlowerlimit; }
60 
62  void setTrackcutlimits(int Nmvtxlowerlimit, int Ninttlowerlimit, int Ntpclowerlimit, float Nqualityhigherlimit) {
63  Nmvtx_lowerlimit = Nmvtxlowerlimit;
64  Nintt_lowerlimit = Ninttlowerlimit;
65  Ntpc_lowerlimit = Ntpclowerlimit;
66  Nquality_higherlimit = Nqualityhigherlimit;
67  }
68 
70  void setPROBcut(float tmp) {PROB_cut = tmp;}
71 
72  void set_output_ntuple(bool outputntuple) {output_ntuple = outputntuple;}
73 
75  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;}
76 
77 
78 protected:
80 
83  TNtuple* ntpBDTresponse; //write ntuple for BDTresponse
84  TNtuple* ntpbeforecut; //write ntuple before any cuts
85  TNtuple* ntpcutEMOP; //write ntuple with only EMOP cut
86  TNtuple* ntpcutEMOP_HinOEM; //write ntuple with EMOP & HinOEM cuts
87  TNtuple* ntpcutEMOP_HinOEM_Pt; //write ntuple with EMOP & HinOEM & Pt cuts
88  TNtuple* ntpcutEMOP_HinOEM_Pt_read; //write ntuple with EMOP & HinOEM & Pt cuts in the situation of reading back the association map.
89  TNtuple* ntpcutBDT_read; //write ntuple with BDT & Pt cuts in the situation of reading back the association map.
90 
91  TNtuple* ntpcutHOP; //write ntuple with only HOP cut
92 
94 
95 private:
97 int GetNodes(PHCompositeNode *topNode);
98 
99 PHG4Particle* findMCmatch(SvtxTrack* track, PHG4TruthInfoContainer* truth_container);
100 
103 
108 
110  float PROB_cut;
111 
114 
119 
122 
125 
128 
131 
134 
137  int ISUSE_BDT_p, ISUSE_BDT_n;//0 for no; 1 for yes
138 
139  unsigned int _nlayers_maps = 3;
140  unsigned int _nlayers_intt = 4;
141  unsigned int _nlayers_tpc = 48;
142 
143 
144 };
145 
146 #endif