D0_2006_S6438750.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/Projections/FinalState.hh"
00005 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
00006 #include "Rivet/Projections/VetoedFinalState.hh"
00007 #include "Rivet/RivetAIDA.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   /// @brief D0 inclusive isolated photon cross-section vs. \f$ p_\perp(gamma) \f$.
00013   /// @author Andy Buckley
00014   /// @author Gavin Hesketh
00015   class D0_2006_S6438750 : public Analysis {
00016 
00017   public:
00018 
00019     /// @name Constructors etc.
00020     //@{
00021 
00022     /// Default constructor.
00023     D0_2006_S6438750() : Analysis("D0_2006_S6438750")
00024     {
00025       setBeams(PROTON, ANTIPROTON);
00026       setNeedsCrossSection(true);
00027     }
00028 
00029     //@}
00030 
00031 
00032     /// @name Analysis methods
00033     //@{
00034 
00035     void init() {
00036       // General FS for photon isolation
00037       FinalState fs;
00038       addProjection(fs, "AllFS");
00039 
00040       // Get leading photon
00041       LeadingParticlesFinalState photonfs(FinalState(-0.9, 0.9, 23.0*GeV));
00042       photonfs.addParticleId(PHOTON);
00043       addProjection(photonfs, "LeadingPhoton");
00044 
00045       // Book histograms
00046       _h_pTgamma = bookHistogram1D(1, 1, 1);
00047     }
00048 
00049 
00050     /// Do the analysis
00051     void analyze(const Event& event) {
00052 
00053       // Get the photon
00054       const FinalState& photonfs = applyProjection<FinalState>(event, "LeadingPhoton");
00055       if (photonfs.particles().size() != 1) {
00056         vetoEvent;
00057       }
00058       const FourMomentum photon = photonfs.particles().front().momentum();
00059 
00060       // Isolate photon by ensuring that a 0.4 cone around it contains less than 10% of the photon's energy
00061       double E_P   = photon.E();
00062       double eta_P = photon.pseudorapidity();
00063       double phi_P = photon.azimuthalAngle();
00064       double econe = 0.0;
00065       foreach (const Particle& p, applyProjection<FinalState>(event, "AllFS").particles()) {
00066         if (deltaR(eta_P, phi_P,
00067                    p.momentum().pseudorapidity(), p.momentum().azimuthalAngle()) < 0.4) {
00068           econe += p.momentum().E();
00069           if (econe/E_P > 1.1) {
00070             vetoEvent;
00071           }
00072         }
00073       }
00074 
00075       // Fill histo
00076       const double weight = event.weight();
00077       _h_pTgamma->fill(photon.pT(), weight);
00078     }
00079 
00080 
00081 
00082     // Finalize
00083     void finalize() {
00084       const double lumi_gen = sumOfWeights()/crossSection();
00085       // Divide by effective lumi, plus rapidity bin width of 1.8
00086       scale(_h_pTgamma, 1/lumi_gen * 1/1.8);
00087     }
00088 
00089     //@}
00090 
00091 
00092   private:
00093 
00094     /// @name Histograms
00095     //@{
00096     AIDA::IHistogram1D* _h_pTgamma;
00097     //@}
00098 
00099   };
00100 
00101 
00102 
00103   // This global object acts as a hook for the plugin system
00104   AnalysisBuilder<D0_2006_S6438750> plugin_D0_2006_S6438750;
00105 
00106 }