00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/ZFinder.hh"
00007 #include "Rivet/Projections/FastJets.hh"
00008
00009 namespace Rivet {
00010
00011
00012 class D0_2009_S8349509 : public Analysis {
00013 public:
00014
00015
00016
00017
00018
00019 D0_2009_S8349509() : Analysis("D0_2009_S8349509"),
00020 _inclusive_Z_sumofweights(0.0)
00021 {
00022 setBeams(PROTON, ANTIPROTON);
00023 }
00024
00025
00026
00027
00028
00029
00030
00031
00032 void init() {
00033 ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2);
00034 addProjection(zfinder, "ZFinder");
00035
00036 FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
00037 addProjection(conefinder, "ConeFinder");
00038
00039 _h_dphi_jet_Z25 = bookHistogram1D(1, 1, 1);
00040 _h_dphi_jet_Z45 = bookHistogram1D(2, 1, 1);
00041
00042 _h_dy_jet_Z25 = bookHistogram1D(3, 1, 1);
00043 _h_dy_jet_Z45 = bookHistogram1D(4, 1, 1);
00044
00045 _h_yboost_jet_Z25 = bookHistogram1D(5, 1, 1);
00046 _h_yboost_jet_Z45 = bookHistogram1D(6, 1, 1);
00047
00048 _inclusive_Z_sumofweights = 0.0;
00049 }
00050
00051
00052 void analyze(const Event& event) {
00053 const double weight = event.weight();
00054
00055 const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00056 if (zfinder.particles().size()==1) {
00057
00058 _inclusive_Z_sumofweights += weight;
00059
00060 const FourMomentum Zmom = zfinder.particles()[0].momentum();
00061 if (Zmom.pT()<25.0*GeV) {
00062 vetoEvent;
00063 }
00064
00065 Jets jets;
00066 foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
00067 if (fabs(j.momentum().pseudorapidity()) < 2.8) {
00068 jets.push_back(j);
00069 break;
00070 }
00071 }
00072
00073
00074 if (jets.size() < 1) {
00075 getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
00076 << " because no jets pass cuts " << endl;
00077 vetoEvent;
00078 }
00079
00080
00081 foreach (const Jet& j, jets) {
00082 foreach (const Particle& mu, zfinder.constituentsFinalState().particles()) {
00083 if (deltaR(mu.momentum(), j.momentum()) < 0.5) {
00084 vetoEvent;
00085 }
00086 }
00087 }
00088
00089 const FourMomentum jetmom = jets[0].momentum();
00090 double yZ = Zmom.rapidity();
00091 double yjet = jetmom.rapidity();
00092 double dphi = deltaPhi(Zmom.phi(), jetmom.phi());
00093 double dy = fabs(yZ-yjet);
00094 double yboost = fabs(yZ+yjet)/2.0;
00095
00096 if (Zmom.pT() > 25.0*GeV) {
00097 _h_dphi_jet_Z25->fill(dphi,weight);
00098 _h_dy_jet_Z25->fill(dy, weight);
00099 _h_yboost_jet_Z25->fill(yboost, weight);
00100 }
00101 if (Zmom.pT() > 45.0*GeV) {
00102 _h_dphi_jet_Z45->fill(dphi,weight);
00103 _h_dy_jet_Z45->fill(dy, weight);
00104 _h_yboost_jet_Z45->fill(yboost, weight);
00105 }
00106 }
00107
00108 }
00109
00110
00111 void finalize() {
00112 if (_inclusive_Z_sumofweights == 0.0) return;
00113 scale(_h_dphi_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00114 scale(_h_dphi_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00115 scale(_h_dy_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00116 scale(_h_dy_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00117 scale(_h_yboost_jet_Z25, 1.0/_inclusive_Z_sumofweights);
00118 scale(_h_yboost_jet_Z45, 1.0/_inclusive_Z_sumofweights);
00119 }
00120
00121
00122
00123 private:
00124
00125
00126
00127 private:
00128
00129
00130
00131 AIDA::IHistogram1D *_h_dphi_jet_Z25;
00132 AIDA::IHistogram1D *_h_dphi_jet_Z45;
00133
00134 AIDA::IHistogram1D *_h_dy_jet_Z25;
00135 AIDA::IHistogram1D *_h_dy_jet_Z45;
00136
00137 AIDA::IHistogram1D *_h_yboost_jet_Z25;
00138 AIDA::IHistogram1D *_h_yboost_jet_Z45;
00139
00140
00141 double _inclusive_Z_sumofweights;
00142
00143 };
00144
00145
00146
00147
00148 AnalysisBuilder<D0_2009_S8349509> plugin_D0_2009_S8349509;
00149
00150 }