CDF_2009_S8436959.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/LeadingParticlesFinalState.hh"
00007
00008 namespace Rivet {
00009
00010
00011
00012 class CDF_2009_S8436959 : public Analysis {
00013 public:
00014
00015
00016
00017
00018
00019 CDF_2009_S8436959()
00020 : Analysis("CDF_2009_S8436959")
00021 { }
00022
00023
00024
00025
00026 public:
00027
00028
00029
00030
00031
00032 void init() {
00033 FinalState fs;
00034 addProjection(fs, "FS");
00035
00036 LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0, 30.0*GeV));
00037 photonfs.addParticleId(PHOTON);
00038 addProjection(photonfs, "LeadingPhoton");
00039
00040 _h_Et_photon = bookHistogram1D(1, 1, 1);
00041
00042 }
00043
00044
00045
00046 void analyze(const Event& event) {
00047 const double weight = event.weight();
00048
00049 ParticleVector fs = applyProjection<FinalState>(event, "FS").particles();
00050 ParticleVector photons = applyProjection<LeadingParticlesFinalState>(event, "LeadingPhoton").particles();
00051 if (photons.size()!=1) {
00052 vetoEvent;
00053 }
00054 FourMomentum leadingPhoton = photons[0].momentum();
00055 double eta_P = leadingPhoton.eta();
00056 double phi_P = leadingPhoton.phi();
00057 FourMomentum mom_in_cone;
00058 foreach (const Particle& p, fs) {
00059 if (deltaR(eta_P, phi_P, p.momentum().eta(), p.momentum().phi()) < 0.4) {
00060 mom_in_cone += p.momentum();
00061 }
00062 }
00063 if (mom_in_cone.Et()-leadingPhoton.Et() > 2.0*GeV) {
00064 vetoEvent;
00065 }
00066 _h_Et_photon->fill(leadingPhoton.Et(), weight);
00067 }
00068
00069
00070
00071 void finalize() {
00072 scale(_h_Et_photon, crossSection()/sumOfWeights()/2.0);
00073 }
00074
00075
00076
00077
00078 private:
00079
00080
00081
00082 AIDA::IHistogram1D *_h_Et_photon;
00083
00084
00085 };
00086
00087
00088
00089
00090 DECLARE_RIVET_PLUGIN(CDF_2009_S8436959);
00091
00092 }