rivet is hosted by Hepforge, IPPP Durham
ATLAS_2013_I1190187.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/IdentifiedFinalState.hh"
00005 #include "Rivet/Projections/VetoedFinalState.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 #include "Rivet/Projections/DressedLeptons.hh"
00008 #include "Rivet/Projections/MissingMomentum.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// ATLAS Wee Wemu Wmumu analysis at Z TeV
00014   class ATLAS_2013_I1190187 : public Analysis {
00015   public:
00016 
00017     /// Default constructor
00018     ATLAS_2013_I1190187()
00019       : Analysis("ATLAS_2013_I1190187")
00020     {    }
00021 
00022 
00023     void init() {
00024       FinalState fs;
00025 
00026       vector<pair<double, double> > etaRanges_EL;
00027       etaRanges_EL.push_back(make_pair(-1.37, 1.37));
00028       etaRanges_EL.push_back(make_pair(-2.47, -1.52));
00029       etaRanges_EL.push_back(make_pair(1.52, 2.47));
00030 
00031       vector<pair<double, double> > etaRanges_MU;
00032       etaRanges_MU.push_back(make_pair(-2.4, 2.4));
00033 
00034       MissingMomentum met(fs);
00035       addProjection(met, "MET");
00036 
00037       IdentifiedFinalState Photon(fs);
00038       Photon.acceptIdPair(PID::PHOTON);
00039 
00040       IdentifiedFinalState bare_EL(fs);
00041       bare_EL.acceptIdPair(PID::ELECTRON);
00042 
00043       IdentifiedFinalState bare_MU(fs);
00044       bare_MU.acceptIdPair(PID::MUON);
00045 
00046       IdentifiedFinalState neutrinoFS(fs);
00047       neutrinoFS.acceptNeutrinos();
00048       addProjection(neutrinoFS, "Neutrinos");
00049 
00050       ////////////////////////////////////////////////////////
00051       // DRESSED LEPTONS
00052       //    3.arg: 0.1      = dR(lep,phot)
00053       //    4.arg: true     = do clustering
00054       //    7.arg: false    = ignore photons from hadron or tau
00055       //
00056       //////////////////////////////////////////////////////////
00057       DressedLeptons electronFS(Photon, bare_EL, 0.1, true, etaRanges_EL, 20, false);
00058       addProjection(electronFS, "ELECTRON_FS");
00059 
00060       DressedLeptons muonFS(Photon, bare_MU, 0.1, true, etaRanges_MU, 20, false);
00061       addProjection(muonFS, "MUON_FS");
00062 
00063       VetoedFinalState jetinput;
00064       jetinput.addVetoOnThisFinalState(bare_MU);
00065       jetinput.addVetoOnThisFinalState(neutrinoFS);
00066 
00067       FastJets jetpro(jetinput, FastJets::ANTIKT, 0.4);
00068       addProjection(jetpro, "jet");
00069 
00070       // Book histograms
00071       _h_Wl1_pT_mumu = bookHisto1D(1, 1, 2);
00072       _h_Wl1_pT_ee = bookHisto1D(1, 1, 1);
00073       _h_Wl1_pT_emu = bookHisto1D(1, 1, 3);
00074       _h_Wl1_pT_inclusive = bookHisto1D(4, 1, 1);
00075     }
00076 
00077 
00078     /// Do the analysis
00079     void analyze(const Event& e) {
00080 
00081       const  vector<DressedLepton>& muonFS = applyProjection<DressedLeptons>(e, "MUON_FS").clusteredLeptons();
00082       const  vector<DressedLepton>& electronFS = applyProjection<DressedLeptons>(e, "ELECTRON_FS").clusteredLeptons();
00083       const MissingMomentum& met = applyProjection<MissingMomentum>(e, "MET");
00084 
00085       vector<DressedLepton> dressed_lepton, isolated_lepton, fiducial_lepton;
00086       dressed_lepton.insert(dressed_lepton.end(), muonFS.begin(), muonFS.end());
00087       dressed_lepton.insert(dressed_lepton.end(), electronFS.begin(), electronFS.end());
00088 
00089       ////////////////////////////////////////////////////////////////////////////
00090       // OVERLAP REMOVAL
00091       //    -electrons with dR(e,mu)<0.1 are removed
00092       //    -lower pT electrons with dR(e,e)<0.1 are removed
00093       //
00094       ////////////////////////////////////////////////////////////////////////////
00095       foreach (DressedLepton& l1, dressed_lepton) {
00096         bool l_isolated = true;
00097         foreach (DressedLepton& l2, dressed_lepton) {
00098           if (l1 != l2 && l2.constituentLepton().abspid() == PID::ELECTRON) {
00099             double overlapControl_ll= deltaR(l1.constituentLepton(),l2.constituentLepton());
00100             if (overlapControl_ll < 0.1) {
00101               l_isolated = false;
00102               // e/e overlap removal
00103               if (l1.constituentLepton().abspid() == PID::ELECTRON) {
00104                 if (l1.constituentLepton().pT()>l2.constituentLepton().pT()) {
00105                   isolated_lepton.push_back(l1);//keep e with highest pT
00106                 } else {
00107                   isolated_lepton.push_back(l2);//keep e with highest pT
00108                 }
00109               }
00110               // e/mu overlap removal
00111               if (l1.constituentLepton().abspid() == PID::MUON) isolated_lepton.push_back(l1); //keep mu
00112             }
00113           }
00114         }
00115         if (l_isolated) isolated_lepton.push_back(l1);
00116       }
00117 
00118 
00119       ///////////////////////////////////////////////////////////////////////////////////////////////////////////
00120       // PRESELECTION:
00121       // "isolated_lepton:"
00122       //    * electron: pt>20 GeV, |eta|<1.37, 1.52<|eta|<2.47, dR(electron,muon)>0.1
00123       //    * muon:     pt>20 GeV, |eta|<2.4
00124       //        *   dR(l,l)>0.1
00125       //
00126       // "fiducial_lepton"= isolated_lepton with
00127       //                * 2 leptons (e or mu)
00128       //              * leading lepton pt (pT_l1) >25 GeV
00129       //            * opposite charged leptons
00130       //
00131       ///////////////////////////////////////////////////////////////////////////////////////////////////////////
00132       if (isolated_lepton.size() != 2) vetoEvent;
00133       sort(isolated_lepton.begin(), isolated_lepton.end(), cmpMomByPt);
00134       if (isolated_lepton[0].pT() > 25*GeV && PID::threeCharge(isolated_lepton[0]) != PID::threeCharge(isolated_lepton[1])) {
00135         fiducial_lepton.insert(fiducial_lepton.end(), isolated_lepton.begin(), isolated_lepton.end());
00136       }
00137       if (fiducial_lepton.size() == 0) vetoEvent;
00138       double pT_l1 = fiducial_lepton[0].pT();
00139       double M_l1l2 = (fiducial_lepton[0].momentum() + fiducial_lepton[1].momentum()).mass();
00140       double pT_l1l2 = (fiducial_lepton[0].momentum() + fiducial_lepton[1].momentum()).pT();
00141 
00142 
00143       /////////////////////////////////////////////////////////////////////////
00144       // JETS
00145       //    -"alljets": found by "jetpro" projection && pT()>25 GeV && |y|<4.5
00146       //    -"vetojets": "alljets"  && dR(electron,jet)>0.3
00147       //
00148       /////////////////////////////////////////////////////////////////////////
00149       Jets alljets, vetojets;
00150       foreach (const Jet& j, applyProjection<FastJets>(e, "jet").jetsByPt(25)) {
00151         if (j.absrap() > 4.5 ) continue;
00152         alljets.push_back(j);
00153         bool deltaRcontrol = true;
00154         foreach (DressedLepton& fl,fiducial_lepton) {
00155           if (fl.constituentLepton().abspid() == PID::ELECTRON) { //electrons
00156             double deltaRjets = deltaR(fl.constituentLepton().momentum(), j.momentum(), RAPIDITY);
00157             if (deltaRjets <= 0.3) deltaRcontrol = false; //false if at least one electron is in the overlap region
00158           }
00159         }
00160         if (deltaRcontrol) vetojets.push_back(j);
00161       }
00162 
00163 
00164       /////////////////////////////////////////////////////////////////////////////////////////////////
00165       // MISSING ETrel
00166       //    -"mismom": fourvector of invisible momentum found by "met" projection
00167       //    -"delta_phi": delta phi between mismom and the nearest "fiducial_lepton" or "vetojet"
00168       //    -"MET_rel": missing transverse energy defined as:
00169       //            *"mismom"   for "delta_phi" >= (0.5*pi)
00170       //            *"mismom.pT()*sin(delta_phi)"   for "delta_phi" < (0.5*pi)
00171       //
00172       /////////////////////////////////////////////////////////////////////////////////////////////////
00173       FourMomentum mismom;
00174       double MET_rel = 0, delta_phi = 0;
00175       mismom = -met.visibleMomentum();
00176       vector<double> vL_MET_angle, vJet_MET_angle;
00177       vL_MET_angle.push_back(fabs(deltaPhi(fiducial_lepton[0].momentum(), mismom)));
00178       vL_MET_angle.push_back(fabs(deltaPhi(fiducial_lepton[1].momentum(), mismom)));
00179       foreach (double& lM, vL_MET_angle) if (lM > M_PI) lM = 2*M_PI - lM;
00180 
00181       std::sort(vL_MET_angle.begin(), vL_MET_angle.end());
00182       if (vetojets.size() == 0) delta_phi = vL_MET_angle[0];
00183       if (vetojets.size() > 0) {
00184         foreach (Jet& vj, vetojets) {
00185           double jet_MET_angle = fabs(deltaPhi(vj.momentum(), mismom));
00186           if (jet_MET_angle > M_PI) jet_MET_angle = 2*M_PI - jet_MET_angle;
00187           vJet_MET_angle.push_back(jet_MET_angle);
00188         }
00189         std::sort(vJet_MET_angle.begin(), vJet_MET_angle.end());
00190         if (vL_MET_angle[0] <= vJet_MET_angle[0]) delta_phi = vL_MET_angle[0];
00191         if (vL_MET_angle[0] > vJet_MET_angle[0]) delta_phi = vJet_MET_angle[0];
00192       }
00193 
00194       if (delta_phi >= (0.5*M_PI)) delta_phi = 0.5*M_PI;
00195       MET_rel = mismom.pT()*sin(delta_phi);
00196 
00197 
00198       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00199       // CUTS
00200       //        -jetveto: event with at least one vetojet is vetoed
00201       //        -M_Z: Z mass M_Z=91.1876*GeV
00202       //
00203       //    * ee   channel: MET_rel > 45 GeV, M_l1l2 > 15 GeV, |M_l1l2-M_Z| > 15 GeV, jetveto, pT_l1l2 > 30 GeV
00204       //    * mumu channel: MET_rel > 45 GeV, M_l1l2 > 15 GeV, |M_l1l2-M_Z| > 15 GeV, jetveto, pT_l1l2 > 30 GeV
00205       //        * emu  channel: MET_rel > 25 GeV, M_l1l2 > 10 GeV, |M_l1l2-M_Z| > 0  GeV, jetveto, pT_l1l2 > 30 GeV
00206       //
00207       ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00208 
00209       // Get event weight for histo filling
00210       const double weight = e.weight();
00211 
00212       // ee channel
00213       if (fiducial_lepton[0].abspid() == PID::ELECTRON && fiducial_lepton[1].abspid() == PID::ELECTRON) {
00214         if (MET_rel <= 45*GeV) vetoEvent;
00215         if (M_l1l2 <= 15*GeV) vetoEvent;
00216         if (fabs(M_l1l2 - 91.1876*GeV) <= 15*GeV) vetoEvent;
00217         if (vetojets.size() != 0) vetoEvent;
00218         if (pT_l1l2 <= 30*GeV) vetoEvent;
00219         _h_Wl1_pT_ee->fill(sqrtS()*GeV, weight);
00220         _h_Wl1_pT_inclusive->fill(pT_l1, weight);
00221       }
00222 
00223       // mumu channel
00224       else if (fiducial_lepton[0].abspid() == PID::MUON && fiducial_lepton[1].abspid() == PID::MUON) {
00225         if (MET_rel <= 45*GeV) vetoEvent;
00226         if (M_l1l2 <= 15*GeV) vetoEvent;
00227         if (fabs(M_l1l2-91.1876*GeV) <= 15*GeV) vetoEvent;
00228         if (vetojets.size() != 0) vetoEvent;
00229         if (pT_l1l2 <= 30*GeV) vetoEvent;
00230         _h_Wl1_pT_mumu->fill(sqrtS()*GeV, weight);
00231         _h_Wl1_pT_inclusive->fill(pT_l1, weight);
00232       }
00233 
00234       // emu channel
00235       else if (fiducial_lepton[0].abspid() != fiducial_lepton[1].abspid()) {
00236         if (MET_rel <= 25*GeV) vetoEvent;
00237         if (M_l1l2 <= 10*GeV) vetoEvent;
00238         if (vetojets.size() != 0) vetoEvent;
00239         if (pT_l1l2 <= 30*GeV) vetoEvent;
00240         _h_Wl1_pT_emu->fill(sqrtS()*GeV, weight);
00241         _h_Wl1_pT_inclusive->fill(pT_l1, weight);
00242       }
00243     }
00244 
00245 
00246     /// Finalize
00247     void finalize() {
00248       const double norm = crossSection()/sumOfWeights()/femtobarn;
00249       scale(_h_Wl1_pT_ee, norm);
00250       scale(_h_Wl1_pT_mumu, norm);
00251       scale(_h_Wl1_pT_emu, norm);
00252       normalize(_h_Wl1_pT_inclusive, 1);
00253     }
00254 
00255 
00256   private:
00257 
00258     Histo1DPtr _h_Wl1_pT_ee, _h_Wl1_pT_mumu, _h_Wl1_pT_emu, _h_Wl1_pT_inclusive;
00259 
00260   };
00261 
00262 
00263   // The hook for the plugin system
00264   DECLARE_RIVET_PLUGIN(ATLAS_2013_I1190187);
00265 
00266 }