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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Apr 13 10:21:42 BST 2010


Author: fsiegert
Date: Tue Apr 13 10:21:41 2010
New Revision: 2398

Log:
Some improvements in the prompt photon analyses, mainly after emailing
with the D0 authors. Have re-validated the analyses, the changes are
not significant (but the analyses are correct and much tidier now).

Modified:
   trunk/src/Analyses/CDF_2009_S8436959.cc
   trunk/src/Analyses/D0_2006_S6438750.cc
   trunk/src/Analyses/D0_2008_S7719523.cc

Modified: trunk/src/Analyses/CDF_2009_S8436959.cc
==============================================================================
--- trunk/src/Analyses/CDF_2009_S8436959.cc	Fri Apr  9 20:18:55 2010	(r2397)
+++ trunk/src/Analyses/CDF_2009_S8436959.cc	Tue Apr 13 10:21:41 2010	(r2398)
@@ -3,7 +3,7 @@
 #include "Rivet/RivetAIDA.hh"
 #include "Rivet/Tools/Logging.hh"
 #include "Rivet/Projections/FinalState.hh"
-#include "Rivet/Projections/IdentifiedFinalState.hh"
+#include "Rivet/Projections/LeadingParticlesFinalState.hh"
 
 namespace Rivet {
 
@@ -35,9 +35,9 @@
       FinalState fs;
       addProjection(fs, "FS");
 
-      IdentifiedFinalState ifs(-1.0, 1.0, 30.0*GeV);
-      ifs.acceptId(PHOTON);
-      addProjection(ifs, "IFS");
+      LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0, 30.0*GeV));
+      photonfs.addParticleId(PHOTON);
+      addProjection(photonfs, "LeadingPhoton");
 
       _h_Et_photon = bookHistogram1D(1, 1, 1);
 
@@ -48,24 +48,24 @@
     void analyze(const Event& event) {
       const double weight = event.weight();
 
-      ParticleVector photons;
       ParticleVector fs = applyProjection<FinalState>(event, "FS").particles();
-      foreach (const Particle& photon, applyProjection<IdentifiedFinalState>(event, "IFS").particles()) {
-        FourMomentum mom_in_cone;
-        foreach (const Particle& p, fs) {
-          if (deltaR(p.momentum(), photon.momentum()) < 0.4) {
+      ParticleVector photons = applyProjection<LeadingParticlesFinalState>(event, "LeadingPhoton").particles();
+      if (photons.size()!=1) {
+        vetoEvent;
+      }
+      FourMomentum leadingPhoton = photons[0].momentum();
+      double eta_P = leadingPhoton.eta();
+      double phi_P = leadingPhoton.phi();
+      FourMomentum mom_in_cone;
+      foreach (const Particle& p, fs) {
+        if (deltaR(eta_P, phi_P, p.momentum().eta(), p.momentum().phi()) < 0.4) {
             mom_in_cone += p.momentum();
-          }
-        }
-        if (mom_in_cone.Et()-photon.momentum().Et() < 2.0*GeV) {
-          photons.push_back(photon);
         }
       }
-      if (photons.size() != 1) {
+      if (mom_in_cone.Et()-leadingPhoton.Et() > 2.0*GeV) {
         vetoEvent;
       }
-   
-      _h_Et_photon->fill(photons[0].momentum().Et(), weight);
+      _h_Et_photon->fill(leadingPhoton.Et(), weight);
     }
 
 

Modified: trunk/src/Analyses/D0_2006_S6438750.cc
==============================================================================
--- trunk/src/Analyses/D0_2006_S6438750.cc	Fri Apr  9 20:18:55 2010	(r2397)
+++ trunk/src/Analyses/D0_2006_S6438750.cc	Tue Apr 13 10:21:41 2010	(r2398)
@@ -38,7 +38,7 @@
       addProjection(fs, "AllFS");
    
       // Get leading photon
-      LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0, 23.0*GeV));
+      LeadingParticlesFinalState photonfs(FinalState(-0.9, 0.9, 23.0*GeV));
       photonfs.addParticleId(PHOTON);
       addProjection(photonfs, "LeadingPhoton");
 
@@ -53,50 +53,24 @@
       // Get the photon
       const FinalState& photonfs = applyProjection<FinalState>(event, "LeadingPhoton");
       if (photonfs.particles().size() != 1) {
-        getLog() << Log::DEBUG << "No photon found" << endl;
         vetoEvent;
       }
       const FourMomentum photon = photonfs.particles().front().momentum();
-      if (photon.pT()/GeV < 23) {
-        getLog() << Log::DEBUG << "Leading photon has pT < 23 GeV: " << photon.pT()/GeV << endl;
-        vetoEvent;
-      }
-   
-      // Get all other particles
-      const FinalState& fs = applyProjection<FinalState>(event, "AllFS");
-      if (fs.empty()) {
-        vetoEvent;
-      }
    
-      // Isolate photon by ensuring that a 0.4 cone around it contains less than 7% of the photon's energy
-      const double egamma = photon.E();
-      // Energy inside R = 0.2
-      double econe_02 = 0.0;
-      // Energy between R = [0.2, 0.4]
-      double econe_02_04 = 0.0;
-      foreach (const Particle& p, fs.particles()) {
-        const double dr = deltaR(photon.pseudorapidity(), photon.azimuthalAngle(),
-                                 p.momentum().pseudorapidity(), p.momentum().azimuthalAngle());
-        if (dr < 0.2) {
-          econe_02 += p.momentum().E();
-        } else if (dr < 0.4) {
-          econe_02_04 += p.momentum().E();
+      // Isolate photon by ensuring that a 0.4 cone around it contains less than 10% of the photon's energy
+      double E_P   = photon.E();
+      double eta_P = photon.pseudorapidity();
+      double phi_P = photon.azimuthalAngle();
+      double econe = 0.0;
+      foreach (const Particle& p, applyProjection<FinalState>(event, "AllFS").particles()) {
+        if (deltaR(eta_P, phi_P,
+                   p.momentum().pseudorapidity(), p.momentum().azimuthalAngle()) < 0.4) {
+          econe += p.momentum().E();
+          if (econe/E_P > 1.1) {
+            vetoEvent;
+          }
         }
       }
-      // Veto if outer hollow cone contains more than 10% of the energy of the inner cone
-      // or if the non-photon energy in the inner cone exceeds 5% of the photon energy.
-      if (econe_02_04/econe_02 > 0.1 || (econe_02-egamma)/egamma > 0.05) {
-        getLog() << Log::DEBUG << "Vetoing event because photon is insufficiently isolated" << endl;
-        vetoEvent;
-      }
-   
-      // Veto if leading jet is outside plotted rapidity regions
-      const double eta_gamma = fabs(photon.pseudorapidity());
-      if (eta_gamma > 0.9) {
-        getLog() << Log::DEBUG << "Leading photon falls outside acceptance range; "
-                 << "|eta_gamma| = " << eta_gamma << endl;
-        vetoEvent;
-      }
    
       // Fill histo
       const double weight = event.weight();
@@ -107,9 +81,6 @@
 
     // Finalize
     void finalize() {
-      /// @todo Generator cross-section from Pythia gives ~7500, vs. expected 2988!
-      //normalize(_h_pTgamma, 2988.4869);
-   
       const double lumi_gen = sumOfWeights()/crossSection();
       // Divide by effective lumi, plus rapidity bin width of 1.8
       scale(_h_pTgamma, 1/lumi_gen * 1/1.8);

Modified: trunk/src/Analyses/D0_2008_S7719523.cc
==============================================================================
--- trunk/src/Analyses/D0_2008_S7719523.cc	Fri Apr  9 20:18:55 2010	(r2397)
+++ trunk/src/Analyses/D0_2008_S7719523.cc	Tue Apr 13 10:21:41 2010	(r2398)
@@ -40,18 +40,22 @@
     /// Set up projections and book histograms
     void init() {
       // General FS
-      FinalState fs(-5.0, 5.0);
+      FinalState fs;
       addProjection(fs, "FS");
    
       // Get leading photon
-      LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0));
+      LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0, 30.0*GeV));
       photonfs.addParticleId(PHOTON);
       addProjection(photonfs, "LeadingPhoton");
-   
-      // FS for jets excludes the leading photon
+      
+      // FS excluding the leading photon
       VetoedFinalState vfs(fs);
       vfs.addVetoOnThisFinalState(photonfs);
       addProjection(vfs, "JetFS");
+      
+      // Jets
+      FastJets jetpro(vfs, FastJets::D0ILCONE, 0.7);
+      addProjection(jetpro, "Jets");
 
       // Histograms
       _h_central_same_cross_section = bookHistogram1D(1, 1, 1);
@@ -69,26 +73,18 @@
       // Get the photon
       const FinalState& photonfs = applyProjection<FinalState>(event, "LeadingPhoton");
       if (photonfs.particles().size() != 1) {
-        getLog() << Log::DEBUG << "No photon found" << endl;
         vetoEvent;
       }
       const FourMomentum photon = photonfs.particles().front().momentum();
-      if (photon.pT()/GeV < 30) {
-        getLog() << Log::DEBUG << "Leading photon has pT < 30 GeV: " << photon.pT()/GeV << endl;
-        vetoEvent;
-      }
-   
-      // Get all charged particles
-      const FinalState& fs = applyProjection<FinalState>(event, "JetFS");
-      if (fs.empty()) {
-        vetoEvent;
-      }
    
       // Isolate photon by ensuring that a 0.4 cone around it contains less than 7% of the photon's energy
-      const double egamma = photon.E();
+      double egamma = photon.E();
+      double eta_P = photon.pseudorapidity();
+      double phi_P = photon.azimuthalAngle();
       double econe = 0.0;
-      foreach (const Particle& p, fs.particles()) {
-        if (deltaR(photon, p.momentum()) < 0.4) {
+      foreach (const Particle& p, applyProjection<FinalState>(event, "JetFS").particles()) {
+        if (deltaR(eta_P, phi_P,
+                   p.momentum().pseudorapidity(), p.momentum().azimuthalAngle()) < 0.4) {
           econe += p.momentum().E();
           // Veto as soon as E_cone gets larger
           if (econe/egamma > 0.07) {
@@ -98,30 +94,15 @@
         }
       }
    
-   
-      /// @todo Allow proj creation w/o FS as ctor arg, so that calc can be used more easily.
-      FastJets jetpro(fs, FastJets::D0ILCONE, 0.7); //< @todo This fs arg makes no sense!
-      jetpro.calc(fs.particles());
-      Jets isolated_jets;
-      foreach (const Jet& j, jetpro.jets()) {
-        const FourMomentum pjet = j.momentum();
-        const double dr = deltaR(photon.pseudorapidity(), photon.azimuthalAngle(),
-                                 pjet.pseudorapidity(), pjet.azimuthalAngle());
-        if (dr > 0.7 && pjet.pT()/GeV > 15) {
-          isolated_jets.push_back(j);
-        }
+      Jets jets = applyProjection<FastJets>(event, "Jets").jetsByPt(15.0*GeV);
+      if (jets.size()==0) {
+        vetoEvent;
       }
-   
-      getLog() << Log::DEBUG << "Num jets after isolation and pT cuts = "
-               << isolated_jets.size() << endl;
-      if (isolated_jets.empty()) {
-        getLog() << Log::DEBUG << "No jets pass cuts" << endl;
+      FourMomentum leadingJet = jets[0].momentum();
+      if (deltaR(eta_P, phi_P, leadingJet.eta(), leadingJet.phi())<0.7) {
         vetoEvent;
       }
-   
-      // Sort by pT and get leading jet
-      sort(isolated_jets.begin(), isolated_jets.end(), cmpJetsByPt);
-      const FourMomentum leadingJet = isolated_jets.front().momentum();
+      
       int photon_jet_sign = sign( leadingJet.rapidity() * photon.rapidity() );
    
       // Veto if leading jet is outside plotted rapidity regions


More information about the Rivet-svn mailing list