rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_JET_IN_HI

Monte Carlo validation, simple jet analysis in heavy ion collisions, using centrality framework.
Experiment: ()
Status: VALIDATED
Authors:
  • Christian Bierlich
  • Johannes Bellm
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Heavy Ion event with a Z decaying to muons and an associated jet. Centrality measure taken from ATLAS_2015_PBPBCENTRALITY, which needs to be run, and the corresponding histogram preloaded.

Source code: MC_JET_IN_HI.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
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/WFinder.hh"
#include "Rivet/Projections/ZFinder.hh"
#include "fastjet/tools/Filter.hh"
#include "fastjet/tools/Pruner.hh"
#include "Rivet/Tools/AtlasCommon.hh"

namespace Rivet {

  class MC_JET_IN_HI : public Analysis {
  public:

    /// @name Constructors etc.
    //@{

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(MC_JET_IN_HI);

    //@}


  public:

    string ts(int in) {
      std::stringstream ss;
      ss << in;
      return ss.str();
    }
    /// @name Analysis methods
    //@{

    /// Book histograms and initialise projections before the run
    void init() {
      // Declare centrality projection - we use the ATLAS PbPb definition
      // to be able to compare to data.
      declareCentrality(ATLAS::SumET_PBPB_Centrality(),"ATLAS_PBPB_CENTRALITY",
		      "sumETFwd","sumETFwd");
      // The final state where jets are found
      FinalState fs(Cuts::abseta < 2.5);
      declare(fs, "FS");
 
      ZFinder zfinder(fs, Cuts::abseta < 2.5 && Cuts::pT > 30*GeV, PID::MUON, 80*GeV, 100*GeV, 0.2,
                      ZFinder::ChargedLeptons::PROMPT, ZFinder::ClusterPhotons::NODECAY, ZFinder::AddPhotons::YES);
      declare(zfinder, "ZFinder");

      // Z+jet jet collections
      declare(FastJets(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.3), "JetsAK3");
      declare(FastJets(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.5), "JetsAK5");
      declare(FastJets(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.7), "JetsAK7");
      declare(FastJets(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.9), "JetsAK9");

      jetFinders = {"JetsAK3", "JetsAK5", "JetsAK7", "JetsAK9"};
      
      h_zpT.resize(jetFinders.size());
      h_jetpT.resize(jetFinders.size());
      for (size_t i = 0; i < jetFinders.size(); ++i) {
        string s = jetFinders[i];
	book(h_zpT[i], s + "zpT",logspace(50, 1.0,1000));
	book(h_jetpT[i], s + "jetpT",logspace(50, 1.0,1000));
      }
      book(incSow, "incSow");

      centData = {0., 0.2, 0.4, 0.6, 0.8,};
      for (size_t i = 0; i < centData.size(); ++i) {
        book(c_jetpT[centData[i]], "cjetpT" + ts(i),logspace(100, 10.0,1000));
        book(c_zpT[centData[i]], "czpt" + ts(i),logspace(100, 10.0,1000));
	      book(sow[centData[i]], "sow_" + ts(i));
      }
    }

    bool isBackToBack_zj(const ZFinder& zf, const fastjet::PseudoJet& psjet) {
      const FourMomentum& z = zf.bosons()[0].momentum();
      const FourMomentum jmom(psjet.e(), psjet.px(), psjet.py(), psjet.pz());
      return (deltaPhi(z, jmom) > 7.*M_PI/8. );
    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {
      
      // Get the Z
      const ZFinder& zfinder = apply<ZFinder>(event, "ZFinder");
      if (zfinder.bosons().size() != 1) vetoEvent;
      Particle z = zfinder.bosons()[0];
      Particle l1 = zfinder.constituents()[0];
      Particle l2 = zfinder.constituents()[1];

      // Require a high-pT Z (and constituents)
      if (l1.pT() < 10*GeV || l2.pT() < 10*GeV || z.pT() < 60*GeV) vetoEvent;

      // Get the centrality
      const double c = apply<CentralityProjection>(event,"sumETFwd")();
      auto jetpTItr = c_jetpT.upper_bound(c);
      auto zpTItr = c_zpT.upper_bound(c);
      auto sowItr = sow.upper_bound(c);
      if (jetpTItr == c_jetpT.end() || zpTItr == c_zpT.end() || 
        sowItr == sow.end()) vetoEvent;
      sowItr->second->fill();
      incSow->fill();
      // Get the  jets
      for (size_t i = 0; i < jetFinders.size(); ++i ) {
        const PseudoJets& psjets = apply<FastJets>(event, 
	  jetFinders[i]).pseudoJetsByPt(30.0*GeV);
        if (!psjets.empty()) {
        // Get the leading jet and make sure it's back-to-back with the Z
        const fastjet::PseudoJet& j0 = psjets[0];
	if (isBackToBack_zj(zfinder, j0)) {
	    // Fill the centrality inclusive histograms
	    h_zpT[i]->fill(z.pT());
	    h_jetpT[i]->fill(j0.perp());
	    // Fill centrality dept histograms only for R = 0.3
	    if (i == 0) {
              jetpTItr->second->fill(j0.perp());
	      zpTItr->second->fill(z.pT());
	    }
	  }
        }
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
       for(size_t i = 0; i < jetFinders.size(); ++i) {
         h_zpT[i]->scaleW(1./incSow->sumW());
         h_jetpT[i]->scaleW(1./incSow->sumW());
       }
       for (size_t i = 0; i < centData.size(); ++i) {
         c_jetpT[centData[i]]->scaleW(1./sow[centData[i]]->sumW());
         c_zpT[centData[i]]->scaleW(1./sow[centData[i]]->sumW());
       }
    }


    //@}


  private:
  vector<string> jetFinders;
  // Centrality inclusive histograms
  vector<Histo1DPtr> h_zpT;
  vector<Histo1DPtr> h_jetpT;
  CounterPtr incSow;
  // Centrality intervals
  vector<double> centData;
  // Centrality binned histograms
  map<double, Histo1DPtr> c_jetpT;
  map<double, Histo1DPtr> c_zpT;
  map<double, CounterPtr> sow;

  };


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

}