Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RecoConversionEval.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RecoConversionEval.h
1 #ifndef RecoConversionEval_H__
2 #define RecoConversionEval_H__
3 
4 //===============================================
8 //===============================================
9 #include <fun4all/SubsysReco.h>
10 #include <GenFit/GFRaveVertex.h>
11 #include <string>
12 #include <cmath>
13 namespace PHGenFit {
14  class Track;
15 } /* namespace PHGenFit */
16 class PHCompositeNode;
18 class SvtxEvalStack;
19 class SvtxVertex;
20 class SvtxTrack;
21 class SvtxTrackMap;
22 class SvtxHitMap;
25 class TTree;
26 class TFile;
27 class TLorentzVector;
28 class SVReco;
29 class VtxRegressor;
30 
32 
33  public:
34 
35  RecoConversionEval(const std::string &name,std::string tmvamethod, std::string tmvapath);
37  int Init(PHCompositeNode *topNode);
38  int InitRun(PHCompositeNode *topNode);
39  void doNodePointers(PHCompositeNode *topNode);
40  int process_event(PHCompositeNode *topNode);
41  int End(PHCompositeNode *topNode);
42 
43  private:
47  SvtxHitMap *_hitMap=NULL;
50  TFile *_file=NULL;
51  TTree *_treeSignal=NULL;
52  TTree *_treeBackground=NULL;
54 
56 
57 
58  bool hasNodePointers()const;
62  std::pair<PHGenFit::Track*,PHGenFit::Track*> refitTracks(genfit::GFRaveVertex* vtx,SvtxTrack* reco1,SvtxTrack* reco2);
64  TLorentzVector* reconstructPhoton(SvtxTrack* reco1,SvtxTrack* reco2);
66  TLorentzVector* reconstructPhoton(std::pair<PHGenFit::Track*,PHGenFit::Track*> recos);
67  inline bool detaCut(float eta1, float eta2) const{
68  return (eta1>eta2?eta1-eta2:eta2-eta1)<_kDetaCut;
69  }
70 
71  bool pairCuts(SvtxTrack* t1, SvtxTrack* t2)const;
76  bool hitCuts(SvtxTrack* t1, SvtxTrack* t2)const ;
77  bool vtxCuts(genfit::GFRaveVertex* vtxCan);
79  bool vtxTrackRZCut(TVector3 recoVertPos, SvtxTrack* track);
81  bool vtxTrackRPhiCut(TVector3 recoVertPos, SvtxTrack* track);
83  bool vtxRadiusCut(TVector3 recoVertPos);
85  bool photonCuts(TLorentzVector* photon)const;
86  /* cut on the distance between the closest point between the two tracks*/
88 
91  float _b_photon_m;
92  float _b_photon_pT;
95  float _b_track1_pT;
96  float _b_track2_pT;
97  bool _b_refit;
101  unsigned totalTracks=0;
102  unsigned passedpTEtaQ=0;
103  unsigned passedCluster=0;
104  unsigned passedPair=0;
105  unsigned passedVtx=0;
106  unsigned passedPhoton=0;
109  // I want these to be static constexpr
110  // TODO confirm these numbers
111  unsigned int _kNSiliconLayer=7;
114  float _kTrackPtCut=2.5;
115  float _kEMProbCut=.0;
116  float _kVtxRCut=1.84;
117  float _kDetaCut=.008;
118  float _kPhotonMmin=.27;
119  float _kPhotonMmax=8.;
120  float _kPhotonPTmin=0.039;
121  int _kDLayerCut=9;
123  //these are not useful
124  float _kFirstHit=1;
126  double _kApprochCut=30;
127  float _kVtxRPhiCut=.4;
128  float _kVtxRZCut=.4;
129  float _kVtxChi2Cut=.4;
130 
131  float _kElectronRestM=.005109989461;
132 };
133 
134 #endif // __RecoConversionEval_H__