ATLAS_2013_I1217867.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/VetoedFinalState.hh" 00005 #include "Rivet/Projections/IdentifiedFinalState.hh" 00006 #include "Rivet/Projections/DressedLeptons.hh" 00007 #include "Rivet/Projections/FastJets.hh" 00008 00009 namespace Rivet { 00010 00011 using namespace Cuts; 00012 00013 class ATLAS_2013_I1217867 : public Analysis { 00014 public: 00015 00016 /// @name Constructors etc. 00017 //@{ 00018 00019 /// Constructor 00020 ATLAS_2013_I1217867() 00021 : Analysis("ATLAS_2013_I1217867") 00022 { 00023 m_njet=4; 00024 _h_dI.resize(2, std::vector<Histo1DPtr>(m_njet)); 00025 _h_dI_ratio.resize(2, std::vector<Histo1DPtr>(m_njet-1)); 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 // Initialise projections 00039 00040 FinalState fs(-5.0, 5.0, 0.0*GeV); 00041 00042 IdentifiedFinalState bareElectrons(fs); 00043 bareElectrons.acceptIdPair(PID::ELECTRON); 00044 00045 Cut cuts = ( etaIn(-2.47, -1.52) 00046 | etaIn(-1.37, 1.37) 00047 | etaIn( 1.52, 2.47) ) & (pT >= 20.0*GeV); 00048 00049 DressedLeptons electronClusters(fs, bareElectrons, 0.1, true, cuts); 00050 addProjection(electronClusters, "electronClusters"); 00051 00052 IdentifiedFinalState bareMuons(fs); 00053 bareMuons.acceptIdPair(PID::MUON); 00054 Cut mucuts = etaIn(-2.4,2.4) & (pT >= 20.0*GeV); 00055 DressedLeptons muonClusters(fs, bareMuons, 0.1, true, mucuts); 00056 addProjection(muonClusters, "muonClusters"); 00057 00058 IdentifiedFinalState neutrinos(-MAXDOUBLE, MAXDOUBLE, 25.0*GeV); 00059 neutrinos.acceptNeutrinos(); 00060 addProjection(neutrinos, "neutrinos"); 00061 00062 VetoedFinalState jetFS(fs); 00063 jetFS.addVetoOnThisFinalState(electronClusters); 00064 jetFS.addVetoOnThisFinalState(muonClusters); 00065 jetFS.addVetoOnThisFinalState(neutrinos); 00066 FastJets jetpro(jetFS, FastJets::KT, 0.6); 00067 jetpro.useInvisibles(true); 00068 addProjection(jetpro, "jets"); 00069 00070 // Book histograms 00071 for (size_t flav=0; flav < 2; ++flav) { 00072 for (size_t i=0; i < m_njet; ++i) _h_dI[flav][i] = bookHisto1D(i+1, 1, flav+1); 00073 for (size_t i=0; i < m_njet-1; ++i) _h_dI_ratio[flav][i] = bookHisto1D(4+i+1, 1, flav+1); 00074 } 00075 } 00076 00077 00078 /// Perform the per-event analysis 00079 void analyze(const Event& e) { 00080 const double weight = e.weight(); 00081 00082 const DressedLeptons& electronClusters = applyProjection<DressedLeptons>(e, "electronClusters"); 00083 const DressedLeptons& muonClusters = applyProjection<DressedLeptons>(e, "muonClusters"); 00084 int ne = electronClusters.clusteredLeptons().size(); 00085 int nmu = muonClusters.clusteredLeptons().size(); 00086 00087 FourMomentum lepton; 00088 size_t flav = 2; 00089 if (ne==1) { 00090 lepton=electronClusters.clusteredLeptons()[0].momentum(); 00091 flav = 0; 00092 if (nmu > 0) vetoEvent; 00093 } 00094 else if (nmu == 1) { 00095 lepton=muonClusters.clusteredLeptons()[0].momentum(); 00096 flav = 1; 00097 if (ne > 0) vetoEvent; 00098 } 00099 else { 00100 vetoEvent; 00101 } 00102 00103 const Particles& neutrinos = applyProjection<FinalState>(e, "neutrinos").particlesByPt(); 00104 if (neutrinos.size() < 1) vetoEvent; 00105 FourMomentum neutrino = neutrinos[0].momentum(); 00106 00107 double mtW=sqrt(2.0*lepton.pT()*neutrino.pT()*(1-cos(lepton.phi()-neutrino.phi()))); 00108 if (mtW<40.0*GeV) vetoEvent; 00109 00110 const fastjet::ClusterSequence* seq = applyProjection<FastJets>(e, "jets").clusterSeq(); 00111 if (seq != NULL) { 00112 for (size_t i = 0; i < min(m_njet,(size_t)seq->n_particles()); ++i) { 00113 double d_ij = sqrt(seq->exclusive_dmerge_max(i)); 00114 _h_dI[flav][i]->fill(d_ij, weight); 00115 00116 if (i<m_njet-1) { 00117 if (d_ij>20.0*GeV) { 00118 double d_ijplus1 = sqrt(seq->exclusive_dmerge_max(i+1)); 00119 _h_dI_ratio[flav][i]->fill(d_ijplus1/d_ij, weight); 00120 } 00121 } 00122 } 00123 } 00124 00125 } 00126 00127 00128 /// Normalise histograms etc., after the run 00129 void finalize() { 00130 00131 for (size_t flav = 0; flav < 2; ++flav) { 00132 for (size_t i = 0; i < m_njet; ++i) { 00133 normalize(_h_dI[flav][i], 1.0, false); 00134 if (i < m_njet-1) normalize(_h_dI_ratio[flav][i], 1.0, false); 00135 } 00136 } 00137 } 00138 00139 //@} 00140 00141 00142 private: 00143 00144 /// @name Histograms 00145 //@{ 00146 std::vector<std::vector<Histo1DPtr> > _h_dI; 00147 std::vector<std::vector<Histo1DPtr> > _h_dI_ratio; 00148 00149 //@} 00150 00151 size_t m_njet; 00152 }; 00153 00154 00155 00156 // The hook for the plugin system 00157 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217867); 00158 00159 00160 } Generated on Tue Sep 30 2014 19:45:42 for The Rivet MC analysis system by ![]() |