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