ATLAS_2011_S9225137.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetAIDA.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/VetoedFinalState.hh"
00010 #include "Rivet/Projections/IdentifiedFinalState.hh"
00011 #include "Rivet/Projections/FastJets.hh"
00012 #include "Rivet/Tools/RivetMT2.hh"
00013 
00014 namespace Rivet {
00015 
00016 
00017   class ATLAS_2011_S9225137 : public Analysis {
00018   public:
00019 
00020     /// @name Constructors etc.
00021     //@{
00022 
00023     /// Constructor
00024     ATLAS_2011_S9225137()
00025       : Analysis("ATLAS_2011_S9225137")
00026     {    }
00027 
00028     //@}
00029 
00030 
00031   public:
00032 
00033     /// @name Analysis methods
00034     //@{
00035 
00036     /// Book histograms and initialise projections before the run
00037     void init() {
00038 
00039       // veto region electrons
00040       std::vector<std::pair<double, double> > eta_v_e;
00041       eta_v_e.push_back(make_pair(-1.52,-1.37));
00042       eta_v_e.push_back(make_pair( 1.37, 1.52));
00043       IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
00044       veto_elecs.acceptIdPair(ELECTRON);
00045       addProjection(veto_elecs, "veto_elecs");
00046 
00047       // projection to find the electrons
00048       std::vector<std::pair<double, double> > eta_e;
00049       eta_e.push_back(make_pair(-2.47,2.47));
00050       IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00051       elecs.acceptIdPair(ELECTRON);
00052       addProjection(elecs, "elecs");
00053 
00054       // projection to find the muons
00055       std::vector<std::pair<double, double> > eta_m;
00056       eta_m.push_back(make_pair(-2.4,2.4));
00057       IdentifiedFinalState muons(eta_m, 10.0*GeV);
00058       muons.acceptIdPair(MUON);
00059       addProjection(muons, "muons");
00060 
00061       // for pTmiss
00062       addProjection(VisibleFinalState(-4.9,4.9),"vfs");
00063 
00064       VetoedFinalState vfs;
00065       vfs.addVetoPairId(MUON);
00066 
00067       /// Jet finder
00068       addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
00069             "AntiKtJets04");
00070 
00071       // all tracks (to do deltaR with leptons)
00072       addProjection(ChargedFinalState(-3.0,3.0),"cfs");
00073 
00074       /// Book histograms
00075       _etmissHTA = bookHistogram1D("etmissHTA", 64, 0., 16.);
00076       _etmissHTB = bookHistogram1D("etmissHTB", 64, 0., 16.);
00077 
00078       _njet55A = bookHistogram1D("njet55A", 14, 0.5, 14.5);
00079       _njet55B = bookHistogram1D("njet55B", 14, 0.5, 14.5);
00080       _njet80A = bookHistogram1D("njet80A", 14, 0.5, 14.5);
00081       _njet80B = bookHistogram1D("njet80B", 14, 0.5, 14.5);
00082 
00083       _count_7j55 = bookHistogram1D("count_7j55", 1, 0., 1.);
00084       _count_8j55 = bookHistogram1D("count_8j55", 1, 0., 1.);
00085       _count_6j80 = bookHistogram1D("count_6j80", 1, 0., 1.);
00086       _count_7j80 = bookHistogram1D("count_7j80", 1, 0., 1.);
00087 
00088     }
00089 
00090 
00091     /// Perform the per-event analysis
00092     void analyze(const Event& event) {
00093       const double weight = event.weight();
00094 
00095       // apply electron veto region
00096       ParticleVector veto_e
00097     = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
00098       if ( ! veto_e.empty() ) {
00099     MSG_DEBUG("electrons in veto region");
00100     vetoEvent;
00101       }
00102 
00103       // get the jet candidates
00104       Jets cand_jets;
00105       foreach (const Jet& jet,
00106            applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
00107         if ( fabs( jet.momentum().eta() ) < 4.9 ) {
00108           cand_jets.push_back(jet);
00109         }
00110       }
00111 
00112       // candidate muons
00113       ParticleVector cand_mu;
00114       ParticleVector chg_tracks = 
00115     applyProjection<ChargedFinalState>(event, "cfs").particles();
00116       foreach ( const Particle & mu,
00117         applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) {
00118     double pTinCone = -mu.momentum().pT();
00119     foreach ( const Particle & track, chg_tracks ) {
00120       if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
00121         pTinCone += track.momentum().pT();
00122     }
00123     if ( pTinCone < 1.8*GeV )
00124       cand_mu.push_back(mu);
00125       }
00126 
00127       // candidate electrons
00128 
00129       ParticleVector cand_e  = 
00130     applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00131 
00132       // resolve jet/lepton ambiguity 
00133       Jets cand_jets_2;
00134       foreach ( const Jet& jet, cand_jets ) {
00135     // candidates above eta=2.8 are jets
00136     if ( fabs( jet.momentum().eta() ) >= 2.8 )
00137       cand_jets_2.push_back( jet );
00138     // otherwise more the R=0.2 from an electrons
00139     else {
00140       bool away_from_e = true;
00141       foreach ( const Particle & e, cand_e ) {
00142         if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00143           away_from_e = false;
00144           break;
00145         }
00146       }
00147       if ( away_from_e )
00148         cand_jets_2.push_back( jet );
00149     }
00150       }
00151 
00152       // only keep electrons more than R=0.4 from jets
00153       ParticleVector recon_e;
00154       foreach ( const Particle & e, cand_e ) {
00155     bool away = true;
00156     foreach ( const Jet& jet, cand_jets_2 ) {
00157       if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
00158         away = false;
00159         break;
00160       }
00161     }
00162     if ( away )
00163       recon_e.push_back( e );
00164       }
00165 
00166       // only keep muons more than R=0.4 from jets
00167       ParticleVector recon_mu;
00168       foreach ( const Particle & mu, cand_mu ) {
00169     bool away = true;
00170     foreach ( const Jet& jet, cand_jets_2 ) {
00171       if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
00172         away = false;
00173         break;
00174       }
00175     }
00176     if ( away )
00177       recon_mu.push_back( mu );
00178       }
00179 
00180       // pTmiss
00181       ParticleVector vfs_particles = 
00182     applyProjection<VisibleFinalState>(event, "vfs").particles();
00183       FourMomentum pTmiss;
00184       foreach ( const Particle & p, vfs_particles ) {
00185     pTmiss -= p.momentum();
00186       }
00187       double eTmiss = pTmiss.pT();
00188 
00189       // final jet filter
00190       Jets recon_jets;
00191       foreach ( const Jet& jet, cand_jets_2 ) {
00192     if ( fabs( jet.momentum().eta() ) <= 2.8 )
00193       recon_jets.push_back( jet );
00194       }
00195 
00196       // now only use recon_jets, recon_mu, recon_e
00197 
00198       // reject events with electrons and muons
00199       if ( ! ( recon_mu.empty() && recon_e.empty() ) ) {
00200     MSG_DEBUG("Charged leptons left after selection");
00201     vetoEvent;
00202       }
00203 
00204       // calculate H_T
00205       double HT=0;
00206       foreach ( const Jet& jet, recon_jets ) {
00207     if ( jet.momentum().pT() > 40 * GeV )
00208       HT += jet.momentum().pT() ;
00209       }
00210 
00211       // number of jets and deltaR
00212       bool pass55DeltaR=true;
00213       unsigned int njet55=0;
00214       bool pass80DeltaR=true;
00215       unsigned int njet80=0;
00216       for (unsigned int ix=0;ix<recon_jets.size();++ix) {
00217     if(recon_jets[ix].momentum().pT()>80.*GeV) ++njet80;
00218     if(recon_jets[ix].momentum().pT()>55.*GeV) ++njet55;
00219 
00220     for (unsigned int iy=ix+1;iy<recon_jets.size();++iy) {
00221       if(recon_jets[ix].momentum().pT()>55.*GeV &&
00222          recon_jets[iy].momentum().pT()>55.*GeV &&
00223          deltaR(recon_jets[ix],recon_jets[ix]) <0.6 ) 
00224         pass55DeltaR = false;
00225       if(recon_jets[ix].momentum().pT()>80.*GeV &&
00226          recon_jets[iy].momentum().pT()>80.*GeV &&
00227          deltaR(recon_jets[ix],recon_jets[ix]) <0.6 ) 
00228         pass80DeltaR = false;
00229     }
00230       }
00231 
00232       // require at least four jets with et > 55
00233       if(njet55<=3) vetoEvent;
00234 
00235       // plots of etmiss/ht
00236       double etht = eTmiss/sqrt(HT);
00237       if(njet55==6) _etmissHTA->fill(etht,weight);
00238       if(njet80==5) _etmissHTB->fill(etht,weight);
00239 
00240       if(etht>1.5&&etht<2. ) {
00241     if(njet55>3) _njet55A->fill(njet55,weight);
00242     if(njet80>3) _njet80A->fill(njet80,weight);
00243       }
00244       if(etht>2. &&etht<3. ) {
00245     if(njet55>3) _njet55B->fill(njet55,weight);
00246     if(njet80>3) _njet80B->fill(njet80,weight);
00247       }
00248 
00249       // apply E_T/sqrt(H_T) cut
00250       if(etht<=3.5*GeV) {
00251     MSG_DEBUG("Fails ET/sqrt(HT) cut ");
00252     vetoEvent;
00253       }
00254 
00255       // check passes at least one delta5/ njet number cut
00256       if(!(pass55DeltaR && njet55 >= 7) &&
00257      !(pass80DeltaR && njet80 >= 6) ) {
00258     MSG_DEBUG("Fails DeltaR cut or jet number cuts");
00259     vetoEvent;
00260       }
00261 
00262       // 7j55
00263       if(njet55>=7&&pass55DeltaR)
00264     _count_7j55->fill( 0.5, weight) ;
00265       // 8j55
00266       if(njet55>=8&&pass55DeltaR)
00267     _count_8j55->fill( 0.5, weight) ;
00268       // 6j80
00269       if(njet80>=6&&pass80DeltaR)
00270     _count_6j80->fill( 0.5, weight) ;
00271       // 7j80
00272       if(njet80>=7&&pass80DeltaR)
00273     _count_7j80->fill( 0.5, weight) ;
00274 
00275     }
00276 
00277     //@}
00278 
00279     void finalize() {}
00280 
00281   private:
00282 
00283     /// @name Histograms
00284     //@{
00285     AIDA::IHistogram1D* _etmissHTA;
00286     AIDA::IHistogram1D* _etmissHTB;
00287     AIDA::IHistogram1D* _njet55A;
00288     AIDA::IHistogram1D* _njet55B;
00289     AIDA::IHistogram1D* _njet80A;
00290     AIDA::IHistogram1D* _njet80B;
00291     AIDA::IHistogram1D* _count_7j55;
00292     AIDA::IHistogram1D* _count_8j55;
00293     AIDA::IHistogram1D* _count_6j80;
00294     AIDA::IHistogram1D* _count_7j80;
00295     //@}
00296 
00297   };
00298 
00299   // The hook for the plugin system
00300   DECLARE_RIVET_PLUGIN(ATLAS_2011_S9225137);
00301 
00302 }