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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 14 16:49:21 GMT 2012


Author: buckley
Date: Wed Nov 14 16:49:21 2012
New Revision: 4000

Log:
Merge changeset [3965] from AIDA branch

Modified:
   trunk/src/Analyses/CMS_2012_I1107658.cc

Modified: trunk/src/Analyses/CMS_2012_I1107658.cc
==============================================================================
--- trunk/src/Analyses/CMS_2012_I1107658.cc	Wed Nov 14 16:48:58 2012	(r3999)
+++ trunk/src/Analyses/CMS_2012_I1107658.cc	Wed Nov 14 16:49:21 2012	(r4000)
@@ -101,9 +101,9 @@
         _h_pTsum_towards_pTmumu->        fill(Zpt, 1./area * ptSumTowards, weight);
         _h_pTsum_transverse_pTmumu->     fill(Zpt, 1./area * ptSumTransverse, weight);
         _h_pTsum_away_pTmumu->           fill(Zpt, 1./area * ptSumAway, weight);
-        _h_avgpT_towards_pTmumu->        fill(Zpt, 1.*nTowards/ptSumTowards, weight);
-        _h_avgpT_transverse_pTmumu->     fill(Zpt, 1.*nTransverse/ptSumTransverse, weight);
-        _h_avgpT_away_pTmumu->           fill(Zpt, 1.*nAway/ptSumAway, weight);
+        if (nTowards > 0)    _h_avgpT_towards_pTmumu->    fill(Zpt, ptSumTowards/nTowards, weight);
+        if (nTransverse > 0) _h_avgpT_transverse_pTmumu-> fill(Zpt, ptSumTransverse/nTransverse, weight);
+        if (nAway > 0)       _h_avgpT_away_pTmumu->       fill(Zpt, ptSumAway/nAway, weight);
         _h_Nchg_towards_zmass_81_101->   fill(nTowards, weight);
         _h_Nchg_transverse_zmass_81_101->fill(nTransverse, weight);
         _h_Nchg_away_zmass_81_101->      fill(nAway, weight);
@@ -112,7 +112,7 @@
       if (Zpt < 5.) {
         _h_Nchg_towards_plus_transverse_Mmumu->fill(Zmass, (nTowards + nTransverse)/(2.*area), weight);
         _h_pTsum_towards_plus_transverse_Mmumu->fill(Zmass, (ptSumTowards + ptSumTransverse)/(2.*area), weight);
-        _h_avgpT_towards_plus_transverse_Mmumu->fill(Zmass, 1.*(nTowards + nTransverse)/(ptSumTowards + ptSumTransverse), weight);
+        if ((nTowards + nTransverse) > 0) _h_avgpT_towards_plus_transverse_Mmumu->fill(Zmass, (ptSumTowards + ptSumTransverse)/(nTowards + nTransverse), weight);
         _h_Nchg_transverse_zpt_5->fill(nTransverse, weight);
       }
 


More information about the Rivet-svn mailing list