CDF_2009_S8436959.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.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 /// @brief CDF inclusive isolated prompt photon cross-section 00012 class CDF_2009_S8436959 : public Analysis { 00013 public: 00014 00015 /// @name Constructors etc. 00016 //@{ 00017 00018 /// Constructor 00019 CDF_2009_S8436959() 00020 : Analysis("CDF_2009_S8436959") 00021 { } 00022 00023 //@} 00024 00025 00026 public: 00027 00028 /// @name Analysis methods 00029 //@{ 00030 00031 /// Book histograms and initialise projections before the run 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 = bookHisto1D(1, 1, 1); 00041 00042 } 00043 00044 00045 /// Perform the per-event analysis 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 /// Normalise histograms etc., after the run 00071 void finalize() { 00072 scale(_h_Et_photon, crossSection()/sumOfWeights()/2.0); 00073 } 00074 00075 //@} 00076 00077 00078 private: 00079 00080 /// @name Histograms 00081 //@{ 00082 Histo1DPtr _h_Et_photon; 00083 //@} 00084 00085 }; 00086 00087 00088 00089 // The hook for the plugin system 00090 DECLARE_RIVET_PLUGIN(CDF_2009_S8436959); 00091 00092 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |