rivet is hosted by Hepforge, IPPP Durham
CDF_2005_S6080774.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/IdentifiedFinalState.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   /// @brief CDF diff cross-sections for prompt di-photon production
00010   class CDF_2005_S6080774 : public Analysis {
00011   public:
00012 
00013     /// Constructor
00014     CDF_2005_S6080774()
00015       : Analysis("CDF_2005_S6080774")
00016     {    }
00017 
00018 
00019     /// @name Analysis methods
00020     //@{
00021 
00022     void init() {
00023       FinalState fs;
00024       addProjection(fs, "FS");
00025 
00026       IdentifiedFinalState ifs(-0.9, 0.9, 13.0*GeV);
00027       ifs.acceptId(PID::PHOTON);
00028       addProjection(ifs, "IFS");
00029 
00030       for (size_t yAxisId=1; yAxisId<5; ++yAxisId) {
00031         _h_m_PP.push_back(bookHisto1D(1, 1, yAxisId));
00032         _h_pT_PP.push_back(bookHisto1D(2, 1, yAxisId));
00033         _h_dphi_PP.push_back(bookHisto1D(3, 1, yAxisId));
00034       }
00035     }
00036 
00037 
00038     void analyze(const Event& event) {
00039       const double weight = event.weight();
00040 
00041       Particles photons = applyProjection<IdentifiedFinalState>(event, "IFS").particlesByPt();
00042       if (photons.size() < 2 || photons[0].pT() < 14.0*GeV) {
00043         vetoEvent;
00044       }
00045 
00046       // Isolate photons with ET_sum in cone
00047       Particles isolated_photons;
00048       Particles fs = applyProjection<FinalState>(event, "FS").particles();
00049       foreach (const Particle& photon, photons) {
00050         FourMomentum mom_in_cone;
00051         double eta_P = photon.eta();
00052         double phi_P = photon.momentum().phi();
00053         foreach (const Particle& p, fs) {
00054           if (deltaR(eta_P, phi_P, p.eta(), p.momentum().phi()) < 0.4) {
00055             mom_in_cone += p.momentum();
00056           }
00057         }
00058         if (mom_in_cone.Et()-photon.momentum().Et() < 1.0*GeV) {
00059           isolated_photons.push_back(photon);
00060         }
00061       }
00062 
00063       if (isolated_photons.size() != 2) {
00064         vetoEvent;
00065       }
00066 
00067       FourMomentum mom_PP = isolated_photons[0].momentum() + isolated_photons[1].momentum();
00068       for (size_t i=0; i<4; ++i) {
00069         _h_m_PP[i]->fill(mom_PP.mass(), weight);
00070         _h_pT_PP[i]->fill(mom_PP.pT(), weight);
00071         _h_dphi_PP[i]->fill(mapAngle0ToPi(isolated_photons[0].momentum().phi()-
00072                                           isolated_photons[1].momentum().phi())/M_PI, weight);
00073       }
00074     }
00075 
00076 
00077     void finalize() {
00078       for (size_t i=0; i<4; ++i) {
00079         scale(_h_m_PP[i], crossSection()/sumOfWeights());
00080         scale(_h_pT_PP[i], crossSection()/sumOfWeights());
00081         scale(_h_dphi_PP[i], crossSection()/M_PI/sumOfWeights());
00082       }
00083     }
00084 
00085     //@}
00086 
00087 
00088   private:
00089 
00090     /// @name Histograms
00091     //@{
00092     std::vector<Histo1DPtr> _h_m_PP;
00093     std::vector<Histo1DPtr> _h_pT_PP;
00094     std::vector<Histo1DPtr> _h_dphi_PP;
00095     //@}
00096 
00097 
00098   };
00099 
00100 
00101 
00102   // The hook for the plugin system
00103   DECLARE_RIVET_PLUGIN(CDF_2005_S6080774);
00104 
00105 }