rivet is hosted by Hepforge, IPPP Durham
ATLAS_2012_I1125961.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetYODA.hh"
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Projections/ChargedFinalState.hh"
00008 #include "Rivet/Projections/VisibleFinalState.hh"
00009 #include "Rivet/Projections/IdentifiedFinalState.hh"
00010 #include "Rivet/Projections/FastJets.hh"
00011 #include "Rivet/Projections/VetoedFinalState.hh"
00012 
00013 namespace Rivet {
00014 
00015   /// @author Peter Richardson
00016   class ATLAS_2012_I1125961 : public Analysis {
00017   public:
00018 
00019     /// @name Constructors etc.
00020     //@{
00021 
00022     /// Constructor
00023     ATLAS_2012_I1125961()
00024       : Analysis("ATLAS_2012_I1125961")
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       std::vector<std::pair<double, double> > eta_e;
00040       eta_e.push_back(make_pair(-2.47,2.47));
00041       IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00042       elecs.acceptIdPair(ELECTRON);
00043       addProjection(elecs, "elecs");
00044 
00045       // Projection to find the muons
00046       std::vector<std::pair<double, double> > eta_m;
00047       eta_m.push_back(make_pair(-2.4,2.4));
00048       IdentifiedFinalState muons(eta_m, 10.0*GeV);
00049       muons.acceptIdPair(MUON);
00050       addProjection(muons, "muons");
00051 
00052       // Jet finder
00053       VetoedFinalState vfs;
00054       vfs.addVetoPairId(MUON);
00055       addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
00056 
00057       // All tracks (to do deltaR with leptons)
00058       addProjection(ChargedFinalState(-3.0,3.0),"cfs");
00059 
00060       // Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
00061       addProjection(VisibleFinalState(-4.5,4.5),"vfs");
00062 
00063       // Book histograms
00064       _count_A_tight   = bookHisto1D("count_A_tight"   , 1, 0., 1.);
00065       _count_A_medium  = bookHisto1D("count_A_medium"  , 1, 0., 1.);
00066       _count_Ap_medium = bookHisto1D("count_Ap_medium" , 1, 0., 1.);
00067       _count_B_tight   = bookHisto1D("count_B_tight"   , 1, 0., 1.);
00068       _count_C_tight   = bookHisto1D("count_C_tight"   , 1, 0., 1.);
00069       _count_C_medium  = bookHisto1D("count_C_medium"  , 1, 0., 1.);
00070       _count_C_loose   = bookHisto1D("count_C_loose"   , 1, 0., 1.);
00071       _count_D_tight   = bookHisto1D("count_D_tight"   , 1, 0., 1.);
00072       _count_E_tight   = bookHisto1D("count_E_tight"   , 1, 0., 1.);
00073       _count_E_medium  = bookHisto1D("count_E_medium"  , 1, 0., 1.);
00074       _count_E_loose   = bookHisto1D("count_E_loose"   , 1, 0., 1.);
00075 
00076       _hist_meff_A  = bookHisto1D("hist_m_eff_A" , 30, 0., 3000.);
00077       _hist_meff_Ap = bookHisto1D("hist_m_eff_Ap", 30, 0., 3000.);
00078       _hist_meff_B  = bookHisto1D("hist_m_eff_B" , 30, 0., 3000.);
00079       _hist_meff_C  = bookHisto1D("hist_m_eff_C" , 30, 0., 3000.);
00080       _hist_meff_D  = bookHisto1D("hist_m_eff_D" , 30, 0., 3000.);
00081       _hist_meff_E  = bookHisto1D("hist_m_eff_E" , 30, 0., 3000.);
00082 
00083     }
00084 
00085 
00086     /// Perform the per-event analysis
00087     void analyze(const Event& event) {
00088       const double weight = event.weight();
00089 
00090       Jets cand_jets;
00091       const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
00092       foreach (const Jet& jet, jets) {
00093         if ( fabs( jet.momentum().eta() ) < 4.9 ) {
00094           cand_jets.push_back(jet);
00095         }
00096       }
00097 
00098       const ParticleVector cand_e  = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00099 
00100       // Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable
00101       ParticleVector cand_mu;
00102       const ParticleVector chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
00103       const ParticleVector muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
00104       foreach (const Particle& mu, muons) {
00105         double pTinCone = -mu.momentum().pT();
00106         foreach (const Particle& track, chg_tracks) {
00107           if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
00108             pTinCone += track.momentum().pT();
00109           }
00110         }
00111         if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
00112       }
00113 
00114       // Resolve jet-lepton overlap for jets with |eta| < 2.8
00115       Jets recon_jets;
00116       foreach ( const Jet& jet, cand_jets ) {
00117         if ( fabs( jet.momentum().eta() ) >= 2.8 ) continue;
00118         bool away_from_e = true;
00119         foreach ( const Particle & e, cand_e ) {
00120           if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00121             away_from_e = false;
00122             break;
00123           }
00124         }
00125         if ( away_from_e ) recon_jets.push_back( jet );
00126       }
00127 
00128       ParticleVector recon_e, recon_mu;
00129 
00130       foreach ( const Particle & e, cand_e ) {
00131         bool away = true;
00132         foreach ( const Jet& jet, recon_jets ) {
00133           if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
00134             away = false;
00135             break;
00136           }
00137         }
00138         if ( away ) recon_e.push_back( e );
00139       }
00140 
00141       foreach ( const Particle & mu, cand_mu ) {
00142         bool away = true;
00143         foreach ( const Jet& jet, recon_jets ) {
00144           if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
00145             away = false;
00146             break;
00147           }
00148         }
00149         if ( away ) recon_mu.push_back( mu );
00150       }
00151 
00152       // pTmiss
00153       // Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
00154       // i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
00155       ParticleVector vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
00156       FourMomentum pTmiss;
00157       foreach ( const Particle & p, vfs_particles ) {
00158         pTmiss -= p.momentum();
00159       }
00160       foreach ( const Jet& jet, cand_jets ) {
00161         if ( fabs( jet.momentum().eta() ) > 4.5 ) pTmiss -= jet.momentum();
00162       }
00163       double eTmiss = pTmiss.pT();
00164 
00165       // no electron pT> 20 or muons pT>10
00166       if ( !recon_mu.empty() || !recon_e.empty() ) {
00167         MSG_DEBUG("Charged leptons left after selection");
00168         vetoEvent;
00169       }
00170 
00171       if ( eTmiss <= 160 * GeV ) {
00172         MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
00173         vetoEvent;
00174       }
00175 
00176       if ( recon_jets.size()<2 ||
00177            recon_jets[0].momentum().pT() <= 130.0 * GeV ||
00178            recon_jets[0].momentum().pT() <=  60.0 * GeV ) {
00179         MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00180         vetoEvent;
00181       }
00182 
00183       // ==================== observables ====================
00184 
00185       int Njets = 0;
00186       double min_dPhi_All = 999.999;
00187       double min_dPhi_2   = 999.999;
00188       double min_dPhi_3   = 999.999;
00189       double pTmiss_phi = pTmiss.phi();
00190       foreach ( const Jet& jet, recon_jets ) {
00191         if ( jet.momentum().pT() < 40 * GeV ) continue;
00192         if ( Njets < 2 ) {
00193           min_dPhi_2 = min( min_dPhi_2, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
00194         }
00195         if( Njets < 3) {
00196           min_dPhi_3 = min( min_dPhi_3, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
00197         }
00198         min_dPhi_All = min( min_dPhi_All, deltaPhi( pTmiss_phi, jet.momentum().phi() ) );
00199         ++Njets;
00200       }
00201 
00202       // inclusive meff
00203       double m_eff_inc =  eTmiss;
00204       foreach ( const Jet& jet, recon_jets ) {
00205         double perp =  jet.momentum().pT();
00206         if(perp>40.) m_eff_inc += perp;
00207       }
00208 
00209       // region A
00210       double m_eff_Nj = eTmiss + recon_jets[0].momentum().pT() + recon_jets[1].momentum().pT();
00211       if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) {
00212         _hist_meff_A->fill(m_eff_inc,weight);
00213         if(m_eff_inc>1900.) _count_A_tight ->fill(0.5,weight);
00214         if(m_eff_inc>1400.) _count_A_medium->fill(0.5,weight);
00215       }
00216 
00217       // region A'
00218       if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.4 ) {
00219         _hist_meff_Ap->fill(m_eff_inc,weight);
00220         if(m_eff_inc>1200.) _count_Ap_medium->fill(0.5,weight);
00221       }
00222 
00223       // for rest of regions 3 jets pT> 60 needed
00224       if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<60.)
00225         vetoEvent;
00226 
00227       // region B
00228       m_eff_Nj +=  recon_jets[2].momentum().perp();
00229       if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) {
00230         _hist_meff_B->fill(m_eff_inc,weight);
00231         if(m_eff_inc>1900.) _count_B_tight ->fill(0.5,weight);
00232       }
00233 
00234       // for rest of regions 4 jets pT> 60 needed
00235       if(recon_jets.size()<4 || recon_jets[3].momentum().perp()<60.)
00236         vetoEvent;
00237 
00238       // region C
00239       m_eff_Nj +=  recon_jets[3].momentum().perp();
00240       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) {
00241         _hist_meff_C->fill(m_eff_inc,weight);
00242         if(m_eff_inc>1500.) _count_C_tight ->fill(0.5,weight);
00243         if(m_eff_inc>1200.) _count_C_medium->fill(0.5,weight);
00244         if(m_eff_inc> 900.) _count_C_loose ->fill(0.5,weight);
00245       }
00246 
00247       // for rest of regions 5 jets pT> 40 needed
00248       if(recon_jets.size()<5 || recon_jets[4].momentum().perp()<40.)
00249         vetoEvent;
00250 
00251       // region D
00252       m_eff_Nj +=  recon_jets[4].momentum().perp();
00253       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.2 ) {
00254         _hist_meff_D->fill(m_eff_inc,weight);
00255         if(m_eff_inc>1500.) _count_D_tight ->fill(0.5,weight);
00256       }
00257 
00258       // for rest of regions 6 jets pT> 40 needed
00259       if(recon_jets.size()<6 || recon_jets[5].momentum().perp()<40.)
00260         vetoEvent;
00261 
00262       // region E
00263       m_eff_Nj +=  recon_jets[5].momentum().perp();
00264       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
00265         _hist_meff_E->fill(m_eff_inc,weight);
00266         if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight);
00267         if(m_eff_inc>1200.) _count_E_medium->fill(0.5,weight);
00268         if(m_eff_inc> 900.) _count_E_loose ->fill(0.5,weight);
00269       }
00270     }
00271 
00272 
00273     void finalize() {
00274 
00275       double norm = crossSection()/femtobarn*4.7/sumOfWeights();
00276       // these are number of events at 4.7fb^-1 per 100 GeV
00277       scale( _hist_meff_A , 100. * norm );
00278       scale( _hist_meff_Ap, 100. * norm );
00279       scale( _hist_meff_B , 100. * norm );
00280       scale( _hist_meff_C , 100. * norm );
00281       scale( _hist_meff_D , 100. * norm );
00282       scale( _hist_meff_E , 100. * norm );
00283       // these are number of events at 4.7fb^-1
00284       scale(_count_A_tight  ,norm);
00285       scale(_count_A_medium ,norm);
00286       scale(_count_Ap_medium,norm);
00287       scale(_count_B_tight  ,norm);
00288       scale(_count_C_tight  ,norm);
00289       scale(_count_C_medium ,norm);
00290       scale(_count_C_loose  ,norm);
00291       scale(_count_D_tight  ,norm);
00292       scale(_count_E_tight  ,norm);
00293       scale(_count_E_medium ,norm);
00294       scale(_count_E_loose  ,norm);
00295     }
00296 
00297     //@}
00298 
00299 
00300   private:
00301 
00302     Histo1DPtr _count_A_tight;
00303     Histo1DPtr _count_A_medium;
00304     Histo1DPtr _count_Ap_medium;
00305     Histo1DPtr _count_B_tight;
00306     Histo1DPtr _count_C_tight;
00307     Histo1DPtr _count_C_medium;
00308     Histo1DPtr _count_C_loose;
00309     Histo1DPtr _count_D_tight;
00310     Histo1DPtr _count_E_tight;
00311     Histo1DPtr _count_E_medium;
00312     Histo1DPtr _count_E_loose;
00313 
00314     Histo1DPtr _hist_meff_A ;
00315     Histo1DPtr _hist_meff_Ap;
00316     Histo1DPtr _hist_meff_B ;
00317     Histo1DPtr _hist_meff_C ;
00318     Histo1DPtr _hist_meff_D ;
00319     Histo1DPtr _hist_meff_E ;
00320 
00321   };
00322 
00323 
00324   // This global object acts as a hook for the plugin system
00325   DECLARE_RIVET_PLUGIN(ATLAS_2012_I1125961);
00326 
00327 }