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