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