D0_2008_S7554427.cc
Go to the documentation of this file.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 }
00024
00025
00026
00027
00028
00029
00030 void init() {
00031 ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON,
00032 40.0*GeV, 200.0*GeV, 0.2, true, true);
00033 addProjection(zfinder, "ZFinder");
00034
00035 _h_ZpT = bookHistogram1D(1, 1, 1);
00036 _h_forward_ZpT = bookHistogram1D(3, 1, 1);
00037 }
00038
00039
00040
00041
00042 void analyze(const Event & e) {
00043 const double weight = e.weight();
00044
00045 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00046 if (zfinder.bosons().size() == 1) {
00047 double yZ = fabs(zfinder.bosons()[0].momentum().rapidity());
00048 double pTZ = zfinder.bosons()[0].momentum().pT();
00049 _h_ZpT->fill(pTZ, weight);
00050 if (yZ > 2.0) {
00051 _h_forward_ZpT->fill(pTZ, weight);
00052 }
00053 }
00054 else {
00055 MSG_DEBUG("No unique lepton pair found.");
00056 }
00057
00058 }
00059
00060
00061
00062
00063 void finalize() {
00064 normalize(_h_ZpT);
00065 normalize(_h_forward_ZpT);
00066 }
00067
00068
00069
00070
00071 private:
00072
00073
00074
00075 AIDA::IHistogram1D * _h_ZpT;
00076 AIDA::IHistogram1D * _h_forward_ZpT;
00077
00078
00079 };
00080
00081
00082
00083
00084 DECLARE_RIVET_PLUGIN(D0_2008_S7554427);
00085
00086 }