00001
00002 #ifndef RIVET_ExampleTree_HH
00003 #define RIVET_ExampleTree_HH
00004
00005 #include "Rivet/Analysis.hh"
00006 #include "Rivet/Projections/ChargedLeptons.hh"
00007 #include "Rivet/Projections/TotalVisibleMomentum.hh"
00008 #include "Rivet/Projections/KtJets.hh"
00009 #include "Rivet/Projections/WZandh.hh"
00010 #include "Rivet/RivetAIDA.fhh"
00011
00012
00013 #ifdef HAVE_ROOT
00014 #include "TTree.h"
00015 #include "TFile.h"
00016 #include "TString.h"
00017 #endif
00018
00019
00020 namespace Rivet {
00021
00022
00023
00024
00025 class ExampleTree : public Analysis {
00026
00027 public:
00028
00029
00030 inline ExampleTree()
00031 : _fsproj(-4.0, 4.0, 0.0), _chgleptonsproj(_fsproj),
00032 _ktjetsproj(_fsproj), _wzandhproj(), _vfsproj(_fsproj),
00033 _totvismomproj(_fsproj)
00034 {
00035
00036 _vfsproj
00037 .addVetoDetail(12, 10.0, 50.0)
00038 .addVetoId(14)
00039 .addVetoId(16)
00040 .addVetoId(-12)
00041 .addVetoId(-14)
00042 .addVetoId(-16)
00043 .addVetoId(1000022);
00044 _totvismomproj = TotalVisibleMomentum(_vfsproj);
00045
00046 addProjection(_fsproj);
00047 addProjection(_chgleptonsproj);
00048 addProjection(_ktjetsproj);
00049 addProjection(_wzandhproj);
00050 addProjection(_vfsproj);
00051 addProjection(_totvismomproj);
00052 }
00053
00054 inline ~ExampleTree() {}
00055
00056 public:
00057
00058
00059 static Analysis* create() { return new ExampleTree(); }
00060
00061
00062 inline string getName() const {
00063 return "ExampleTree";
00064 }
00065
00066 public:
00067
00068
00069 void init();
00070
00071
00072 void analyze(const Event& event);
00073
00074
00075 void finalize();
00076
00077
00078 private:
00079
00080
00081 FinalState _fsproj;
00082
00083
00084 ChargedLeptons _chgleptonsproj;
00085
00086
00087 KtJets _ktjetsproj;
00088
00089
00090 WZandh _wzandhproj;
00091
00092
00093 VetoedFinalState _vfsproj;
00094
00095
00096 TotalVisibleMomentum _totvismomproj;
00097
00098
00099 #ifdef HAVE_ROOT
00100 private:
00101
00102
00103 TTree* _rivetTree;
00104
00105
00106 TFile* _treeFile;
00107
00108
00109 TString _treeFileName;
00110 #endif
00111
00112
00113 private:
00114
00115
00116
00117
00118 int _nevt;
00119
00120
00121 int _nvb;
00122
00123 float _vbvec[8][4];
00124
00125 int _vbtype[8];
00126
00127
00128 int _njet;
00129
00130 float _vjet[50][4];
00131
00132
00133 int _nsub;
00134
00135 float _sjet3[200][4];
00136
00137 float _ysubsj[200][4];
00138
00139
00140 int _nlep;
00141
00142 int _leptype[150][3];
00143 float _vlep[150][4];
00144
00145
00146 int _npart;
00147 float _ppart[4000][4];
00148 int _pid[4000];
00149 int _mo[4000];
00150
00151
00152 float _esumr[4];
00153
00154
00155
00156 private:
00157
00158
00159 ExampleTree& operator=(const ExampleTree&);
00160
00161
00162 int _jet_pt_cut;
00163
00164
00165 int _subj_pt_cut;
00166
00167
00168 int _lepton_pt_cut;
00169
00170
00171 bool _store_partons;
00172 };
00173
00174 }
00175
00176 #endif