rivet is hosted by Hepforge, IPPP Durham
ATLAS_2011_CONF_2011_090.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/VetoedFinalState.hh"
00011 #include "Rivet/Projections/FastJets.hh"
00012 
00013 namespace Rivet {
00014 
00015 
00016   class ATLAS_2011_CONF_2011_090 : public Analysis {
00017   public:
00018 
00019     /// @name Constructors etc.
00020     //@{
00021 
00022     /// Constructor
00023 
00024     ATLAS_2011_CONF_2011_090()
00025       : Analysis("ATLAS_2011_CONF_2011_090")
00026     {    }
00027 
00028     //@}
00029 
00030 
00031   public:
00032 
00033     /// @name Analysis methods
00034     //@{
00035 
00036     /// Book histograms and initialize projections before the run
00037     void init() {
00038 
00039       // projection to find the electrons
00040       std::vector<std::pair<double, double> > eta_e;
00041       eta_e.push_back(make_pair(-2.47,2.47));
00042       IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00043       elecs.acceptIdPair(ELECTRON);
00044       addProjection(elecs, "elecs");
00045 
00046 
00047       // veto region electrons (from 2010 arXiv:1102.2357v2)
00048       std::vector<std::pair<double, double> > eta_v_e;
00049       eta_v_e.push_back(make_pair(-1.52,-1.37));
00050       eta_v_e.push_back(make_pair( 1.37, 1.52));
00051       IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
00052       veto_elecs.acceptIdPair(ELECTRON);
00053       addProjection(veto_elecs, "veto_elecs");
00054 
00055 
00056       // projection to find the muons
00057       std::vector<std::pair<double, double> > eta_m;
00058       eta_m.push_back(make_pair(-2.4,2.4));
00059       IdentifiedFinalState muons(eta_m, 10.0*GeV);
00060       muons.acceptIdPair(MUON);
00061       addProjection(muons, "muons");
00062 
00063 
00064       // Jet finder
00065       VetoedFinalState vfs;
00066       vfs.addVetoPairId(MUON);
00067       addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
00068                    "AntiKtJets04");
00069 
00070 
00071       // all tracks (to do deltaR with leptons)
00072       addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
00073 
00074 
00075       // for pTmiss
00076       addProjection(VisibleFinalState(-4.9,4.9),"vfs");
00077 
00078 
00079       /// Book histograms
00080       _count_mu_channel = bookHisto1D("count_muon_channel", 1, 0., 1.);
00081       _count_e_channel = bookHisto1D("count_electron_channel", 1, 0., 1.);
00082       _hist_eTmiss_e = bookHisto1D("Et_miss_e", 50, 0., 500.);
00083       _hist_eTmiss_mu = bookHisto1D("Et_miss_mu", 50, 0., 500.);
00084       _hist_m_eff_e = bookHisto1D("m_eff_e", 60, 0., 1500.);
00085       _hist_m_eff_mu = bookHisto1D("m_eff_mu", 60, 0., 1500.);
00086       _hist_m_eff_e_final = bookHisto1D("m_eff_e_final", 15, 0., 1500.);
00087       _hist_m_eff_mu_final = bookHisto1D("m_eff_mu_final", 15, 0., 1500.);
00088 
00089 
00090 
00091     }
00092 
00093 
00094 
00095     /// Perform the per-event analysis
00096     void analyze(const Event& event) {
00097 
00098       const double weight = event.weight();
00099 
00100 
00101       ParticleVector veto_e
00102     = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
00103       if ( ! veto_e.empty() ) {
00104         MSG_DEBUG("electrons in veto region");
00105         vetoEvent;
00106       }
00107 
00108       Jets cand_jets;
00109       foreach ( const Jet& jet,
00110           applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
00111         if ( fabs( jet.momentum().eta() ) < 2.8 ) {
00112           cand_jets.push_back(jet);
00113         }
00114       }
00115 
00116       ParticleVector candtemp_e =
00117     applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00118       ParticleVector candtemp_mu =
00119     applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
00120       ParticleVector chg_tracks =
00121     applyProjection<ChargedFinalState>(event, "cfs").particles();
00122       ParticleVector cand_mu;
00123       ParticleVector cand_e;
00124 
00125 
00126       // pTcone around muon track
00127       foreach ( const Particle & mu, candtemp_mu ) {
00128     double pTinCone = -mu.momentum().pT();
00129     foreach ( const Particle & track, chg_tracks ) {
00130       if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
00131         pTinCone += track.momentum().pT();
00132     }
00133     if ( pTinCone < 1.8*GeV )
00134       cand_mu.push_back(mu);
00135       }
00136 
00137 
00138       // pTcone around electron
00139       foreach ( const Particle e, candtemp_e ) {
00140     double pTinCone = -e.momentum().pT();
00141     foreach ( const Particle & track, chg_tracks ) {
00142       if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
00143         pTinCone += track.momentum().pT();
00144     }
00145     if ( pTinCone < 0.10 * e.momentum().pT() )
00146       cand_e.push_back(e);
00147       }
00148 
00149 
00150 
00151       // discard jets that overlap with electrons
00152       Jets cand_jets_2;
00153       foreach ( const Jet& jet, cand_jets ) {
00154       bool away_from_e = true;
00155       foreach ( const Particle & e, cand_e ) {
00156         if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00157           away_from_e = false;
00158           break;
00159         }
00160       }
00161       if ( away_from_e )
00162         cand_jets_2.push_back( jet );
00163       }
00164 
00165       // only consider leptons far from jet
00166       ParticleVector recon_e, recon_mu;
00167       foreach ( const Particle & e, cand_e ) {
00168         bool e_near_jet = false;
00169     foreach ( const Jet& jet, cand_jets_2 ) {
00170           if ( deltaR(e.momentum(),jet.momentum()) < 0.4 &&
00171            deltaR(e.momentum(),jet.momentum()) > 0.2 )
00172         e_near_jet = true;
00173     }
00174         if ( ! e_near_jet )
00175           recon_e.push_back( e );
00176       }
00177 
00178       foreach ( const Particle & mu, cand_mu ) {
00179     bool mu_near_jet = false;
00180     foreach ( const Jet& jet, cand_jets_2 ) {
00181       if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
00182         mu_near_jet = true;
00183     }
00184     if ( ! mu_near_jet )
00185       recon_mu.push_back( mu );
00186       }
00187       
00188       // pTmiss
00189       ParticleVector vfs_particles
00190     = applyProjection<VisibleFinalState>(event, "vfs").particles();
00191       FourMomentum pTmiss;
00192       foreach ( const Particle & p, vfs_particles ) {
00193     pTmiss -= p.momentum();
00194       }
00195       double eTmiss = pTmiss.pT();
00196 
00197 
00198       // final jet filter
00199       Jets recon_jets;
00200       foreach ( const Jet& jet, cand_jets_2 ) {
00201       recon_jets.push_back( jet );
00202       }
00203 
00204 
00205 
00206 
00207       // ==================== observables ====================
00208 
00209 
00210       // Njets
00211 
00212       int Njets = 0;
00213       double pTmiss_phi = pTmiss.phi();
00214       foreach ( const Jet& jet, recon_jets ) {
00215     if ( fabs(jet.momentum().eta()) < 2.8 )
00216       Njets+=1;
00217       }
00218       if ( Njets < 3 ) {
00219     MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
00220     vetoEvent;
00221       }
00222 
00223       if ( recon_jets[0].momentum().pT() <= 60.0 * GeV ) {
00224     MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00225     vetoEvent;
00226       }
00227       for ( int i = 1; i < 3; ++i ) {
00228     if ( recon_jets[i].momentum().pT() <= 25*GeV ) {
00229       vetoEvent;
00230     }
00231       }
00232 
00233       for ( int i = 0; i < 3; ++i ) {
00234     double dPhi = deltaPhi( pTmiss_phi, recon_jets[i].momentum().phi() );
00235     if ( dPhi <= 0.2 ) {
00236       MSG_DEBUG("dPhi too small");
00237       vetoEvent;
00238       break;
00239     }
00240       }
00241 
00242 
00243       ParticleVector lepton;
00244       if ( recon_mu.empty() && recon_e.empty() ) {
00245     MSG_DEBUG("No leptons");
00246     vetoEvent;
00247       }
00248       else {
00249     foreach ( const Particle & mu, recon_mu )
00250         lepton.push_back(mu);
00251         foreach ( const Particle & e, recon_e )
00252         lepton.push_back(e);
00253       }
00254 
00255       std::sort(lepton.begin(), lepton.end(), cmpParticleByPt);
00256 
00257       double e_id = 11;
00258       double mu_id = 13;
00259 
00260       // one hard leading lepton cut
00261       if ( fabs(lepton[0].pdgId()) == e_id &&
00262            lepton[0].momentum().pT() <= 25*GeV ) {
00263     vetoEvent;
00264       }
00265       else if ( fabs(lepton[0].pdgId()) == mu_id &&
00266                 lepton[0].momentum().pT() <= 20*GeV ) {
00267     vetoEvent;
00268       }
00269 
00270       // exactly one hard leading lepton cut
00271       if(lepton.size()>1) {
00272     if ( fabs(lepton[1].pdgId()) == e_id &&
00273          lepton[1].momentum().pT() > 20*GeV ) {
00274       vetoEvent;
00275     }
00276     else if ( fabs(lepton[1].pdgId()) == mu_id &&
00277           lepton[1].momentum().pT() > 10*GeV ) {
00278       vetoEvent;
00279     }
00280       }
00281 
00282 
00283       // ==================== FILL ====================
00284 
00285 
00286       FourMomentum pT_l = lepton[0].momentum();
00287 
00288 
00289       double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
00290       double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
00291 
00292 
00293       // effective mass
00294       double m_eff = eTmiss + pT_l.pT()
00295     + recon_jets[0].momentum().pT()
00296     + recon_jets[1].momentum().pT()
00297     + recon_jets[2].momentum().pT();
00298 
00299 
00300       // Electron channel signal region
00301 
00302       if ( fabs( lepton[0].pdgId() ) == e_id ) {
00303 
00304         _hist_eTmiss_e->fill(eTmiss, weight);
00305         _hist_m_eff_e->fill(m_eff, weight);
00306 
00307         if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00308       _hist_m_eff_e_final->fill(m_eff, weight);
00309       if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00310             _count_e_channel->fill(0.5,weight);
00311       }
00312         }
00313       }
00314 
00315       // Muon channel signal region
00316 
00317       else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
00318 
00319         _hist_eTmiss_mu->fill(eTmiss, weight);
00320         _hist_m_eff_mu->fill(m_eff, weight);
00321 
00322         if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00323           _hist_m_eff_mu_final->fill(m_eff, weight);
00324       if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00325             _count_mu_channel->fill(0.5,weight);
00326           }
00327         }
00328 
00329       }
00330 
00331 
00332     }
00333 
00334     //@}
00335 
00336 
00337     void finalize() {
00338     scale( _hist_eTmiss_e      , 10.  * 165. * crossSection()/picobarn/sumOfWeights() );
00339     scale( _hist_eTmiss_mu     , 10.  * 165. * crossSection()/picobarn/sumOfWeights() );
00340     scale( _hist_m_eff_e       , 25.  * 165. * crossSection()/picobarn/sumOfWeights() );
00341     scale( _hist_m_eff_mu      , 25.  * 165. * crossSection()/picobarn/sumOfWeights() );
00342     scale( _hist_m_eff_e_final , 100. * 165. * crossSection()/picobarn/sumOfWeights() );
00343     scale( _hist_m_eff_mu_final, 100. * 165. * crossSection()/picobarn/sumOfWeights() );
00344     }
00345 
00346   private:
00347 
00348     /// @name Histograms
00349     //@{
00350     Histo1DPtr _count_e_channel;
00351     Histo1DPtr _count_mu_channel;
00352 
00353     Histo1DPtr _hist_eTmiss_e;
00354     Histo1DPtr _hist_eTmiss_mu;
00355 
00356     Histo1DPtr _hist_m_eff_e;
00357     Histo1DPtr _hist_m_eff_mu;
00358     Histo1DPtr _hist_m_eff_e_final;
00359     Histo1DPtr _hist_m_eff_mu_final;
00360 
00361 
00362     //@}
00363 
00364 
00365   };
00366 
00367 
00368 
00369   // The hook for the plugin system
00370   DECLARE_RIVET_PLUGIN(ATLAS_2011_CONF_2011_090);
00371 
00372 }