[Rivet-svn] r1709 - in trunk: include/Rivet include/Rivet/Analyses src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 21 23:41:27 BST 2009


Author: holsch
Date: Tue Jul 21 23:41:27 2009
New Revision: 1709

Log:
Adding UA5 charged multiplicity distributions analyses at 200 and 900 GeV. Proper filling of the histograms (especially at 200 GeV) requires single and double diffractive processes to be switched on (MSUB 91 ... 95 ).

Added:
   trunk/include/Rivet/Analyses/UA5_1989_S1926373.hh
   trunk/src/Analyses/UA5_1989_S1926373.cc
Modified:
   trunk/include/Rivet/Makefile.am
   trunk/src/Analyses/Makefile.am
   trunk/src/Analyses/StdAnalyses.cc

Added: trunk/include/Rivet/Analyses/UA5_1989_S1926373.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/include/Rivet/Analyses/UA5_1989_S1926373.hh	Tue Jul 21 23:41:27 2009	(r1709)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+#ifndef RIVET_UA5_1989_S1926373_HH
+#define RIVET_UA5_1989_S1926373_HH
+
+#include "Rivet/Analysis.hh"
+
+namespace Rivet {
+
+    
+  class UA5_1989_S1926373 : public Analysis {
+
+  public:
+
+    /// @name Constructor etc.
+    //@{
+
+    /// constructor
+    UA5_1989_S1926373();
+
+    /// Factory method
+    static Analysis* create() { 
+      return new UA5_1989_S1926373(); 
+    }
+
+    //@}
+
+
+    /// @name Analysis methods
+    //@{
+    void init();
+    void analyze(const Event& event);
+    void finalize();
+    //@}
+
+  private:
+    
+    //@{
+    /// Histograms
+    AIDA::IHistogram1D* _hist_nch200;
+    AIDA::IHistogram1D* _hist_nch900;
+    AIDA::IHistogram1D* _hist_nch200eta0point5;
+    AIDA::IHistogram1D* _hist_nch200eta1point5;
+    AIDA::IHistogram1D* _hist_nch200eta3;
+    AIDA::IHistogram1D* _hist_nch200eta5;
+    AIDA::IHistogram1D* _hist_nch900eta0point5;
+    AIDA::IHistogram1D* _hist_nch900eta1point5;
+    AIDA::IHistogram1D* _hist_nch900eta3;
+    AIDA::IHistogram1D* _hist_nch900eta5;
+    AIDA::IHistogram1D* _hist_mean_nch_200;
+    AIDA::IHistogram1D* _hist_mean_nch_900;
+    //@}
+
+  };
+
+}
+
+#endif

Modified: trunk/include/Rivet/Makefile.am
==============================================================================
--- trunk/include/Rivet/Makefile.am	Tue Jul 21 23:40:57 2009	(r1708)
+++ trunk/include/Rivet/Makefile.am	Tue Jul 21 23:41:27 2009	(r1709)
@@ -84,7 +84,8 @@
   Analyses/MC_LHC_LEADINGJETS.hh \
   Analyses/STAR_2006_S6870392.hh \
   Analyses/STAR_2008_S7993412.hh \
-  Analyses/STAR_2009_UE_HELEN.hh
+  Analyses/STAR_2009_UE_HELEN.hh \
+  Analyses/UA5_1989_S1926373.hh 
 
 
 ## Projections

Modified: trunk/src/Analyses/Makefile.am
==============================================================================
--- trunk/src/Analyses/Makefile.am	Tue Jul 21 23:40:57 2009	(r1708)
+++ trunk/src/Analyses/Makefile.am	Tue Jul 21 23:41:27 2009	(r1709)
@@ -51,7 +51,8 @@
     MC_TVT1960_ZJETS.cc \
     MC_LHC_LEADINGJETS.cc \
     STAR_2006_S6870392.cc \
-    STAR_2008_S7993412.cc
+    STAR_2008_S7993412.cc \
+    UA5_1989_S1926373.cc
     #STAR_2009_UE_HELEN.cc
     #OPAL_2004_S6132243.cc 
 

Modified: trunk/src/Analyses/StdAnalyses.cc
==============================================================================
--- trunk/src/Analyses/StdAnalyses.cc	Tue Jul 21 23:40:57 2009	(r1708)
+++ trunk/src/Analyses/StdAnalyses.cc	Tue Jul 21 23:41:27 2009	(r1709)
@@ -63,6 +63,9 @@
 #include "Rivet/Analyses/STAR_2008_S7993412.hh"
 //#include "Rivet/Analyses/STAR_2009_UE_HELEN.hh"
 
+// UA5
+#include "Rivet/Analyses/UA5_1989_S1926373.hh"
+
 // MC validation
 #include "Rivet/Analyses/MC_TVT1960_ZJETS.hh"
 #include "Rivet/Analyses/MC_LHC_LEADINGJETS.hh"
@@ -140,6 +143,9 @@
     fns["STAR_2008_S7993412"] = Rivet::STAR_2008_S7993412::create;
     //fns["STAR_2009_UE_HELEN"] = Rivet::STAR_2009_UE_HELEN::create;
 
+    // UA5
+    fns["UA5_1989_S1926373"] = Rivet::UA5_1989_S1926373::create;
+
     // General
     fns["PDG_HADRON_MULTIPLICITIES"] = Rivet::PDG_HADRON_MULTIPLICITIES::create;
     fns["PDG_HADRON_MULTIPLICITIES_RATIOS"] = Rivet::PDG_HADRON_MULTIPLICITIES_RATIOS::create;

Added: trunk/src/Analyses/UA5_1989_S1926373.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/Analyses/UA5_1989_S1926373.cc	Tue Jul 21 23:41:27 2009	(r1709)
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+#include "Rivet/Rivet.hh"
+#include "Rivet/RivetAIDA.hh"
+#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Analyses/UA5_1989_S1926373.hh"
+#include "Rivet/Projections/Beam.hh"
+#include "Rivet/Projections/ChargedFinalState.hh"
+
+namespace Rivet {
+
+
+  UA5_1989_S1926373::UA5_1989_S1926373()
+    : Analysis("UA5_1989_S1926373")
+  { 
+    setBeams(PROTON, ANTIPROTON);
+    addProjection(Beam(), "Beams");
+
+    const ChargedFinalState cfs;
+    const ChargedFinalState cfs05(-0.5,0.5);
+    const ChargedFinalState cfs15(-1.5,1.5);
+    const ChargedFinalState cfs30(-3.,3.);
+    const ChargedFinalState cfs50(-5.0,5.0);
+      
+    addProjection(cfs,   "CFSAll");
+    addProjection(cfs05, "CFS05");
+    addProjection(cfs15, "CFS15");
+    addProjection(cfs30, "CFS30");
+    addProjection(cfs50, "CFS50");
+  }
+
+
+  // Book histograms
+  void UA5_1989_S1926373::init() {
+      // _hist_nch200 and _hist_nch200eta5 use the same data but different binning
+      // the same is true for _hist_nch900 and _hist_nch900eta5
+     _hist_nch200           = bookHistogram1D(1,1,1); 
+     _hist_nch900           = bookHistogram1D(2,1,1);
+     _hist_nch200eta0point5 = bookHistogram1D(3,1,1);
+     _hist_nch200eta1point5 = bookHistogram1D(4,1,1);
+     _hist_nch200eta3       = bookHistogram1D(5,1,1);
+     _hist_nch200eta5       = bookHistogram1D(6,1,1);
+     _hist_nch900eta0point5 = bookHistogram1D(7,1,1);
+     _hist_nch900eta1point5 = bookHistogram1D(8,1,1);
+     _hist_nch900eta3       = bookHistogram1D(9,1,1);
+     _hist_nch900eta5       = bookHistogram1D(10,1,1);
+     _hist_mean_nch_200     = bookHistogram1D(11,1,1); 
+     _hist_mean_nch_900     = bookHistogram1D(12,1,1);
+  } 
+
+
+  // Do the analysis
+    void UA5_1989_S1926373::analyze(const Event& event) {
+        Log log = getLog();
+
+        const double sqrtS = applyProjection<Beam>(event, "Beams").sqrtS();
+        const double weight = event.weight();
+
+        // Minimum Bias trigger requirements from the hodoscopes
+        int n_trig_1 = 0;
+        int n_trig_2 = 0;
+        
+        const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFSAll");
+        foreach (const Particle& p, cfs.particles()) {
+             double eta = p.momentum().pseudorapidity();
+             if ( ( -5.6 < eta ) && ( eta < -2.0 ) ) n_trig_1++;
+             else if ( ( 2.0 < eta ) && ( eta < 5.6 ) ) n_trig_2++;
+        }
+        
+        // Require at least one coincidence hit in trigger hodoscopes
+        if ( n_trig_1* n_trig_2 < 1. ) vetoEvent; 
+        getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl;
+        
+        // Declare final states in several eta regions 
+        const ChargedFinalState& cfs05 = applyProjection<ChargedFinalState>(event, "CFS05");
+        const ChargedFinalState& cfs15 = applyProjection<ChargedFinalState>(event, "CFS15");
+        const ChargedFinalState& cfs30 = applyProjection<ChargedFinalState>(event, "CFS30");
+        const ChargedFinalState& cfs50 = applyProjection<ChargedFinalState>(event, "CFS50");
+
+        // Count particles in final states
+        const size_t numP05 = cfs05.particles().size();
+        const size_t numP15 = cfs15.particles().size();
+        const size_t numP30 = cfs30.particles().size();
+        const size_t numP50 = cfs50.particles().size();
+        
+        // Fill histograms
+        if (fuzzyEquals(sqrtS, 200.0, 1E-4)) {
+            _hist_nch200->fill(numP50, weight);
+            _hist_nch200eta0point5->fill(numP05, weight);
+            _hist_nch200eta1point5->fill(numP15, weight);
+            _hist_nch200eta3->fill(numP30, weight);
+            _hist_nch200eta5->fill(numP50, weight);
+            _hist_mean_nch_200->fill(_hist_mean_nch_200->binMean(0), numP50);
+            }
+        else if (fuzzyEquals(sqrtS, 900.0, 1E-4)) {
+            _hist_nch900->fill(numP50, weight);
+            _hist_nch900eta0point5->fill(numP05, weight);
+            _hist_nch900eta1point5->fill(numP15, weight);
+            _hist_nch900eta3->fill(numP30, weight);
+            _hist_nch900eta5->fill(numP50, weight);
+            _hist_mean_nch_900->fill(_hist_mean_nch_900->binMean(0), numP50);
+            }
+        }
+
+  void UA5_1989_S1926373::finalize() {
+    // Normalise to area of refhistos
+    normalize(_hist_nch200, 2.011);
+    normalize(_hist_nch900, 2.0434);
+    normalize(_hist_nch200eta0point5, 1.01255);
+    normalize(_hist_nch200eta1point5, 1.0191);
+    normalize(_hist_nch200eta3, 1.02615);
+    normalize(_hist_nch200eta5, 1.03475);
+    normalize(_hist_nch900eta0point5, 1.0035);
+    normalize(_hist_nch900eta1point5, 1.01405);
+    normalize(_hist_nch900eta3, 1.03055);
+    normalize(_hist_nch900eta5, 1.02791);
+    // Scale to total number of weights, possible only if binwidth == 1
+    scale(_hist_mean_nch_200, 1./sumOfWeights());
+    scale(_hist_mean_nch_900, 1./sumOfWeights());
+  }
+
+
+}
+


More information about the Rivet-svn mailing list