rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_SUSY

Validate generic SUSY events, including various lepton invariant mass
Experiment: ()
Status: VALIDATED
Authors:
  • Andy Buckley
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • SUSY events at any energy. $p_\perp$ cutoff at 10 GeV may be advised.

Analysis of generic SUSY events at the LHC, based on Atlas Herwig++ validation analysis contents. Plotted are $\eta$, $\phi$ and $p_\perp$ observables for charged tracks, photons, isolated photons, electrons, muons, and jets, as well as various dilepton mass `edge' plots for different event selection criteria.

Source code: MC_SUSY.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/LeadingParticlesFinalState.hh"

namespace Rivet {

  


  /// @brief MC validation analysis for SUSY events
  /// @author Andy Buckley
  class MC_SUSY : public Analysis {
  public:

    /// Constructor
    MC_SUSY()
      : Analysis("MC_SUSY")
    {    }


    /// @name Analysis methods
    //@{

    // Book histograms
    void init() {
      // Basic final state
      const FinalState fs(-4.0, 4.0, 10*GeV);

      // Tracks and jets
      declare(ChargedFinalState(fs), "Tracks");
      declare(FastJets(fs, FastJets::ANTIKT, 0.7), "Jets");

      IdentifiedFinalState photonfs(fs);
      photonfs.acceptId(PID::PHOTON);
      declare(photonfs, "AllPhotons");

      IdentifiedFinalState efs(fs);
      efs.acceptIdPair(PID::ELECTRON);
      declare(efs, "Electrons");

      IdentifiedFinalState mufs(fs);
      mufs.acceptIdPair(PID::MUON);
      declare(mufs, "Muons");

      MissingMomentum missing(fs);
      declare(missing, "MET");

      LeadingParticlesFinalState lpfs(fs);
      lpfs.addParticleIdPair(PID::ELECTRON);
      lpfs.addParticleIdPair(PID::MUON);
      declare(lpfs, "LeadingParticles");

      _hist_n_trk   = bookHisto1D("n-trk", 50, 0.5, 300.5);
      _hist_phi_trk = bookHisto1D("phi-trk", 50, -PI, PI);
      _hist_eta_trk = bookHisto1D("eta-trk", 50, -4, 4);
      _hist_pt_trk  = bookHisto1D("pt-trk", 100, 0.0, 1500);

      _hist_n_jet   = bookHisto1D("n-jet", 21, -0.5, 20.5);
      _hist_phi_jet = bookHisto1D("phi-jet", 50, -PI, PI);
      _hist_eta_jet = bookHisto1D("eta-jet", 50, -4, 4);
      _hist_pt_jet  = bookHisto1D("pt-jet", 100, 0.0, 1500);

      _hist_n_e   = bookHisto1D("n-e", 11, -0.5, 10.5);
      _hist_phi_e = bookHisto1D("phi-e", 50, -PI, PI);
      _hist_eta_e = bookHisto1D("eta-e", 50, -4, 4);
      _hist_pt_e  = bookHisto1D("pt-e", 100, 0.0, 500);

      _hist_n_mu   = bookHisto1D("n-mu", 11, -0.5, 10.5);
      _hist_phi_mu = bookHisto1D("phi-mu", 50, -PI, PI);
      _hist_eta_mu = bookHisto1D("eta-mu", 50, -4, 4);
      _hist_pt_mu  = bookHisto1D("pt-mu", 100, 0.0, 500);

      _hist_n_gamma   = bookHisto1D("n-gamma", 11, -0.5, 10.5);
      _hist_phi_gamma = bookHisto1D("phi-gamma", 50, -PI, PI);
      _hist_eta_gamma = bookHisto1D("eta-gamma", 50, -4, 4);
      _hist_pt_gamma  = bookHisto1D("pt-gamma", 100, 0.0, 500);

      _hist_n_gammaiso   = bookHisto1D("n-gamma-iso", 11, -0.5, 10.5);
      _hist_phi_gammaiso = bookHisto1D("phi-gamma-iso", 50, -PI, PI);
      _hist_eta_gammaiso = bookHisto1D("eta-gamma-iso", 50, -4, 4);
      _hist_pt_gammaiso  = bookHisto1D("pt-gamma-iso", 100, 0.0, 500);

      _hist_met = bookHisto1D("Etmiss", 100, 0.0, 1500);

      _hist_mll_ossf_ee   = bookHisto1D("mll-ossf-ee", 50, 0.0, 500);
      _hist_mll_ossf_mumu = bookHisto1D("mll-ossf-mumu", 50, 0.0, 500);
      _hist_mll_osof_emu  = bookHisto1D("mll-osof-emu", 50, 0.0, 500);

      _hist_mll_all_ossf_ee   = bookHisto1D("mll-all-ossf-ee", 50, 0.0, 500);
      _hist_mll_all_ossf_mumu = bookHisto1D("mll-all-ossf-mumu", 50, 0.0, 500);
      _hist_mll_all_osof_emu  = bookHisto1D("mll-all-osof-emu", 50, 0.0, 500);

      _hist_mll_2_ossf_ee   = bookHisto1D("mll-2-ossf-ee", 50, 0.0, 500);
      _hist_mll_2_ossf_mumu = bookHisto1D("mll-2-ossf-mumu", 50, 0.0, 500);
      _hist_mll_2_osof_emu  = bookHisto1D("mll-2-osof-emu", 50, 0.0, 500);

      /// @todo LSP eta, pT, phi, mass: no reliable cross-scenario LSP PID but
      /// maybe plot for all of chi^0_1, gravitino, sneutrino, gluino, ... or
      /// identify the LSP as any PID::isSUSY (?) particle with status = 1?
    }


    // Do the analysis
    void analyze(const Event& evt) {
      const FinalState& tracks = apply<FinalState>(evt, "Tracks");
      if (tracks.particles().empty()) {
        MSG_DEBUG("Failed multiplicity cut");
        vetoEvent;
      }

      // Get event weight
      const double weight = evt.weight();

      // Fill track histos
      _hist_n_trk->fill(tracks.size(), weight);
      foreach (const Particle& t, tracks.particles()) {
        const FourMomentum& p = t.momentum();
        _hist_phi_trk->fill(mapAngleMPiToPi(p.phi()), weight);
        _hist_eta_trk->fill(p.eta(), weight);
        _hist_pt_trk->fill(p.pT()/GeV, weight);
      }

      // Get jets and fill jet histos
      const FastJets& jetpro = apply<FastJets>(evt, "Jets");
      const Jets jets = jetpro.jetsByPt();
      MSG_DEBUG("Jet multiplicity = " << jets.size());
      _hist_n_jet->fill(jets.size(), weight);
      foreach (const Jet& j, jets) {
        const FourMomentum& pj = j.momentum();
        _hist_phi_jet->fill(mapAngleMPiToPi(pj.phi()), weight);
        _hist_eta_jet->fill(pj.eta(), weight);
        _hist_pt_jet->fill(pj.pT()/GeV, weight);
      }

      /// @todo Resum photons around electrons

      // Fill final state electron/positron histos
      const FinalState& efs = apply<FinalState>(evt, "Electrons");
      _hist_n_e->fill(efs.size(), weight);
      vector<FourMomentum> epluses, eminuses;
      foreach (const Particle& e, efs.particles()) {
        const FourMomentum& p = e.momentum();
        _hist_phi_e->fill(mapAngleMPiToPi(p.phi()), weight);
        _hist_eta_e->fill(p.eta(), weight);
        _hist_pt_e->fill(p.pT()/GeV, weight);
        // Add sufficiently hard leptons to collections for m_ll histo
        if (p.pT()/GeV > 20) {
          if (PID::threeCharge(e.pid()) > 0) epluses += p; else eminuses += p;
        }
      }

      /// @todo Resum photons around muons

      // Fill final state muon/antimuon histos
      const FinalState& mufs = apply<FinalState>(evt, "Muons");
      _hist_n_mu->fill(mufs.size(), weight);
      vector<FourMomentum> mupluses, muminuses;
      foreach (const Particle& mu, mufs.particles()) {
        const FourMomentum& p = mu.momentum();
        _hist_phi_mu->fill(mapAngleMPiToPi(p.phi()), weight);
        _hist_eta_mu->fill(p.eta(), weight);
        _hist_pt_mu->fill(p.pT()/GeV, weight);
        // Add sufficiently hard leptons to collections for m_ll histo
        if (p.pT()/GeV > 20) {
          if (PID::threeCharge(mu.pid()) > 0) mupluses += p; else muminuses += p;
        }
      }

      // Fill final state non-isolated photon histos
      const FinalState& allphotonfs = apply<FinalState>(evt, "AllPhotons");
      _hist_n_gamma->fill(allphotonfs.size(), weight);
      Particles isolatedphotons;
      foreach (const Particle& ph, allphotonfs.particles()) {
        const FourMomentum& p = ph.momentum();
        _hist_phi_gamma->fill(mapAngleMPiToPi(p.phi()), weight);
        _hist_eta_gamma->fill(p.eta(), weight);
        _hist_pt_gamma->fill(p.pT()/GeV, weight);
        // Select isolated photons
        bool isolated = true;
        foreach (const Jet& j, jets) {
          if (deltaR(j.momentum(), p) < 0.2) {
            isolated = false;
            break;
          }
        }
        if (isolated) isolatedphotons += ph;
      }


      // Fill final state isolated photon histos
      _hist_n_gammaiso->fill(isolatedphotons.size(), weight);
      foreach (const Particle& ph_iso, isolatedphotons) {
        const FourMomentum& p = ph_iso.momentum();
        _hist_phi_gammaiso->fill(mapAngleMPiToPi(p.phi()), weight);
        _hist_eta_gammaiso->fill(p.eta(), weight);
        _hist_pt_gammaiso->fill(p.pT()/GeV, weight);
      }

      // Calculate and fill missing Et histos
      const MissingMomentum& met = apply<MissingMomentum>(evt, "MET");
      _hist_met->fill(met.vectorEt().mod()/GeV);

      // Choose highest-pT leptons of each sign and flavour for dilepton mass edges
      const FinalState& lpfs = apply<FinalState>(evt, "LeadingParticles");
      bool eplus_ok(false), eminus_ok(false), muplus_ok(false), muminus_ok(false);
      FourMomentum peplus, peminus, pmuplus, pmuminus;
      foreach (const Particle& p, lpfs.particles()) {
        // Only use leptons above 20 GeV
        if (p.pT()/GeV < 20) continue;
        // Identify the PID
        const PdgId pid = p.pid();
        if (pid == PID::ELECTRON) {
          eminus_ok = true;
          peminus = p.momentum();
        } else if (pid == PID::POSITRON) {
          eplus_ok = true;
          peplus = p.momentum();
        } else if (pid == PID::MUON) {
          muminus_ok = true;
          pmuminus = p.momentum();
        } else if (pid == PID::ANTIMUON) {
          muplus_ok = true;
          pmuplus = p.momentum();
        } else {
          throw Error("Unexpected particle type in leading particles FS!");
        }
      }
      // m_ee
      if (eminus_ok && eplus_ok) {
        const double m_ee = FourMomentum(peplus + peminus).mass();
        _hist_mll_ossf_ee->fill(m_ee/GeV, weight);
        if (epluses.size() == 1 && eminuses.size() == 1)
          _hist_mll_2_ossf_ee->fill(m_ee/GeV, weight);
      }
      // m_mumu
      if (muminus_ok && muplus_ok) {
        const double m_mumu = FourMomentum(pmuplus + pmuminus).mass();
        _hist_mll_ossf_mumu->fill(m_mumu/GeV, weight);
        if (mupluses.size() == 1 && muminuses.size() == 1)
          _hist_mll_2_ossf_mumu->fill(m_mumu/GeV, weight);
      }
      // m_emu (both configurations)
      if (eminus_ok && muplus_ok) {
        const double m_emu = FourMomentum(pmuplus + peminus).mass();
        _hist_mll_osof_emu->fill(m_emu/GeV, weight);
        if (mupluses.size() == 1 && eminuses.size() == 1)
          _hist_mll_2_osof_emu->fill(m_emu/GeV, weight);

      }
      if (muminus_ok && eplus_ok) {
        const double m_mue = FourMomentum(peplus + pmuminus).mass();
        _hist_mll_osof_emu->fill(m_mue/GeV, weight);
        if (epluses.size() == 1 && muminuses.size() == 1)
          _hist_mll_2_osof_emu->fill(m_mue/GeV, weight);
      }


      // m_ll plots using *all* electrons, positrons, muons and antimuons
      // m_ee
      foreach (const FourMomentum& peplus, epluses) {
        foreach (const FourMomentum& peminus, eminuses) {
          const double m_ee = FourMomentum(peplus + peminus).mass();
          _hist_mll_all_ossf_ee->fill(m_ee/GeV, weight);
        }
      }
      // m_mumu
      foreach (const FourMomentum& pmuplus, mupluses) {
        foreach (const FourMomentum& pmuminus, muminuses) {
          const double m_mumu = FourMomentum(pmuplus + pmuminus).mass();
          _hist_mll_all_ossf_mumu->fill(m_mumu/GeV, weight);
        }
      }
      // m_emu (both configurations)
      foreach (const FourMomentum& pmuplus, mupluses) {
        foreach (const FourMomentum& peminus, eminuses) {
          const double m_emu = FourMomentum(pmuplus + peminus).mass();
          _hist_mll_all_osof_emu->fill(m_emu/GeV, weight);
        }
      }
      foreach (const FourMomentum& peplus, epluses) {
        foreach (const FourMomentum& pmuminus, muminuses) {
          const double m_mue = FourMomentum(peplus + pmuminus).mass();
          _hist_mll_all_osof_emu->fill(m_mue/GeV, weight);
        }
      }

    }


    void finalize() {
      /// @todo Normalisations
    }

    //@}


  private:

    Histo1DPtr _hist_n_trk, _hist_phi_trk, _hist_eta_trk, _hist_pt_trk;
    Histo1DPtr _hist_n_jet, _hist_phi_jet, _hist_eta_jet, _hist_pt_jet;
    Histo1DPtr _hist_n_e, _hist_phi_e, _hist_eta_e, _hist_pt_e;
    Histo1DPtr _hist_n_mu, _hist_phi_mu, _hist_eta_mu, _hist_pt_mu;
    Histo1DPtr _hist_n_gamma, _hist_phi_gamma, _hist_eta_gamma, _hist_pt_gamma;
    Histo1DPtr _hist_n_gammaiso, _hist_phi_gammaiso, _hist_eta_gammaiso, _hist_pt_gammaiso;
    Histo1DPtr _hist_met;
    Histo1DPtr _hist_mll_2_ossf_ee, _hist_mll_2_ossf_mumu, _hist_mll_2_osof_emu;
    Histo1DPtr _hist_mll_ossf_ee, _hist_mll_ossf_mumu, _hist_mll_osof_emu;
    Histo1DPtr _hist_mll_all_ossf_ee, _hist_mll_all_ossf_mumu, _hist_mll_all_osof_emu;
  };



  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(MC_SUSY);

}