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