rivet is hosted by Hepforge, IPPP Durham
ATLAS_2011_S9212183.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/Projections/FinalState.hh"
00005 #include "Rivet/Projections/ChargedFinalState.hh"
00006 #include "Rivet/Projections/VisibleFinalState.hh"
00007 #include "Rivet/Projections/IdentifiedFinalState.hh"
00008 #include "Rivet/Projections/FastJets.hh"
00009 
00010 namespace Rivet {
00011 
00012   using namespace Cuts;
00013 
00014 
00015   /// @author Chris Wymant
00016   class ATLAS_2011_S9212183 : public Analysis {
00017   public:
00018 
00019     /// @name Constructors etc.
00020     //@{
00021 
00022     /// Constructor
00023     ATLAS_2011_S9212183()
00024       : Analysis("ATLAS_2011_S9212183")
00025     {    }
00026 
00027     //@}
00028 
00029 
00030   public:
00031 
00032     /// @name Analysis methods
00033     //@{
00034 
00035     /// Book histograms and initialise projections before the run
00036     void init() {
00037 
00038       // Projection to find the electrons
00039       IdentifiedFinalState elecs( etaIn(-2.47, 2.47) 
00040                   & (pT >= 20.0*GeV) );
00041       elecs.acceptIdPair(PID::ELECTRON);
00042       addProjection(elecs, "elecs");
00043 
00044       // Projection to find the muons
00045       IdentifiedFinalState muons( etaIn(-2.4, 2.4) 
00046                   & (pT >= 10.0*GeV) );
00047       muons.acceptIdPair(PID::MUON);
00048       addProjection(muons, "muons");
00049 
00050       // Jet finder
00051       addProjection(FastJets(FinalState(), FastJets::ANTIKT, 0.4), "AntiKtJets04");
00052 
00053       // All tracks (to do deltaR with leptons)
00054       addProjection(ChargedFinalState(-3.0,3.0),"cfs");
00055 
00056       // Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
00057       addProjection(VisibleFinalState(-4.5,4.5),"vfs");
00058 
00059 
00060       // Book histograms
00061       _count_2j   = bookHisto1D("count_2j",   1, 0., 1.);
00062       _count_3j   = bookHisto1D("count_3j",   1, 0., 1.);
00063       _count_4j5  = bookHisto1D("count_4j5",  1, 0., 1.);
00064       _count_4j10 = bookHisto1D("count_4j10", 1, 0., 1.);
00065       _count_HM   = bookHisto1D("count_HM",   1, 0., 1.);
00066 
00067       _hist_meff_2j  = bookHisto1D(1, 1, 1);
00068       _hist_meff_3j  = bookHisto1D(2, 1, 1);
00069       _hist_meff_4j  = bookHisto1D(3, 1, 1);
00070       _hist_meff_HM  = bookHisto1D(4, 1, 1);
00071 
00072       _hist_eTmiss  = bookHisto1D("Et_miss", 20, 0., 1000.);
00073     }
00074 
00075 
00076     /// Perform the per-event analysis
00077     void analyze(const Event& event) {
00078       const double weight = event.weight();
00079 
00080       Jets cand_jets;
00081       const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
00082       foreach (const Jet& jet, jets) {
00083         if ( fabs( jet.eta() ) < 4.9 ) {
00084           cand_jets.push_back(jet);
00085         }
00086       }
00087 
00088       const Particles cand_e  = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00089 
00090       // Muon isolation not mentioned in hep-exp 1109.6572, unlike in 1102.5290,
00091       // but assumed to still be applicable
00092       Particles cand_mu;
00093       const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
00094       const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
00095       foreach (const Particle& mu, muons) {
00096         double pTinCone = -mu.pT();
00097         foreach (const Particle& track, chg_tracks) {
00098           if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
00099             pTinCone += track.pT();
00100           }
00101         }
00102         if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
00103       }
00104 
00105       // Resolve jet-lepton overlap for jets with |eta| < 2.8
00106       Jets cand_jets_2;
00107       foreach ( const Jet& jet, cand_jets ) {
00108         if ( fabs( jet.eta() ) >= 2.8 ) {
00109           cand_jets_2.push_back( jet );
00110         } else {
00111           bool away_from_e = true;
00112           foreach ( const Particle & e, cand_e ) {
00113             if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00114               away_from_e = false;
00115               break;
00116             }
00117           }
00118           if ( away_from_e ) cand_jets_2.push_back( jet );
00119         }
00120       }
00121 
00122 
00123       Particles recon_e, recon_mu;
00124 
00125       foreach ( const Particle & e, cand_e ) {
00126         bool away = true;
00127         foreach ( const Jet& jet, cand_jets_2 ) {
00128           if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
00129             away = false;
00130             break;
00131           }
00132         }
00133         if ( away ) recon_e.push_back( e );
00134       }
00135 
00136       foreach ( const Particle & mu, cand_mu ) {
00137         bool away = true;
00138         foreach ( const Jet& jet, cand_jets_2 ) {
00139           if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
00140             away = false;
00141             break;
00142           }
00143         }
00144         if ( away ) recon_mu.push_back( mu );
00145       }
00146 
00147 
00148       // pTmiss
00149       // Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
00150       // i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
00151       Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
00152       FourMomentum pTmiss;
00153       foreach ( const Particle & p, vfs_particles ) {
00154         pTmiss -= p.momentum();
00155       }
00156       foreach ( const Jet& jet, cand_jets_2 ) {
00157         if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum();
00158       }
00159       double eTmiss = pTmiss.pT();
00160 
00161 
00162       // Final jet filter
00163       Jets recon_jets;
00164       foreach ( const Jet& jet, cand_jets_2 ) {
00165         if ( fabs( jet.eta() ) <= 2.8 ) recon_jets.push_back( jet );
00166       }
00167       // NB. It seems that jets with |eta| > 2.8 could have been thrown away at
00168       // the start; we don't do so, in order to follow both the structure of
00169       // the paper and the similar Rivet analysis ATLAS_2011_S8983313
00170 
00171       // 'candidate' muons needed only 10 GeV, to cause a veto they need 20 GeV
00172       Particles veto_mu;
00173       foreach ( const Particle & mu, cand_mu ) {
00174         if ( mu.pT() >= 20.0*GeV ) veto_mu.push_back(mu);
00175       }
00176 
00177       if ( ! ( veto_mu.empty() && recon_e.empty() ) ) {
00178         MSG_DEBUG("Charged leptons left after selection");
00179         vetoEvent;
00180       }
00181 
00182       if ( eTmiss <= 130 * GeV ) {
00183         MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
00184         vetoEvent;
00185       }
00186 
00187       if ( recon_jets.empty() || recon_jets[0].pT() <= 130.0 * GeV ) {
00188         MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00189         vetoEvent;
00190       }
00191 
00192       // ==================== observables ====================
00193 
00194       int Njets = 0;
00195       double min_dPhi = 999.999;
00196       double pTmiss_phi = pTmiss.phi();
00197       foreach ( const Jet& jet, recon_jets ) {
00198         if ( jet.pT() > 40 * GeV ) {
00199           if ( Njets < 3 ) {
00200             min_dPhi = min( min_dPhi, deltaPhi( pTmiss_phi, jet.phi() ) );
00201           }
00202           ++Njets;
00203         }
00204       }
00205 
00206       int NjetsHighMass = 0;
00207       foreach ( const Jet& jet, recon_jets ) {
00208         if ( jet.pT() > 80.0 * GeV ) {
00209           ++NjetsHighMass;
00210         }
00211       }
00212 
00213       if ( Njets < 2 ) {
00214         MSG_DEBUG("Only " << Njets << " >40 GeV jets left");
00215         vetoEvent;
00216       }
00217 
00218       if ( min_dPhi <= 0.4 ) {
00219         MSG_DEBUG("dPhi too small");
00220         vetoEvent;
00221       }
00222 
00223       // m_eff
00224       double m_eff_2j = eTmiss + recon_jets[0].pT() + recon_jets[1].pT();
00225       double m_eff_3j = recon_jets.size() < 3 ? -999.0 : m_eff_2j + recon_jets[2].pT();
00226       double m_eff_4j = recon_jets.size() < 4 ? -999.0 : m_eff_3j + recon_jets[3].pT();
00227       double m_eff_HM = eTmiss;
00228       foreach ( const Jet& jet, recon_jets ) {
00229         if ( jet.pT() > 40.0 * GeV ) m_eff_HM += jet.pT();
00230       }
00231 
00232       double et_meff_2j = eTmiss / m_eff_2j;
00233       double et_meff_3j = eTmiss / m_eff_3j;
00234       double et_meff_4j = eTmiss / m_eff_4j;
00235       double et_meff_HM = eTmiss / m_eff_HM;
00236 
00237 
00238       // ==================== FILL ====================
00239 
00240       MSG_DEBUG( "Trying to fill "
00241                  << Njets << ' '
00242                  << m_eff_2j << ' '
00243                  << et_meff_2j << ' '
00244                  << m_eff_3j << ' '
00245                  << et_meff_3j << ' '
00246                  << m_eff_4j << ' '
00247                  << et_meff_4j << ' '
00248                  << m_eff_HM << ' '
00249                  << et_meff_HM );
00250 
00251 
00252       _hist_eTmiss->fill(eTmiss, weight);
00253 
00254 
00255       // 2j region
00256       if ( et_meff_2j > 0.3 ) {
00257         _hist_meff_2j->fill(m_eff_2j, weight);
00258         if ( m_eff_2j > 1000 * GeV ) {
00259           MSG_DEBUG("Hits 2j");
00260           _count_2j->fill(0.5, weight);
00261         }
00262       }
00263 
00264 
00265       // 3j region
00266       if ( Njets >= 3 && et_meff_3j > 0.25 ) {
00267         _hist_meff_3j->fill(m_eff_3j, weight);
00268         if ( m_eff_3j > 1000 * GeV ) {
00269           MSG_DEBUG("Hits 3j");
00270           _count_3j->fill(0.5, weight);
00271         }
00272       }
00273 
00274 
00275       // 4j5 & 4j10 regions
00276       if ( Njets >= 4 && et_meff_4j > 0.25 ) {
00277         _hist_meff_4j->fill(m_eff_4j, weight);
00278         if ( m_eff_4j > 500 * GeV ) {
00279           MSG_DEBUG("Hits 4j5");
00280           _count_4j5->fill(0.5, weight);
00281         }
00282         if ( m_eff_4j > 1000 * GeV ) {
00283           MSG_DEBUG("Hits 4j10");
00284           _count_4j10->fill(0.5, weight);
00285         }
00286       }
00287 
00288 
00289       // High mass region
00290       if ( NjetsHighMass >= 4 && et_meff_HM > 0.2 ) {
00291         _hist_meff_HM->fill(m_eff_HM, weight);
00292         if ( m_eff_HM > 1100 * GeV ) {
00293           MSG_DEBUG("Hits HM");
00294           _count_HM->fill(0.5, weight);
00295         }
00296       }
00297 
00298     }
00299 
00300 
00301     void finalize() {
00302       // Two, three and four jet channels have bin width = 100 (GeV)
00303       // High mass channel has bin width = 150 (GeV)
00304       // Integrated luminosity = 1040 (pb)
00305       scale( _hist_meff_2j, 100. * 1040 * crossSection()/sumOfWeights() );
00306       scale( _hist_meff_3j, 100. * 1040 * crossSection()/sumOfWeights() );
00307       scale( _hist_meff_4j, 100. * 1040 * crossSection()/sumOfWeights() );
00308       scale( _hist_meff_HM, 150. * 1040 * crossSection()/sumOfWeights() );
00309     }
00310 
00311     //@}
00312 
00313 
00314   private:
00315 
00316     Histo1DPtr _count_2j;
00317     Histo1DPtr _count_3j;
00318     Histo1DPtr _count_4j5;
00319     Histo1DPtr _count_4j10;
00320     Histo1DPtr _count_HM;
00321     Histo1DPtr _hist_meff_2j;
00322     Histo1DPtr _hist_meff_3j;
00323     Histo1DPtr _hist_meff_4j;
00324     Histo1DPtr _hist_meff_HM;
00325     Histo1DPtr _hist_eTmiss;
00326 
00327   };
00328 
00329 
00330   // This global object acts as a hook for the plugin system
00331   DECLARE_RIVET_PLUGIN(ATLAS_2011_S9212183);
00332 
00333 }