MarlinKinfitProcessors  0.4.2
ZH5CFit.h
1 #ifndef ZH5CFit_h
2 #define ZH5CFit_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 #include <TFile.h>
8 #include <TTree.h>
9 #include "TopEventILC.h"
10 #include <vector>
11 
12 using namespace lcio ;
13 using namespace marlin ;
14 
15 
34 class ZH5CFit : public Processor {
35 
36  public:
37 
38  virtual Processor* newProcessor() { return new ZH5CFit ; }
39 
40 
41  ZH5CFit() ;
42 
46  virtual void init() ;
47 
50  virtual void processRunHeader( LCRunHeader* run ) ;
51 
54  virtual void processEvent( LCEvent * evt ) ;
55 
56 
57  virtual void check( LCEvent * evt ) ;
58 
59 
62  virtual void end() ;
63 
64  double JetEnergyResolution(double E);
65 
66  void compcorrect();
67  void SetZero();
68  protected:
69 
72  std::string _jetcolName{}, _name{}, _OutputCollection{} ;
75  float _ecm{}, _isrpzmax{};
76  int _fitISR{}, _ifitter{}, _ievttrace{};
77  bool _traceall{};
78  double _errene{}, _errtheta{}, _errphi{};
79  std::string _OutCol{};
80  double b{}, ISRPzMaxB{};
81 
82  float prob{}, bestprob{}, bestnit{}, bestmassZ{}, bestmassH{}, beststartmassZ{}, beststartmassH{}, bestphotonenergy{}, startmassZ{}, startmassH{}, variable{};
83  float chi2best;
84  float errorcode;
85  float Zmomentum[3]{}, Hmomentum[3]{}, ISRmomentum[3]{};
86  float Z_Energy{}, H_Energy{};
87  float momentum[3]{}, energy{};
88  int _nRun{}, _nEvt{}, nit{}, nCo{};
89 
90  int bestperm{}, errorflag{};
91  TTree *ZHTree{};
92  TFile* _fout = nullptr ;
93 
94  float Hmass_before_fit{}, Hmass_after_fit{}, Hmass_NoFit{};
95  float Error_code{};
96  float hpull_jet1_E{}, hpull_jet2_E{}, hpull_jet3_E{}, hpull_jet4_E{};
97  float hpull_jet1_th{}, hpull_jet2_th{}, hpull_jet3_th{}, hpull_jet4_th{};
98  float hpull_jet1_phi{}, hpull_jet2_phi{}, hpull_jet3_phi{}, hpull_jet4_phi{};
99  int jetmatch{}, jetmatchth{}, jetmatchphi{};
100  std::string _outfile{};
101 
102  int besterr{};
103  double bestzvalue{} ;
104  double chi2startmassZ{}, chi2startmassH {};
105 
106  double Px{}, Px2{}, Py{}, Py2{}, Pz{}, Pz2{}, pT2{}, P{}, P2{};
107  double SigPx2{}, SigPxSigPy{}, SigPxSigPz{}, SigPy2{}, SigPySigPz{}, SigPz2{}, SigE2{};
108  double dth_dpx{}, dth_dpy{}, dth_dpz{}, dphi_dpx{}, dphi_dpy{}, JetResE{}, JetResTheta{}, JetResPhi{};
109 
110 
111  std::string _colMCP{} ;
112  std::string _errorflowcollection {};
113  std::string _SLDCol {};
114  int nSLDB{};
115  int nSLDC{};
116  int nSLDBC{};
117  typedef std::vector<int> IntVector;
118  IntVector B_index{};
119  IntVector C_index{};
120  double E_lab;
121  double Elab;
122  int _NuE{};
123  int _useErrorFlow{};
124  float sigmaScaleFactor{};
125  std::string _NuCorrector{};
126  float ENuplus{};
127  float ENuminus{};
128  float l_px{};
129  float l_py{};
130  float l_pz{};
131  float l_p{};
132  float l_theta{};
133  float l_phi{};
134  float delta_theta[4]{};
135  float delta_phi[4]{};
136  int bestjet_th{};
137  int bestjet_phi{};
138  int bestjet{};
139  int correction{};
140  //output
141  // TTree *outTree;
142 
143 } ;
144 
145 #endif
An example processor for a kinematic fit.
Definition: ZH5CFit.h:34