OPAL_1998_S3749908.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/Beam.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/ChargedFinalState.hh" 00006 #include "Rivet/Projections/UnstableFinalState.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief OPAL photon/light meson paper 00012 /// @author Peter Richardson 00013 class OPAL_1998_S3749908 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 OPAL_1998_S3749908() 00018 : Analysis("OPAL_1998_S3749908") 00019 {} 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 void init() { 00026 addProjection(Beam(), "Beams"); 00027 addProjection(ChargedFinalState(), "FS"); 00028 addProjection(UnstableFinalState(), "UFS"); 00029 _histXePhoton = bookHisto1D( 2, 1, 1); 00030 _histXiPhoton = bookHisto1D( 3, 1, 1); 00031 _histXePi = bookHisto1D( 4, 1, 1); 00032 _histXiPi = bookHisto1D( 5, 1, 1); 00033 _histXeEta = bookHisto1D( 6, 1, 1); 00034 _histXiEta = bookHisto1D( 7, 1, 1); 00035 _histXeRho = bookHisto1D( 8, 1, 1); 00036 _histXiRho = bookHisto1D( 9, 1, 1); 00037 _histXeOmega = bookHisto1D(10, 1, 1); 00038 _histXiOmega = bookHisto1D(11, 1, 1); 00039 _histXeEtaPrime = bookHisto1D(12, 1, 1); 00040 _histXiEtaPrime = bookHisto1D(13, 1, 1); 00041 _histXeA0 = bookHisto1D(14, 1, 1); 00042 _histXiA0 = bookHisto1D(15, 1, 1); 00043 } 00044 00045 00046 void analyze(const Event& e) { 00047 // First, veto on leptonic events by requiring at least 4 charged FS particles 00048 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00049 const size_t numParticles = fs.particles().size(); 00050 00051 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. 00052 if (numParticles < 2) { 00053 MSG_DEBUG("Failed leptonic event cut"); 00054 vetoEvent; 00055 } 00056 MSG_DEBUG("Passed leptonic event cut"); 00057 00058 // Get event weight for histo filling 00059 const double weight = e.weight(); 00060 00061 // Get beams and average beam momentum 00062 const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams(); 00063 const double meanBeamMom = ( beams.first.p3().mod() + 00064 beams.second.p3().mod() ) / 2.0; 00065 MSG_DEBUG("Avg beam momentum = " << meanBeamMom); 00066 00067 // Final state of unstable particles to get particle spectra 00068 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00069 00070 foreach (const Particle& p, ufs.particles()) { 00071 const int id = p.abspid(); 00072 double xi = -log(p.p3().mod()/meanBeamMom); 00073 double xE = p.E()/meanBeamMom; 00074 switch (id) { 00075 case 22: // Photons 00076 _histXePhoton->fill(xE, weight); 00077 _histXiPhoton->fill(xi, weight); 00078 break; 00079 case 111: // Neutral pions 00080 _histXePi->fill(xE, weight); 00081 _histXiPi->fill(xi, weight); 00082 break; 00083 case 221: // eta 00084 _histXeEta->fill(xE, weight); 00085 _histXiEta->fill(xi, weight); 00086 break; 00087 case 213: // Charged rho (770) 00088 _histXeRho->fill(xE, weight); 00089 _histXiRho->fill(xi, weight); 00090 break; 00091 case 223: // omega (782) 00092 _histXeOmega->fill(xE, weight); 00093 _histXiOmega->fill(xi, weight); 00094 break; 00095 case 331: // eta' (958) 00096 _histXeEtaPrime->fill(xE, weight); 00097 _histXiEtaPrime->fill(xi, weight); 00098 break; 00099 case 9000211: // Charged a_0 (980) 00100 _histXeA0->fill(xE, weight); 00101 _histXiA0->fill(xi, weight); 00102 break; 00103 } 00104 } 00105 } 00106 00107 00108 /// Finalize 00109 void finalize() { 00110 scale(_histXePhoton , 1./sumOfWeights()); 00111 scale(_histXiPhoton , 1./sumOfWeights()); 00112 scale(_histXePi , 1./sumOfWeights()); 00113 scale(_histXiPi , 1./sumOfWeights()); 00114 scale(_histXeEta , 1./sumOfWeights()); 00115 scale(_histXiEta , 1./sumOfWeights()); 00116 scale(_histXeRho , 1./sumOfWeights()); 00117 scale(_histXiRho , 1./sumOfWeights()); 00118 scale(_histXeOmega , 1./sumOfWeights()); 00119 scale(_histXiOmega , 1./sumOfWeights()); 00120 scale(_histXeEtaPrime, 1./sumOfWeights()); 00121 scale(_histXiEtaPrime, 1./sumOfWeights()); 00122 scale(_histXeA0 , 1./sumOfWeights()); 00123 scale(_histXiA0 , 1./sumOfWeights()); 00124 } 00125 00126 //@} 00127 00128 00129 private: 00130 00131 Histo1DPtr _histXePhoton ; 00132 Histo1DPtr _histXiPhoton ; 00133 Histo1DPtr _histXePi ; 00134 Histo1DPtr _histXiPi ; 00135 Histo1DPtr _histXeEta ; 00136 Histo1DPtr _histXiEta ; 00137 Histo1DPtr _histXeRho ; 00138 Histo1DPtr _histXiRho ; 00139 Histo1DPtr _histXeOmega ; 00140 Histo1DPtr _histXiOmega ; 00141 Histo1DPtr _histXeEtaPrime; 00142 Histo1DPtr _histXiEtaPrime; 00143 Histo1DPtr _histXeA0 ; 00144 Histo1DPtr _histXiA0 ; 00145 //@} 00146 00147 }; 00148 00149 // The hook for the plugin system 00150 DECLARE_RIVET_PLUGIN(OPAL_1998_S3749908); 00151 00152 } Generated on Thu Mar 10 2016 08:29:52 for The Rivet MC analysis system by ![]() |