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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Mar 18 12:41:36 GMT 2010


Author: fsiegert
Date: Thu Mar 18 12:41:37 2010
New Revision: 2340

Log:
improvements in d0_1996 analyses.

Modified:
   trunk/data/plotinfo/D0_1996_S3324664.plot
   trunk/src/Analyses/D0_1996_S3214044.cc

Modified: trunk/data/plotinfo/D0_1996_S3324664.plot
==============================================================================
--- trunk/data/plotinfo/D0_1996_S3324664.plot	Thu Mar 18 11:19:14 2010	(r2339)
+++ trunk/data/plotinfo/D0_1996_S3324664.plot	Thu Mar 18 12:41:37 2010	(r2340)
@@ -26,4 +26,9 @@
 Title=Correlation of the jets
 XLabel=$\Delta \eta = |\eta_1 - \eta_2|$
 YLabel=$\langle\cos(\pi-\Delta\phi)\rangle$
+LogY=0
+YMin=0.4
+YMax=1.0
+LegendXPos=0.5
+LegendYPos=0.5
 # END PLOT

Modified: trunk/src/Analyses/D0_1996_S3214044.cc
==============================================================================
--- trunk/src/Analyses/D0_1996_S3214044.cc	Thu Mar 18 11:19:14 2010	(r2339)
+++ trunk/src/Analyses/D0_1996_S3214044.cc	Thu Mar 18 12:41:37 2010	(r2340)
@@ -145,7 +145,7 @@
     void _threeJetAnalysis(const Jets& jets, const double& weight) {
       // >=3 jet events
       FourMomentum jjj(jets[0].momentum()+jets[1].momentum()+jets[2].momentum());
-      const double sqrts = jjj.mass();
+      const double sqrts = _safeMass(jjj);
       if (sqrts<200*GeV) {
         return;
       }
@@ -169,16 +169,16 @@
       _h_3j_x5->fill(2.0*p5.E()/sqrts, weight);
       _h_3j_costheta3->fill(fabs(cos(p3.theta())), weight);
       _h_3j_psi->fill(acos(cospsi)/degree, weight);
-      _h_3j_mu34->fill(FourMomentum(p3+p4).mass()/sqrts, weight);
-      _h_3j_mu35->fill(FourMomentum(p3+p5).mass()/sqrts, weight);
-      _h_3j_mu45->fill(FourMomentum(p4+p5).mass()/sqrts, weight);
+      _h_3j_mu34->fill(_safeMass(FourMomentum(p3+p4))/sqrts, weight);
+      _h_3j_mu35->fill(_safeMass(FourMomentum(p3+p5))/sqrts, weight);
+      _h_3j_mu45->fill(_safeMass(FourMomentum(p4+p5))/sqrts, weight);
     }
  
  
     void _fourJetAnalysis(const Jets& jets, const double& weight) {
       // >=4 jet events
       FourMomentum jjjj(jets[0].momentum() + jets[1].momentum() + jets[2].momentum()+ jets[3].momentum());
-      const double sqrts = jjjj.mass();
+      const double sqrts = _safeMass(jjjj);
       if (sqrts < 200*GeV) return;
    
       LorentzTransform cms_boost(-jjjj.boostVector());
@@ -212,17 +212,26 @@
       _h_4j_cosomega45->fill(cos(p4.angle(p5)), weight);
       _h_4j_cosomega46->fill(cos(p4.angle(p6)), weight);
       _h_4j_cosomega56->fill(cos(p5.angle(p6)), weight);
-      _h_4j_mu34->fill(FourMomentum(p3+p4).mass()/sqrts, weight);
-      _h_4j_mu35->fill(FourMomentum(p3+p5).mass()/sqrts, weight);
-      _h_4j_mu36->fill(FourMomentum(p3+p6).mass()/sqrts, weight);
-      _h_4j_mu45->fill(FourMomentum(p4+p5).mass()/sqrts, weight);
-      _h_4j_mu46->fill(FourMomentum(p4+p6).mass()/sqrts, weight);
-      _h_4j_mu56->fill(FourMomentum(p5+p6).mass()/sqrts, weight);
+      _h_4j_mu34->fill(_safeMass(FourMomentum(p3+p4))/sqrts, weight);
+      _h_4j_mu35->fill(_safeMass(FourMomentum(p3+p5))/sqrts, weight);
+      _h_4j_mu36->fill(_safeMass(FourMomentum(p3+p6))/sqrts, weight);
+      _h_4j_mu45->fill(_safeMass(FourMomentum(p4+p5))/sqrts, weight);
+      _h_4j_mu46->fill(_safeMass(FourMomentum(p4+p6))/sqrts, weight);
+      _h_4j_mu56->fill(_safeMass(FourMomentum(p5+p6))/sqrts, weight);
       _h_4j_theta_BZ->fill(acos(costheta_BZ)/degree, weight);
       _h_4j_costheta_NR->fill(costheta_NR, weight);
    
     }
     
+    double _safeMass(const FourMomentum& p) {
+      double mass2=p.mass2();
+      if (mass2>0.0) return sqrt(mass2);
+      else if (mass2<-1.0e-5) {
+        getLog() << Log::WARNING << "m2 = " << m2 << ". Assuming m2=0." << endl;
+        return 0.0;
+      }
+      else return 0.0;
+    }
 
   private:
 


More information about the Rivet-svn mailing list