[Rivet-svn] r2809 - in trunk: data/plotinfo src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Dec 2 18:35:13 GMT 2010


Author: holsch
Date: Thu Dec  2 18:35:12 2010
New Revision: 2809

Log:
Add a pT and Phi distribution, fix plot file

Modified:
   trunk/data/plotinfo/MC_TTBAR.plot
   trunk/src/Analyses/MC_TTBAR.cc

Modified: trunk/data/plotinfo/MC_TTBAR.plot
==============================================================================
--- trunk/data/plotinfo/MC_TTBAR.plot	Thu Dec  2 18:29:48 2010	(r2808)
+++ trunk/data/plotinfo/MC_TTBAR.plot	Thu Dec  2 18:35:12 2010	(r2809)
@@ -1,8 +1,19 @@
-# BEGIN PLOT /MC_TTBAR/pseudorap
+# BEGIN PLOT /MC_TTBAR/nch-eta
 Title=Pseudorapidity distribution
 XLabel=$\eta$
 YLabel=$\frac{dN}{d\eta}$
 LogY=0
-LegendXPos=0.75
-LegendYPos=0.35
+# END PLOT
+
+# BEGIN PLOT /MC_TTBAR/nch-pt
+Title=Transverse momentum distribution
+XLabel=$p_\perp$
+YLabel=$\frac{dN}{d p_\perp}$ [GeV]
+# END PLOT
+
+# BEGIN PLOT /MC_TTBAR/nch-phi
+Title=Azimuthal angle distribution
+XLabel=$\Phi$
+YLabel=$\frac{dN}{d \Phi}$
+LogY=0
 # END PLOT

Modified: trunk/src/Analyses/MC_TTBAR.cc
==============================================================================
--- trunk/src/Analyses/MC_TTBAR.cc	Thu Dec  2 18:29:48 2010	(r2808)
+++ trunk/src/Analyses/MC_TTBAR.cc	Thu Dec  2 18:35:12 2010	(r2809)
@@ -38,6 +38,8 @@
 
       /// @todo Book histograms here, e.g.:
       _hist_nch_eta = bookHistogram1D("nch-eta", 20, -5.0, 5.0);
+      _hist_nch_pt  = bookHistogram1D("nch-pt", 100, 0.0, 200.0);
+      _hist_nch_phi = bookHistogram1D("nch-phi", 100, 0.0, TWOPI);
 
     }
 
@@ -49,7 +51,11 @@
 
       foreach (const Particle& p, cfs.particles()) {
         double eta = p.momentum().pseudorapidity();
+        double pT = p.momentum().perp();
+        double phi = p.momentum().phi();
         _hist_nch_eta->fill(eta, weight);
+        _hist_nch_pt->fill(pT, weight);
+        _hist_nch_phi->fill(phi, weight);
       }
 
     }
@@ -58,6 +64,8 @@
     /// Normalise histograms etc., after the run
     void finalize() {
       scale(_hist_nch_eta, 1.0/sumOfWeights());
+      scale(_hist_nch_pt,  1.0/sumOfWeights());
+      scale(_hist_nch_phi, 1.0/sumOfWeights());
     }
 
 
@@ -66,6 +74,8 @@
     /// @name Histograms
     //@{
     AIDA::IHistogram1D* _hist_nch_eta;
+    AIDA::IHistogram1D* _hist_nch_pt;
+    AIDA::IHistogram1D* _hist_nch_phi;
     //@}
 
   };


More information about the Rivet-svn mailing list