D0_2010_S8570965.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/IdentifiedFinalState.hh" 00007 #include "Rivet/Tools/BinnedHistogram.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief D0 direct photon pair production 00013 class D0_2010_S8570965 : public Analysis { 00014 00015 typedef std::pair<double, double> doublepair; 00016 00017 00018 public: 00019 00020 00021 D0_2010_S8570965() 00022 : Analysis("D0_2010_S8570965") 00023 { } 00024 00025 00026 public: 00027 00028 void init() { 00029 FinalState fs; 00030 addProjection(fs, "FS"); 00031 00032 IdentifiedFinalState ifs(-0.9, 0.9, 20.0*GeV); 00033 ifs.acceptId(PHOTON); 00034 addProjection(ifs, "IFS"); 00035 00036 _h_M = bookHisto1D(1, 1, 1); 00037 _h_pT = bookHisto1D(2, 1, 1); 00038 _h_dPhi = bookHisto1D(3, 1, 1); 00039 _h_costheta = bookHisto1D(4, 1, 1); 00040 00041 std::pair<double, double> M_ranges[] = { std::make_pair(30.0, 50.0), 00042 std::make_pair(50.0, 80.0), 00043 std::make_pair(80.0, 350.0) }; 00044 00045 for (size_t i=0; i<3; ++i) { 00046 _h_pT_M.addHistogram(M_ranges[i].first, M_ranges[i].second, bookHisto1D(5+3*i, 1, 1)); 00047 _h_dPhi_M.addHistogram(M_ranges[i].first, M_ranges[i].second, bookHisto1D(6+3*i, 1, 1)); 00048 _h_costheta_M.addHistogram(M_ranges[i].first, M_ranges[i].second, bookHisto1D(7+3*i, 1, 1)); 00049 } 00050 } 00051 00052 00053 /// Perform the per-event analysis 00054 void analyze(const Event& event) { 00055 const double weight = event.weight(); 00056 00057 ParticleVector photons = applyProjection<IdentifiedFinalState>(event, "IFS").particlesByPt(); 00058 if (photons.size() < 2 || 00059 (photons[0].momentum().pT() < 21.0*GeV)) { 00060 vetoEvent; 00061 } 00062 00063 // Isolate photons with ET_sum in cone 00064 ParticleVector isolated_photons; 00065 ParticleVector fs = applyProjection<FinalState>(event, "FS").particles(); 00066 foreach (const Particle& photon, photons) { 00067 double eta_P = photon.momentum().eta(); 00068 double phi_P = photon.momentum().phi(); 00069 double Etsum=0.0; 00070 foreach (const Particle& p, fs) { 00071 if (p.genParticle().barcode()!=photon.genParticle().barcode() && 00072 deltaR(eta_P, phi_P, p.momentum().eta(), p.momentum().phi()) < 0.4) { 00073 Etsum += p.momentum().Et(); 00074 } 00075 } 00076 if (Etsum<2.5*GeV) { 00077 isolated_photons.push_back(photon); 00078 } 00079 } 00080 00081 if (isolated_photons.size() != 2) { 00082 vetoEvent; 00083 } 00084 std::sort(isolated_photons.begin(), isolated_photons.end(), cmpParticleByPt); 00085 00086 FourMomentum y1=isolated_photons[0].momentum(); 00087 FourMomentum y2=isolated_photons[1].momentum(); 00088 if (deltaR(y1, y2)<0.4) { 00089 vetoEvent; 00090 } 00091 00092 FourMomentum yy=y1+y2; 00093 double Myy = yy.mass()/GeV; 00094 if (Myy<30.0 || Myy>350.0) { 00095 vetoEvent; 00096 } 00097 00098 double pTyy = yy.pT()/GeV; 00099 if (Myy<pTyy) { 00100 vetoEvent; 00101 } 00102 00103 double dPhiyy = mapAngle0ToPi(y1.phi()-y2.phi()); 00104 if (dPhiyy<0.5*M_PI) { 00105 vetoEvent; 00106 } 00107 00108 double costhetayy = fabs(tanh((y1.eta()-y2.eta())/2.0)); 00109 00110 _h_M->fill(Myy, weight); 00111 _h_pT->fill(pTyy, weight); 00112 _h_dPhi->fill(dPhiyy, weight); 00113 _h_costheta->fill(costhetayy, weight); 00114 00115 _h_pT_M.fill(Myy, pTyy, weight); 00116 _h_dPhi_M.fill(Myy, dPhiyy, weight); 00117 _h_costheta_M.fill(Myy, costhetayy, weight); 00118 } 00119 00120 00121 void finalize() { 00122 00123 scale(_h_M, crossSection()/sumOfWeights()); 00124 scale(_h_pT, crossSection()/sumOfWeights()); 00125 scale(_h_dPhi, crossSection()/sumOfWeights()); 00126 scale(_h_costheta, crossSection()/sumOfWeights()); 00127 00128 _h_pT_M.scale(crossSection()/sumOfWeights(), this); 00129 _h_dPhi_M.scale(crossSection()/sumOfWeights(), this); 00130 _h_costheta_M.scale(crossSection()/sumOfWeights(), this); 00131 00132 } 00133 00134 00135 private: 00136 00137 Histo1DPtr _h_M; 00138 Histo1DPtr _h_pT; 00139 Histo1DPtr _h_dPhi; 00140 Histo1DPtr _h_costheta; 00141 BinnedHistogram<double> _h_pT_M; 00142 BinnedHistogram<double> _h_dPhi_M; 00143 BinnedHistogram<double> _h_costheta_M; 00144 00145 }; 00146 00147 00148 00149 // The hook for the plugin system 00150 DECLARE_RIVET_PLUGIN(D0_2010_S8570965); 00151 00152 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |