ALEPH_1999_S4193598.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/ChargedFinalState.hh" 00005 #include "Rivet/Projections/UnstableFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 class ALEPH_1999_S4193598 : public Analysis { 00010 public: 00011 00012 /// @name Constructors etc. 00013 //@{ 00014 00015 /// Constructor 00016 ALEPH_1999_S4193598() 00017 : Analysis("ALEPH_1999_S4193598") 00018 { 00019 _sumWpassed = 0.0; 00020 } 00021 00022 //@} 00023 00024 00025 public: 00026 00027 /// Book histograms and initialise projections before the run 00028 void init() { 00029 addProjection(Beam(), "Beams"); 00030 addProjection(UnstableFinalState(), "UFS"); 00031 addProjection(ChargedFinalState(), "CFS"); 00032 00033 _h_Xe_Ds = bookHisto1D(1, 1, 1); 00034 } 00035 00036 00037 /// Perform the per-event analysis 00038 void analyze(const Event& event) { 00039 const double weight = event.weight(); 00040 00041 // Trigger condition 00042 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); 00043 if (cfs.size() < 5) vetoEvent; 00044 00045 _sumWpassed += weight; 00046 00047 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS"); 00048 00049 // Get beams and average beam momentum 00050 const ParticlePair& beams = applyProjection<Beam>(event, "Beams").beams(); 00051 const double meanBeamMom = ( beams.first.p3().mod() + 00052 beams.second.p3().mod() ) / 2.0/GeV; 00053 00054 foreach (const Particle& p, ufs.particles()) { 00055 const PdgId pid = p.abspid(); 00056 00057 switch (pid) { 00058 case 413: 00059 00060 // Accept all D*+- decays. Normalisation to D0 + pi+- in finalize() 00061 00062 // Scaled energy. 00063 const double energy = p.E()/GeV; 00064 const double scaledEnergy = energy/meanBeamMom; 00065 _h_Xe_Ds->fill(scaledEnergy, weight); 00066 00067 break; 00068 } 00069 } 00070 } 00071 00072 00073 /// Normalise histograms etc., after the run 00074 void finalize() { 00075 00076 // Scale to the product of branching fractions D0*->D0 pi x D0->Kpi(charged) 00077 // Numbers are taken from PDG 2010 00078 scale(_h_Xe_Ds, 0.677*0.0389/_sumWpassed); 00079 00080 } 00081 00082 private: 00083 double _sumWpassed; 00084 00085 private: 00086 00087 Histo1DPtr _h_Xe_Ds; 00088 00089 }; 00090 00091 00092 00093 // The hook for the plugin system 00094 DECLARE_RIVET_PLUGIN(ALEPH_1999_S4193598); 00095 00096 } Generated on Thu Mar 10 2016 08:29:45 for The Rivet MC analysis system by ![]() |