rivet is hosted by Hepforge, IPPP Durham
ATLAS_2012_CONF_2012_109.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/FastJets.hh"
00009 #include "Rivet/Projections/VetoedFinalState.hh"
00010 
00011 namespace Rivet {
00012 
00013 
00014   /// @author Peter Richardson
00015   class ATLAS_2012_CONF_2012_109 : public Analysis {
00016   public:
00017 
00018     /// Constructor
00019     ATLAS_2012_CONF_2012_109()
00020       : Analysis("ATLAS_2012_CONF_2012_109")
00021     {    }
00022 
00023 
00024     /// @name Analysis methods
00025     //@{
00026 
00027     /// Book histograms and initialise projections before the run
00028     void init() {
00029 
00030       // Projection to find the electrons
00031       IdentifiedFinalState elecs(Cuts::abseta < 2.47 && Cuts::pT > 20*GeV);
00032        elecs.acceptIdPair(PID::ELECTRON);
00033       addProjection(elecs, "elecs");
00034 
00035       // Projection to find the muons
00036       IdentifiedFinalState muons(Cuts::abseta < 2.4 && Cuts::pT > 10*GeV);
00037       muons.acceptIdPair(PID::MUON);
00038       addProjection(muons, "muons");
00039 
00040       // Jet finder
00041       VetoedFinalState vfs;
00042       vfs.addVetoPairId(PID::MUON);
00043       addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
00044 
00045       // All tracks (to do deltaR with leptons)
00046       addProjection(ChargedFinalState(Cuts::abseta < 3.0), "cfs");
00047 
00048       // Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9)
00049       addProjection(VisibleFinalState(Cuts::abseta < 4.5), "vfs");
00050 
00051       // Book histograms
00052       _count_A_tight   = bookHisto1D("count_A_tight"   , 1, 0., 1.);
00053       _count_A_medium  = bookHisto1D("count_A_medium"  , 1, 0., 1.);
00054       _count_A_loose   = bookHisto1D("count_A_loose"   , 1, 0., 1.);
00055       _count_B_tight   = bookHisto1D("count_B_tight"   , 1, 0., 1.);
00056       _count_B_medium  = bookHisto1D("count_B_medium"  , 1, 0., 1.);
00057       _count_C_tight   = bookHisto1D("count_C_tight"   , 1, 0., 1.);
00058       _count_C_medium  = bookHisto1D("count_C_medium"  , 1, 0., 1.);
00059       _count_C_loose   = bookHisto1D("count_C_loose"   , 1, 0., 1.);
00060       _count_D_tight   = bookHisto1D("count_D_tight"   , 1, 0., 1.);
00061       _count_E_tight   = bookHisto1D("count_E_tight"   , 1, 0., 1.);
00062       _count_E_medium  = bookHisto1D("count_E_medium"  , 1, 0., 1.);
00063       _count_E_loose   = bookHisto1D("count_E_loose"   , 1, 0., 1.);
00064 
00065       _hist_meff_A_medium = bookHisto1D("meff_A_medium" , 40, 0., 4000.);
00066       _hist_meff_A_tight  = bookHisto1D("meff_A_tight"  , 40, 0., 4000.);
00067       _hist_meff_B_medium = bookHisto1D("meff_B_medium" , 40, 0., 4000.);
00068       _hist_meff_B_tight  = bookHisto1D("meff_B_tight"  , 40, 0., 4000.);
00069       _hist_meff_C_medium = bookHisto1D("meff_C_medium" , 40, 0., 4000.);
00070       _hist_meff_C_tight  = bookHisto1D("meff_C_tight"  , 40, 0., 4000.);
00071       _hist_meff_D        = bookHisto1D("meff_D"        , 40, 0., 4000.);
00072       _hist_meff_E_loose  = bookHisto1D("meff_E_loose"  , 40, 0., 4000.);
00073       _hist_meff_E_medium = bookHisto1D("meff_E_medium" , 40, 0., 4000.);
00074       _hist_meff_E_tight  = bookHisto1D("meff_E_tight"  , 40, 0., 4000.);
00075 
00076     }
00077 
00078 
00079     /// Perform the per-event analysis
00080     void analyze(const Event& event) {
00081       const double weight = event.weight();
00082 
00083       Jets cand_jets;
00084       const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
00085       foreach (const Jet& jet, jets) {
00086         if ( fabs( jet.eta() ) < 4.9 ) {
00087           cand_jets.push_back(jet);
00088         }
00089       }
00090 
00091       const Particles cand_e  = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00092 
00093       // Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable
00094       Particles cand_mu;
00095       const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles();
00096       const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
00097       foreach (const Particle& mu, muons) {
00098         double pTinCone = -mu.pT();
00099         foreach (const Particle& track, chg_tracks) {
00100           if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) {
00101             pTinCone += track.pT();
00102           }
00103         }
00104         if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu);
00105       }
00106 
00107       // Resolve jet-lepton overlap for jets with |eta| < 2.8
00108       Jets recon_jets;
00109       foreach ( const Jet& jet, cand_jets ) {
00110         if ( fabs( jet.eta() ) >= 2.8 ) continue;
00111         bool away_from_e = true;
00112         foreach ( const Particle & e, cand_e ) {
00113           if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00114             away_from_e = false;
00115             break;
00116           }
00117         }
00118         if ( away_from_e ) recon_jets.push_back( jet );
00119       }
00120 
00121       Particles recon_e, recon_mu;
00122 
00123       foreach ( const Particle & e, cand_e ) {
00124         bool away = true;
00125         foreach ( const Jet& jet, recon_jets ) {
00126           if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
00127             away = false;
00128             break;
00129           }
00130         }
00131         if ( away ) recon_e.push_back( e );
00132       }
00133 
00134       foreach ( const Particle & mu, cand_mu ) {
00135         bool away = true;
00136         foreach ( const Jet& jet, recon_jets ) {
00137           if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
00138             away = false;
00139             break;
00140           }
00141         }
00142         if ( away ) recon_mu.push_back( mu );
00143       }
00144 
00145       // pTmiss
00146       // Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5
00147       // i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5
00148       Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles();
00149       FourMomentum pTmiss;
00150       foreach ( const Particle & p, vfs_particles ) {
00151         pTmiss -= p.momentum();
00152       }
00153       foreach ( const Jet& jet, cand_jets ) {
00154         if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum();
00155       }
00156       double eTmiss = pTmiss.pT();
00157 
00158       // no electron pT> 20 or muons pT>10
00159       if ( !recon_mu.empty() || !recon_e.empty() ) {
00160         MSG_DEBUG("Charged leptons left after selection");
00161         vetoEvent;
00162       }
00163 
00164       if ( eTmiss <= 160 * GeV ) {
00165         MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130");
00166         vetoEvent;
00167       }
00168 
00169       // check the hardest two jets
00170       if ( recon_jets.size()<2 ||
00171            recon_jets[0].pT() <= 130.0 * GeV ||
00172            recon_jets[0].pT() <=  60.0 * GeV ) {
00173         MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00174         vetoEvent;
00175       }
00176 
00177       // check the charged and EM fractions of the hard jets to avoid photons
00178       for (unsigned int ix = 0; ix < 2; ++ix) {
00179         // jets over 100 GeV
00180         if (recon_jets[ix].pT() < 100*GeV ||
00181             recon_jets[ix].eta() > 2.) continue; ///< @todo Should be |eta|?
00182         double fch(0.), fem(0.), eTotal(0.);
00183         foreach(const Particle & part, recon_jets[ix].particles()) {
00184           long id = part.abspid();
00185           if(PID::threeCharge(id)!=0)
00186             fch += part.E();
00187           if (id == PID::PHOTON || id == PID::ELECTRON || id == PID::PI0)
00188             fem += part.E();
00189         }
00190         fch /= eTotal;
00191         fem /= eTotal;
00192         // remove events with hard photon
00193         if (fch < 0.02 || (fch < 0.05 && fem > 0.09)) vetoEvent;
00194       }
00195 
00196       // ==================== observables ====================
00197 
00198       int Njets = 0;
00199       double min_dPhi_All = 999.999; ///< @todo Use std::numeric_limits!
00200       double min_dPhi_2   = 999.999; ///< @todo Use std::numeric_limits!
00201       double min_dPhi_3   = 999.999; ///< @todo Use std::numeric_limits!
00202       double pTmiss_phi = pTmiss.phi();
00203 
00204       foreach ( const Jet& jet, recon_jets ) {
00205         if ( jet.pT() < 40*GeV ) continue;
00206         double dPhi = deltaPhi( pTmiss_phi, jet.phi());
00207         if ( Njets < 2 ) min_dPhi_2 = min( min_dPhi_2, dPhi );
00208         if ( Njets < 3 ) min_dPhi_3 = min( min_dPhi_3, dPhi );
00209         min_dPhi_All = min( min_dPhi_All, dPhi );
00210         ++Njets;
00211       }
00212 
00213       // inclusive meff
00214       double m_eff_inc =  eTmiss;
00215       foreach ( const Jet& jet, recon_jets ) {
00216         double perp =  jet.pT();
00217         if(perp>40.) m_eff_inc += perp;
00218       }
00219 
00220       // region A
00221       double m_eff_Nj = eTmiss + recon_jets[0].pT() + recon_jets[1].pT();
00222       if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) {
00223         _hist_meff_A_tight ->fill(m_eff_inc,weight);
00224         if(eTmiss/m_eff_Nj > 0.4)
00225           _hist_meff_A_medium->fill(m_eff_inc,weight);
00226         if(m_eff_inc>1900.)
00227           _count_A_tight ->fill(0.5,weight);
00228         if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4)
00229           _count_A_medium->fill(0.5,weight);
00230         if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4)
00231           _count_A_loose ->fill(0.5,weight);
00232       }
00233 
00234       // for rest of regions 3 jets pT> 60 needed
00235       if(recon_jets.size()<3 || recon_jets[2].perp()<60.)
00236         vetoEvent;
00237 
00238       // region B
00239       m_eff_Nj +=  recon_jets[2].perp();
00240       if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) {
00241         _hist_meff_B_tight->fill(m_eff_inc,weight);
00242         if(eTmiss/m_eff_Nj > 0.3)
00243           _hist_meff_B_medium->fill(m_eff_inc,weight);
00244         if(m_eff_inc>1900.)
00245           _count_B_tight ->fill(0.5,weight);
00246         if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3)
00247           _count_B_medium->fill(0.5,weight);
00248       }
00249 
00250       // for rest of regions 4 jets pT> 60 needed
00251       if(recon_jets.size()<4 || recon_jets[3].perp()<60.)
00252         vetoEvent;
00253 
00254       // region C
00255       m_eff_Nj +=  recon_jets[3].perp();
00256       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) {
00257         _hist_meff_C_tight->fill(m_eff_inc,weight);
00258         if( eTmiss/m_eff_Nj > 0.3 )
00259           _hist_meff_C_medium->fill(m_eff_inc,weight);
00260         if(m_eff_inc>1900.)
00261           _count_C_tight ->fill(0.5,weight);
00262         if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3)
00263           _count_C_medium->fill(0.5,weight);
00264         if(m_eff_inc>1000. && eTmiss/m_eff_Nj > 0.3)
00265           _count_C_loose ->fill(0.5,weight);
00266       }
00267 
00268       // for rest of regions 5 jets pT> 40 needed
00269       if(recon_jets.size()<5 || recon_jets[4].perp()<40.)
00270         vetoEvent;
00271 
00272       // region D
00273       m_eff_Nj +=  recon_jets[4].perp();
00274       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
00275         _hist_meff_D->fill(m_eff_inc,weight);
00276         if(m_eff_inc>1700.) _count_D_tight ->fill(0.5,weight);
00277       }
00278 
00279       // for rest of regions 6 jets pT> 40 needed
00280       if(recon_jets.size()<6 || recon_jets[5].perp()<40.)
00281         vetoEvent;
00282 
00283       // region E
00284       m_eff_Nj +=  recon_jets[5].perp();
00285       if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) {
00286         _hist_meff_E_tight->fill(m_eff_inc,weight);
00287         if( eTmiss/m_eff_Nj > 0.25 )
00288           _hist_meff_E_medium->fill(m_eff_inc,weight);
00289         if( eTmiss/m_eff_Nj > 0.3 )
00290           _hist_meff_E_loose->fill(m_eff_inc,weight);
00291         if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight);
00292         if(m_eff_inc>1300.&& eTmiss/m_eff_Nj > 0.25 )
00293           _count_E_medium->fill(0.5,weight);
00294         if(m_eff_inc>1000.&& eTmiss/m_eff_Nj > 0.3  )
00295           _count_E_loose ->fill(0.5,weight);
00296       }
00297     }
00298 
00299 
00300     void finalize() {
00301 
00302       double norm = crossSection()/femtobarn*5.8/sumOfWeights();
00303       // these are number of events at 5.8fb^-1 per 100 GeV
00304       scale( _hist_meff_A_medium , 100. * norm );
00305       scale( _hist_meff_A_tight  , 100. * norm );
00306       scale( _hist_meff_B_medium , 100. * norm );
00307       scale( _hist_meff_B_tight  , 100. * norm );
00308       scale( _hist_meff_C_medium , 100. * norm );
00309       scale( _hist_meff_C_tight  , 100. * norm );
00310       scale( _hist_meff_D    , 100. * norm );
00311       scale( _hist_meff_E_loose  , 100. * norm );
00312       scale( _hist_meff_E_medium , 100. * norm );
00313       scale( _hist_meff_E_tight  , 100. * norm );
00314       // these are number of events at 5.8fb^-1
00315       scale(_count_A_tight  ,norm);
00316       scale(_count_A_medium ,norm);
00317       scale(_count_A_loose  ,norm);
00318       scale(_count_B_tight  ,norm);
00319       scale(_count_B_medium ,norm);
00320       scale(_count_C_tight  ,norm);
00321       scale(_count_C_medium ,norm);
00322       scale(_count_C_loose  ,norm);
00323       scale(_count_D_tight  ,norm);
00324       scale(_count_E_tight  ,norm);
00325       scale(_count_E_medium ,norm);
00326       scale(_count_E_loose  ,norm);
00327     }
00328 
00329     //@}
00330 
00331   private:
00332 
00333     Histo1DPtr _count_A_tight;
00334     Histo1DPtr _count_A_medium;
00335     Histo1DPtr _count_A_loose;
00336     Histo1DPtr _count_B_tight;
00337     Histo1DPtr _count_B_medium;
00338     Histo1DPtr _count_C_tight;
00339     Histo1DPtr _count_C_medium;
00340     Histo1DPtr _count_C_loose;
00341     Histo1DPtr _count_D_tight;
00342     Histo1DPtr _count_E_tight;
00343     Histo1DPtr _count_E_medium;
00344     Histo1DPtr _count_E_loose;
00345 
00346     Histo1DPtr _hist_meff_A_medium;
00347     Histo1DPtr _hist_meff_A_tight;
00348     Histo1DPtr _hist_meff_B_medium;
00349     Histo1DPtr _hist_meff_B_tight;
00350     Histo1DPtr _hist_meff_C_medium;
00351     Histo1DPtr _hist_meff_C_tight;
00352     Histo1DPtr _hist_meff_D;
00353     Histo1DPtr _hist_meff_E_loose;
00354     Histo1DPtr _hist_meff_E_medium;
00355     Histo1DPtr _hist_meff_E_tight;
00356 
00357   };
00358 
00359 
00360   // This global object acts as a hook for the plugin system
00361   DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_109);
00362 
00363 }