rivet is hosted by Hepforge, IPPP Durham
ATLAS_2014_I1298023.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ChargedLeptons.hh"
00004 #include "Rivet/Projections/VetoedFinalState.hh"
00005 #include "Rivet/Projections/MissingMomentum.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 #include "Rivet/Projections/DressedLeptons.hh"
00008 
00009 namespace Rivet {
00010 
00011   /// ATLAS same-sign WW production at 8 TeV (PRL)
00012   class ATLAS_2014_I1298023 : public Analysis {
00013   public:
00014 
00015     /// @name Constructors etc.
00016     //@{
00017     ATLAS_2014_I1298023()
00018       : Analysis("ATLAS_2014_I1298023")
00019     {
00020       setNeedsCrossSection(true);
00021     }
00022     //@}
00023 
00024 
00025   public:
00026 
00027     /// @name Analysis methods
00028     //@{
00029 
00030     void init() {
00031 
00032       const FinalState fs;
00033 
00034       // bare leptons
00035       ChargedLeptons bare_leptons(fs);
00036 
00037       // dressed leptons
00038       Cut cuts = (Cuts::abseta < 2.5) & (Cuts::pT > 25*GeV);
00039       DressedLeptons leptons(fs, bare_leptons, 0.1, cuts);
00040       addProjection(leptons, "leptons");
00041 
00042       // MET
00043       addProjection(MissingMomentum(fs), "MissingET");
00044 
00045       // jets
00046       VetoedFinalState vfs(fs);
00047       vfs.addVetoPairId(PID::MUON);
00048       vfs.vetoNeutrinos();
00049       addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "jets");
00050 
00051       // book histogram
00052       _hist = bookHisto1D(1, 1, 1);
00053     }
00054 
00055 
00056     /// Perform the per-event analysis
00057     void analyze(const Event& event) {
00058       const double weight = event.weight();
00059 
00060       const vector<DressedLepton>& leptons = applyProjection<DressedLeptons>(event, "leptons").dressedLeptons();
00061       if ( leptons.size() < 2 )  vetoEvent;
00062 
00063       double minDR_ll = MAXDOUBLE, mll = -1.0;
00064       for (unsigned int i = 0; i < leptons.size(); ++i) {
00065         DressedLepton lep1 = leptons[i];
00066         for (unsigned int j = i + 1; j < leptons.size(); ++j) {
00067           DressedLepton lep2 = leptons[j];
00068           double dr = deltaR(lep1, lep2);
00069           if ( dr < minDR_ll )  minDR_ll = dr;
00070           double m = (lep1.momentum() + lep2.momentum()).mass();
00071           if ( mll < 0. || m < mll )  mll = m;
00072         }
00073       }
00074       if ( minDR_ll <= 0.3 || mll <= 20*GeV )  vetoEvent;
00075 
00076       if ( leptons[0].charge() * leptons[1].charge() < 0.0 )  vetoEvent;
00077 
00078       const MissingMomentum& met = applyProjection<MissingMomentum>(event, "MissingET");
00079       if ( met.vectorEt().mod() <= 40*GeV )  vetoEvent;
00080 
00081       const Jets& all_jets = applyProjection<FastJets>(event, "jets").jetsByPt( (Cuts::abseta < 4.5) && (Cuts::pT > 30*GeV) );
00082       Jets jets;
00083       double minDR_overall = MAXDOUBLE;
00084       foreach (const Jet& jet, all_jets) {
00085         double minDR_jet = MAXDOUBLE, minDR_electrons = MAXDOUBLE;
00086         foreach( DressedLepton lep, leptons ) {
00087           double dr = deltaR(jet, lep);
00088           if ( dr < minDR_jet )  minDR_jet = dr;
00089           if ( lep.abspid() == 11 && dr < minDR_electrons )  minDR_electrons = dr;
00090         }
00091         if ( minDR_electrons < 0.05 )  continue; // veto jet if it overlaps with electron
00092         if ( minDR_jet < minDR_overall )  minDR_overall = minDR_jet;
00093         jets += jet;
00094       }
00095       if ( jets.size() < 2 || minDR_overall <= 0.3 )  vetoEvent;
00096 
00097       FourMomentum dijet = jets[0].momentum() + jets[1].momentum();
00098       if ( dijet.mass() <= 500*GeV )  vetoEvent;
00099 
00100       // inclusive region
00101       _hist->fill(0.5, weight);
00102 
00103       // VBS region
00104       if ( deltaRap(jets[0], jets[1]) > 2.4 )  _hist->fill(1.5, weight);
00105     }
00106 
00107     /// Normalise histograms etc., after the run
00108     void finalize() {
00109 
00110       const double scalefactor( crossSection() / sumOfWeights() );
00111       scale(_hist, scalefactor);
00112 
00113     }
00114     //@}
00115 
00116   private:
00117 
00118     /// @name Histograms
00119     //@{
00120     Histo1DPtr _hist;
00121     //@}
00122 
00123   };
00124 
00125   // The hook for the plugin system
00126   DECLARE_RIVET_PLUGIN(ATLAS_2014_I1298023);
00127 
00128 }