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