DELPHI_1995_S3137023.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 DELPHI strange baryon paper 00012 /// @author Hendrik Hoeth 00013 class DELPHI_1995_S3137023 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 DELPHI_1995_S3137023() 00018 : Analysis("DELPHI_1995_S3137023") 00019 { 00020 _weightedTotalNumXiMinus = 0; 00021 _weightedTotalNumSigma1385Plus = 0; 00022 } 00023 00024 00025 /// @name Analysis methods 00026 //@{ 00027 00028 void init() { 00029 addProjection(Beam(), "Beams"); 00030 addProjection(ChargedFinalState(), "FS"); 00031 addProjection(UnstableFinalState(), "UFS"); 00032 00033 _histXpXiMinus = bookHisto1D(2, 1, 1); 00034 _histXpSigma1385Plus = bookHisto1D(3, 1, 1); 00035 } 00036 00037 00038 void analyze(const Event& e) { 00039 // First, veto on leptonic events by requiring at least 4 charged FS particles 00040 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00041 const size_t numParticles = fs.particles().size(); 00042 00043 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. 00044 if (numParticles < 2) { 00045 MSG_DEBUG("Failed leptonic event cut"); 00046 vetoEvent; 00047 } 00048 MSG_DEBUG("Passed leptonic event cut"); 00049 00050 // Get event weight for histo filling 00051 const double weight = e.weight(); 00052 00053 // Get beams and average beam momentum 00054 const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams(); 00055 const double meanBeamMom = ( beams.first.momentum().vector3().mod() + 00056 beams.second.momentum().vector3().mod() ) / 2.0; 00057 MSG_DEBUG("Avg beam momentum = " << meanBeamMom); 00058 00059 // Final state of unstable particles to get particle spectra 00060 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00061 00062 foreach (const Particle& p, ufs.particles()) { 00063 const int id = abs(p.pdgId()); 00064 switch (id) { 00065 case 3312: 00066 _histXpXiMinus->fill(p.momentum().vector3().mod()/meanBeamMom, weight); 00067 _weightedTotalNumXiMinus += weight; 00068 break; 00069 case 3114: case 3224: 00070 _histXpSigma1385Plus->fill(p.momentum().vector3().mod()/meanBeamMom, weight); 00071 _weightedTotalNumSigma1385Plus += weight; 00072 break; 00073 } 00074 } 00075 00076 } 00077 00078 00079 /// Finalize 00080 void finalize() { 00081 normalize(_histXpXiMinus , _weightedTotalNumXiMinus/sumOfWeights()); 00082 normalize(_histXpSigma1385Plus , _weightedTotalNumSigma1385Plus/sumOfWeights()); 00083 } 00084 00085 //@} 00086 00087 00088 private: 00089 00090 /// Store the weighted sums of numbers of charged / charged+neutral 00091 /// particles - used to calculate average number of particles for the 00092 /// inclusive single particle distributions' normalisations. 00093 double _weightedTotalNumXiMinus; 00094 double _weightedTotalNumSigma1385Plus; 00095 00096 Histo1DPtr _histXpXiMinus; 00097 Histo1DPtr _histXpSigma1385Plus; 00098 //@} 00099 00100 }; 00101 00102 00103 00104 // The hook for the plugin system 00105 DECLARE_RIVET_PLUGIN(DELPHI_1995_S3137023); 00106 00107 } Generated on Thu Feb 6 2014 17:38:44 for The Rivet MC analysis system by ![]() |