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
00008 namespace Rivet {
00009
00010
00011
00012
00013
00014
00015 class D0_2008_S7554427 : public Analysis {
00016
00017 public:
00018
00019
00020 D0_2008_S7554427() : Analysis("D0_2008_S7554427")
00021 {
00022
00023 setBeams(PROTON, ANTIPROTON);
00024 }
00025
00026
00027
00028
00029
00030
00031 void init() {
00032 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00033 40.0*GeV, 200.0*GeV, 0.2);
00034 addProjection(zfinder, "ZFinder");
00035
00036 _h_ZpT = bookHistogram1D(1, 1, 1);
00037 _h_forward_ZpT = bookHistogram1D(3, 1, 1);
00038 }
00039
00040
00041
00042
00043 void analyze(const Event & e) {
00044 const double weight = e.weight();
00045
00046 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00047 if (zfinder.particles().size() == 1) {
00048 double yZ = fabs(zfinder.particles()[0].momentum().rapidity());
00049 double pTZ = zfinder.particles()[0].momentum().pT();
00050 _h_ZpT->fill(pTZ, weight);
00051 if (yZ > 2.0) {
00052 _h_forward_ZpT->fill(pTZ, weight);
00053 }
00054 }
00055 else {
00056 getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
00057 }
00058
00059 }
00060
00061
00062
00063
00064 void finalize() {
00065 normalize(_h_ZpT);
00066 normalize(_h_forward_ZpT);
00067 }
00068
00069
00070
00071
00072 private:
00073
00074
00075
00076 AIDA::IHistogram1D * _h_ZpT;
00077 AIDA::IHistogram1D * _h_forward_ZpT;
00078
00079
00080 };
00081
00082
00083
00084
00085 AnalysisBuilder<D0_2008_S7554427> plugin_D0_2008_S7554427;
00086
00087 }