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