[Rivet-svn] r1730 - trunk/src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Jul 31 11:38:16 BST 2009


Author: cvaillant
Date: Fri Jul 31 11:38:16 2009
New Revision: 1730

Log:
Correction of a bug in the UA5 1982 analysis

Modified:
   trunk/src/Analyses/UA5_1982_S875503.cc

Modified: trunk/src/Analyses/UA5_1982_S875503.cc
==============================================================================
--- trunk/src/Analyses/UA5_1982_S875503.cc	Thu Jul 30 23:15:54 2009	(r1729)
+++ trunk/src/Analyses/UA5_1982_S875503.cc	Fri Jul 31 11:38:16 2009	(r1730)
@@ -6,91 +6,27 @@
 #include "Rivet/Projections/TotalVisibleMomentum.hh"
 #include "Rivet/Tools/ParticleIDMethods.hh"
 #include "Rivet/RivetAIDA.hh"
+#include "Rivet/Analyses/UA5_1982_S875503.hh"
 
 namespace Rivet {
-  
-  class UA5_1982_S875503 : public Analysis {
-    
-  public:
     
     /// Default constructor
-    UA5_1982_S875503() : Analysis("UA5_1982_S875503") {
+    UA5_1982_S875503::UA5_1982_S875503()
+   : Analysis("UA5_1982_S875503") {
       const FinalState fs;
-      const ChargedFinalState cfs;
       addProjection(Beam(), "Beam");
       addProjection(fs, "FS");
-      addProjection(cfs, "CFS");
-    }
-    
-    
-    /// Factory method
-    static Analysis* create() { 
-      return new UA5_1982_S875503(); 
-    }
-    
-    
-    /// Return the name of this analysis
-    string name() const {
-      return "UA5_1982_S875503";
-    }
-    
-    /// Get the SPIRES ID code
-    string spiresId() const {
-      return "S875503";
-    }
-    
-    /// Get a description of the analysis.
-    string description() const {
-      return "";
-    }
-    
-    /// Experiment which performed and published this analysis.
-    string experiment() const {
-      return "UA5";
-    }
-    
-    /// When published (preprint year according to SPIRES).
-    string year() const {
-      return "1982";
-    }
-    
-    /// Summary of analysis
-    string summary() const{
-      return "";
-    }
-    
-    /// Beam conditions for this analysis
-    string runInfo() const{
-      return "Either PP or PPBar";
-    }
-    
-    string collider() const{
-      return "Any";
-    }
-    
-    vector<string> authors() const{
-      return vector<string>();
-    }
-    
-    vector<string> references() const{
-      return vector<string>();
     }
-    
+ 
     /// @name Analysis methods
     //@{
-    void init() 
+    void UA5_1982_S875503::init() 
     { 
-    _hist_etapp = bookHistogram1D("d01-x01-y01", 35, 0., 3.5);
-
-    _hist_etappbar = bookHistogram1D("d01-x01-y02", 35, 0., 3.5);
-
-    _hist_nchpp = bookHistogram1D("d02-x01-y01", 18, 0., 36.); 
-
-    _hist_nchppbar = bookHistogram1D("d02-x01-y02", 18, 0., 36.); 
+    _hist_etapp = bookHistogram1D(3,1,1);
+    _hist_etappbar = bookHistogram1D(4,1,1);
     }
     
-    void analyze(const Event& event) 
-    {
+    void UA5_1982_S875503::analyze(const Event& event) {
       const Beam b = applyProjection<Beam>(event, "Beam");
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
       const double weight = event.weight();
@@ -105,50 +41,14 @@
           _hist_etappbar->fill(p.momentum().pseudorapidity(), weight);
         }
       }
-        const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS");
-        foreach (const Particle& p, cfs.particles())
-        {
-        if ( b.beams().first.pdgId() == b.beams().second.pdgId())
-        {
-          _hist_nchpp->fill(cfs.particles().size(), weight);
-        }
-        else if ( b.beams().first.pdgId() != b.beams().second.pdgId())
-        {
-          _hist_nchppbar->fill(cfs.particles().size(), weight);
-        }
-      }
+
     }
     
-    void finalize() {
-      normalize(_hist_etapp);
-      normalize(_hist_etappbar);
-      normalize(_hist_nchpp);
-      normalize(_hist_nchppbar);      
+    void UA5_1982_S875503::finalize() {
+      normalize(_hist_etapp, 5.28);
+      normalize(_hist_etappbar, 5.29);
     }
     //@}
-    
-  
-    private:
-    
-    /// @name Histogram collections
-    //@{
-    AIDA::IHistogram1D* _hist_etapp;
-    AIDA::IHistogram1D* _hist_etappbar;
-    AIDA::IHistogram1D* _hist_nchpp;
-    AIDA::IHistogram1D* _hist_nchppbar;
-    //@}
 
+  }
 
-    
-  };
-  
-//   extern "C" {
-//     AnalysisBuilders getAnalysisBuilders() {
-//       AnalysisBuilders fns;
-//       fns["UA5_1982_S875503"] = Rivet::UA5_1982_S875503::create;
-//       return fns;
-//     }
-//   }
-
-  
-}


More information about the Rivet-svn mailing list