Particle Physics - @lemouth exercise 1b

in #utopian-io6 years ago (edited)

Repository

https://github.com/BFuks/mad5-utopian-exercises

The files described in this post are saved as:

ex1b-irelandscape.h
ex1b-irelandscape.cpp

Introduction

This post describes my solution for @lemouth second exercise in his series about open-source implementation of LHC particle analysis.

[image credits - CERN]

A short while ago @lemouth started an initiative to get some programmers within the Steemit community to participate in implementing open-source software for analyzing LHC data using the MadAnalysis5 framework

This exercise consists in selecting from a series of events (collisions) the sets of leptons and jets meeting baseline criteria.

As initial detection cannot differentiate with 100% certainty leptons and jets, some overlap resolution mechanism must be applied.

Finally a subset of the resulting objects is selected and qualified as signal particles based on more stringent criteria.

All of the above procedures are described in the following Atlas Collaboration research paper

This post describes my implementation of the exercise and concludes with the corresponding result.

Exercise Implementation

I now describe the code implemented. Note that I added several traces to make it easier for someone to spot problems in case that the result is incorrect.

First, the initial number of detected electrons, muons and jets is printed at the start of the Execute method:

bool test_analysis::Execute(SampleFormat& sample, const EventFormat& event)
{
  if (event.mc() == 0)
      return true;

  cout << "Initial Electrons: " << event.rec()->electrons().size() << ", "
       << "Initial Muons: " << event.rec()->muons().size() << ", "
       << "Initial Jets: " << event.rec()->jets().size() << endl;

Now, we need to extract the baseline electrons. According to the research paper, those should have Pt > 5GeV and |η| < 2.47.
I instantiate a new vector of RecLeptonFormat objects (it looks like electrons and muons are handled by the same Lepton class):
The supplied vector of electrons is then iterated and each one matching the above criteria is added to the new vector.

  // Extract baseline electrons (pt > 5GeV and |n| < 2.47
  std::vector<RecLeptonFormat> electrons;
  for (std::vector<RecLeptonFormat>::const_iterator it_electron = event.rec()->electrons().begin();
       it_electron != event.rec()->electrons().end();
       ++it_electron)
  {
      MAfloat32 pt = it_electron->pt();
      MAfloat32 abseta = it_electron->abseta();

      if (pt > 5 && abseta < 2.47)
      {
          cout << "Adding baseline electron (pt = " << pt << ", |n| = " << abseta << ")" << endl;
          electrons.push_back(*it_electron);
      }
      else
      {
          cout << "Rejecting electron (pt = " << pt << ", |n| = " << abseta << ")" << endl;
      }
  }

  cout << "Baseline electrons: " << electrons.size() << endl;

The same is repeated for the muons which must satisfy Pt > 4GeV and |η| <= 2.7.

  // Extract baseline muons (pt > 4GeV and |n| <= 2.7
  std::vector<RecLeptonFormat> muons;
  for (std::vector<RecLeptonFormat>::const_iterator it_muon = event.rec()->muons().begin();
       it_muon != event.rec()->muons().end();
       ++it_muon)
  {
      MAfloat32 pt = it_muon->pt();
      MAfloat32 abseta = it_muon->abseta();

      if (pt > 4 && abseta <= 2.47)
      {
          cout << "Adding baseline muon (pt = " << pt << ", |n| = " << abseta << ")" << endl;
          muons.push_back(*it_muon);
      }
      else
      {
          cout << "Rejecting muon (pt = " << pt << ", |n| = " << abseta << ")" << endl;
      }
  }

  cout << "Baseline muons: " << muons.size() << endl;

The same is repeated for the jets. The only requirement for baseline jets is Pt > 20GeV. From my non-expert point of view it's interesting to know that jets have a much higher transversal momentum than leptons.

  // Extract baseline jets (pt > 20GeV)
  std::vector<RecJetFormat> jets;
  for (std::vector<RecJetFormat>::const_iterator it_jet = event.rec()->jets().begin();
       it_jet != event.rec()->jets().end();
       ++it_jet)
  {
      MAfloat32 pt = it_jet->pt();

      if (pt > 20)
      {
          cout << "Adding baseline jet (pt = " << pt << ")" << endl;
          jets.push_back(*it_jet);
      }
      else
      {
          cout << "Rejecting jet (pt = " << pt << ")" << endl;
      }
  }

  cout << "Baseline jets: " << jets.size() << endl;

Now that we have the baseline electrons, muons and jets it is time to run the overlap checks to resolve confusions between certain pairs of objects.
Following @lemouth's instructions the only pairs checked in this exercise are (e, j) and (j, l)

I separated the overlap checking algorithm into its own method:

 CheckOverlap(electrons,
               muons,
               jets);

  cout << "***" << endl;
  cout << "Baseline electrons (after overlap removal): " << electrons.size() << endl;
  cout << "Baseline muons (after overlap removal): " << muons.size() << endl;
  cout << "Baseline jets (after overlap removal): " << jets.size() << endl;
  cout << "***" << endl;

And the CheckOverlap method is implemented as follows (according to Table 3 in the research paper).

Each baseline electron is checked against each baseline jet. Where the angular distance ΔR is lesser than 0.2 the two objects are considered to overlap. In that case if the jet is not b-tagged the jet must be kept, otherwise the electron must be kept.

Following this the remaining baseline jets are checked against the remaining leptons (electrons and muons). If ΔR < min(0.4, 0.04 + 10 / Plt) then there is overlap and the jet is kept.

The check between jet and lepton was put in an inline function in the class declaration as it is reused across electrons and muons:

    static inline bool jl_overlap_criteria_met (const RecJetFormat& j,
                                                const RecLeptonFormat& l)
    {
        double dr = j.dr(l);
    
        return dr < std::min(0.4, 0.04 + (10.0 / l.pt()));
    }

The resulting overlap checking is the following:

void test_analysis::CheckOverlap (std::vector<RecLeptonFormat>& electrons,
                                  std::vector<RecLeptonFormat>& muons,
                                  std::vector<RecJetFormat>& jets)
{
  // (e,j) check
  for (std::vector<RecLeptonFormat>::const_iterator it_electron = electrons.begin();
       it_electron != electrons.end();
       )
  {
      bool electron_removed = false;

      for (std::vector<RecJetFormat>::const_iterator it_jet = jets.begin();
           it_jet != jets.end();
           )
      {
          bool jet_removed = false;
          double dr = it_electron->dr(*it_jet);

          // DELTA R < 0.2
          if (dr < 0.2)
          {
              cout << "(e,j) overlap detected: DR = " << dr << endl;
              if (!it_jet->btag())
              {
                  cout << "Jet not b-tagged, keeping jet" << endl;
                  it_electron = electrons.erase(it_electron);
                  electron_removed = true;
                  break;
              }
              else
              {
                 cout << "Jet is b-tagged, keeping electron" << endl;
                  it_jet = jets.erase(it_jet);
                  jet_removed = true;
              }
          }

          if (!jet_removed)
              ++it_jet;
      }

      if (!electron_removed)
          ++it_electron;
  }

  // (j,l) check
  for (std::vector<RecJetFormat>::const_iterator it_jet = jets.begin();
       it_jet != jets.end();
       ++it_jet)
  {
      // First, iterate electrons
      for (std::vector<RecLeptonFormat>::const_iterator it_electron = electrons.begin();
           it_electron != electrons.end();
           )
      {
          if (test_analysis::jl_overlap_criteria_met(*it_jet, *it_electron))
          {
              cout << "(j,e) overlap detected. Keeping jet" << endl;
              it_electron = electrons.erase(it_electron);
          }
          else
              ++it_electron;
      }
      }

      // Next, iterate muons
      for (std::vector<RecLeptonFormat>::const_iterator it_muon = muons.begin();
           it_muon != muons.end();
           )
      {
          if (test_analysis::jl_overlap_criteria_met(*it_jet, *it_muon))
          {
              cout << "(j,u) overlap detected. Keeping jet" << endl;
              it_muon = muons.erase(it_muon);
          }
          else
              ++it_muon;
      }
  }
}

Now that the overlap has been resolved we need to extract signal electrons, muons and jets.

According to the paper signal leptons must have Pt >= 25GeV. Any electron or muon not meeting this requirement are discarded:

 // Extract signal electrons (pt >= 25GeV)
  for (std::vector<RecLeptonFormat>::const_iterator it_electron = electrons.begin();
       it_electron != electrons.end();
       )
  {
      MAfloat32 pt = it_electron->pt();

      if (pt < 25)
      {
          cout << "Rejecting non-signal electron with pt " << pt << endl;
          it_electron = electrons.erase(it_electron);
      }
      else
      {
          ++it_electron;
      }
  }

  // Extract signal muons (pt >= 25GeV)
  for (std::vector<RecLeptonFormat>::const_iterator it_muon = muons.begin();
       it_muon != muons.end();
       )
  {
      MAfloat32 pt = it_muon->pt();

      if (pt < 25)
      {
          cout << "Rejecting non-signal muon with pt " << pt << endl;
          it_muon = muons.erase(it_muon);
      }
      else
      {
          ++it_muon;
      }
  }

Signal jet must meet Pt > 25GeV and |η| < 2.5:

  // Extract signal jets (pt > 25GeV and |n| < 2.5)
  for (std::vector<RecJetFormat>::const_iterator it_jet = jets.begin();
       it_jet != jets.end();
       )
  {
      MAfloat32 pt = it_jet->pt();
      MAfloat32 abseta = it_jet->abseta();

      if (pt <= 25 || abseta >= 2.5)
      {
          cout << "Rejecting non-signal jet with pt=" << pt << ", |n|=" << abseta << endl;
          it_jet = jets.erase(it_jet);
      }
      else
      {
          ++it_jet;
      }
  }

The resulting count of signal elctrons, muons and jets is finally displayed:

  cout << "***" << endl;
  cout << "Signal electrons: " << electrons.size() << endl;
  cout << "Signal muons: " << muons.size() << endl;
  cout << "Signal jets: " << jets.size() << endl;
  cout << "***" << endl;

  return true;

Note that as per @lemouth's instructions I have ignored anything not described in his post. So there are a few attributes in the research paper that are not verified by this implementation.

Result

root@lhc:~/madanalysis5/test_folder/Build# 
    * SampleAnalyzer for MadAnalysis 5 - Welcome.
    * Initializing all components
      - version: 1.6 (2018/05/04) 
      - general: everything is default.
      - extracting the list of event samples...
      - analyzer 'test_analysis'
BEGIN Initialization
END   Initialization
    * Running over files ...
    * 1/1  /root/cern_contributions/exercises/1a/tth_aa.root
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeReader.h
   requested to autoload type ExRootTreeReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeWriter.h
   requested to autoload type ExRootTreeWriter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeBranch.h
   requested to autoload type ExRootTreeBranch
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootResult.h
   requested to autoload type ExRootResult
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootClassifier.h
   requested to autoload type ExRootClassifier
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootFilter.h
   requested to autoload type ExRootFilter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootProgressBar.h
   requested to autoload type ExRootProgressBar
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
   requested to autoload type ExRootConfParam
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
   requested to autoload type ExRootConfReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTask.h
   requested to autoload type ExRootTask
        => file size: 943.63 ko
WARNING: --------------------------------------------------------------------------------
WARNING:  Msg     | the input file has been produced with ROOT version 61000 whereas the loaded ROOT libs are related to the version 61206
WARNING:  Details | 
WARNING:  Where   | Function = ReadHeader ; File=root/ROOTReader.cpp ; Line=70
WARNING: --------------------------------------------------------------------------------
        => sample format: Delphes-ROOT file produced by Delphes + MA5tuned-cards.
        => progress: [===>                               ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 6
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 215.34)
Adding baseline jet (pt = 93.921)
Adding baseline jet (pt = 45.8521)
Adding baseline jet (pt = 35.5923)
Adding baseline jet (pt = 33.5812)
Adding baseline jet (pt = 31.3496)
Baseline jets: 6
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
Rejecting non-signal jet with pt=31.3496, |n|=2.5429
***
Signal electrons: 0
Signal muons: 0
Signal jets: 5
***

        => progress: [======>                            ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 6
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 182.809)
Adding baseline jet (pt = 93.1466)
Adding baseline jet (pt = 90.2955)
Adding baseline jet (pt = 52.5757)
Adding baseline jet (pt = 44.9884)
Adding baseline jet (pt = 26.5476)
Baseline jets: 6
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 6
***

        => progress: [==========>                        ]
Initial Electrons: 2, Initial Muons: 1, Initial Jets: 9
Adding baseline electron (pt = 50.001, |n| = 1.63238)
Adding baseline electron (pt = 18.628, |n| = 1.63263)
Baseline electrons: 2
Adding baseline muon (pt = 100.354, |n| = 0.505378)
Baseline muons: 1
Adding baseline jet (pt = 221.713)
Adding baseline jet (pt = 202.161)
Adding baseline jet (pt = 200.012)
Adding baseline jet (pt = 60.5474)
Adding baseline jet (pt = 56.4556)
Adding baseline jet (pt = 39.5496)
Adding baseline jet (pt = 37.2858)
Adding baseline jet (pt = 37.2195)
Adding baseline jet (pt = 34.2171)
Baseline jets: 9
(j,e) overlap detected. Keeping jet
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 1
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 9
***
Rejecting non-signal jet with pt=37.2858, |n|=4.63225
***
Signal electrons: 1
Signal muons: 0
Signal jets: 8
***

        => progress: [=============>                     ]
Initial Electrons: 0, Initial Muons: 1, Initial Jets: 10
Baseline electrons: 0
Adding baseline muon (pt = 10.0727, |n| = 2.32772)
Baseline muons: 1
Adding baseline jet (pt = 112.661)
Adding baseline jet (pt = 97.7057)
Adding baseline jet (pt = 69.5077)
Adding baseline jet (pt = 64.4589)
Adding baseline jet (pt = 62.6108)
Adding baseline jet (pt = 53.4359)
Adding baseline jet (pt = 42.9801)
Adding baseline jet (pt = 40.8307)
Adding baseline jet (pt = 29.5504)
Adding baseline jet (pt = 24.9408)
Baseline jets: 10
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 10
***
Rejecting non-signal jet with pt=64.4589, |n|=3.39025
Rejecting non-signal jet with pt=24.9408, |n|=0.372654
***
Signal electrons: 0
Signal muons: 0
Signal jets: 8
***

        => progress: [=================>                 ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 8
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 257.912)
Adding baseline jet (pt = 153.493)
Adding baseline jet (pt = 85.1586)
Adding baseline jet (pt = 75.27)
Adding baseline jet (pt = 67.0508)
Adding baseline jet (pt = 58.5218)
Adding baseline jet (pt = 50.6759)
Adding baseline jet (pt = 50.0392)
Baseline jets: 8
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 8
***
Rejecting non-signal jet with pt=67.0508, |n|=2.81922
***
Signal electrons: 0
Signal muons: 0
Signal jets: 7
***

        => progress: [====================>              ]
Initial Electrons: 0, Initial Muons: 1, Initial Jets: 6
Baseline electrons: 0
Adding baseline muon (pt = 46.0369, |n| = 0.182209)
Baseline muons: 1
Adding baseline jet (pt = 282.489)
Adding baseline jet (pt = 146.485)
Adding baseline jet (pt = 115.989)
Adding baseline jet (pt = 100.48)
Adding baseline jet (pt = 63.657)
Adding baseline jet (pt = 49.2006)
Baseline jets: 6
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 6
***

        => progress: [========================>          ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 4
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 88.2667)
Adding baseline jet (pt = 82.7576)
Adding baseline jet (pt = 70.9671)
Adding baseline jet (pt = 40.0826)
Baseline jets: 4
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 4
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 4
***

        => progress: [===========================>       ]
Initial Electrons: 1, Initial Muons: 0, Initial Jets: 6
Adding baseline electron (pt = 10.8771, |n| = 0.553089)
Baseline electrons: 1
Baseline muons: 0
Adding baseline jet (pt = 148.275)
Adding baseline jet (pt = 127.115)
Adding baseline jet (pt = 124.569)
Adding baseline jet (pt = 69.6743)
Adding baseline jet (pt = 58.3917)
Adding baseline jet (pt = 50.7217)
Baseline jets: 6
(e,j) overlap detected: DR = 0.137185
Jet not b-tagged, keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 6
***

        => progress: [===============================>   ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 10
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 103.738)
Adding baseline jet (pt = 64.2951)
Adding baseline jet (pt = 51.9058)
Adding baseline jet (pt = 44.0021)
Adding baseline jet (pt = 41.2539)
Adding baseline jet (pt = 36.7969)
Adding baseline jet (pt = 35.0672)
Adding baseline jet (pt = 33.101)
Adding baseline jet (pt = 27.0914)
Adding baseline jet (pt = 23.0668)
Baseline jets: 10
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 10
***
Rejecting non-signal jet with pt=33.101, |n|=2.63671
Rejecting non-signal jet with pt=23.0668, |n|=0.359769
***
Signal electrons: 0
Signal muons: 0
Signal jets: 8
***

        => progress: [==================================>]
Initial Electrons: 1, Initial Muons: 0, Initial Jets: 7
Adding baseline electron (pt = 282.158, |n| = 0.71741)
Baseline electrons: 1
Baseline muons: 0
Adding baseline jet (pt = 285.005)
Adding baseline jet (pt = 252.772)
Adding baseline jet (pt = 152.672)
Adding baseline jet (pt = 68.6698)
Adding baseline jet (pt = 45.4375)
Adding baseline jet (pt = 43.5252)
Adding baseline jet (pt = 33.9009)
Baseline jets: 7
(e,j) overlap detected: DR = 1.11022e-16
Jet not b-tagged, keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 7
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 7
***

        => progress: [===================================]
        => total number of events: 10 ( analyzed: 10 ; skipped: 0 ) 
    * Finalizing all components ...
    * Total number of processed events: 10.
BEGIN Finalization
END   Finalization
+----------------------------------------------------------------------------------------------------------------------+
|                              LogReport-Warning                                                                       |
+----------------------------------------------------------------------------------------------------------------------+
| Message                                       NIterations @ File                                              Line   |
|----------------------------------------------------------------------------------------------------------------------|
| the input file has been produced with ROOT v  1             root/ROOTReader.cpp                               70     |
+----------------------------------------------------------------------------------------------------------------------+
    * Goodbye.

Corrections

The above code has now been reviewed and @lemouth was kind enough to point at a couple of issues which are now described in this section.

The security check

  if (event.mc() == 0)
      return true;

is unnecessary because the sample data contains reconstructed events.
For this reasons we are analyzing RecEventFormat objects instead of McEventFormat objects. I'm not sure what the latter means exactly but this may become clearer in future posts.

The proper check is thus:

  if (event.rec() == NULL)
      return true;

The (e,j) overlap check implemented above actually retains the incorrect object if ΔR < 0.2.

The following text describes that if the jet is b-tagged it should be retained, otherwise the electron should be retained.

For example, if a baseline electron and a baseline jet are separated by ∆R < 0.2, then the electron is retained (as stated in the ‘Precedence’ row) and the jet is discarded, unless the jet is b-tagged (as stated in the ‘Condition’ row) in which case the electron is assumed to originate from a heavy-flavour decay and is hence discarded while the jet is retained.'

The code was thus updated in the following manner:

         // DELTA R < 0.2
          if (dr < 0.2)
          {
              cout << "(e,j) overlap detected: DR = " << dr << endl;
              if (it_jet->btag())
              {
                  cout << "Jet b-tagged, keeping jet" << endl;
                  it_electron = electrons.erase(it_electron);
                  electron_removed = true;
                  break;
              }
              else
              {
                  cout << "Jet is not b-tagged, keeping electron" << endl;
                  it_jet = jets.erase(it_jet);
                  jet_removed = true;
              }
          }

          if (!jet_removed)
              ++it_jet;

The resulting output is now:

* SampleAnalyzer for MadAnalysis 5 - Welcome.
    * Initializing all components
      - version: 1.6 (2018/05/04) 
      - general: everything is default.
      - extracting the list of event samples...
      - analyzer 'test_analysis'
BEGIN Initialization
END   Initialization
    * Running over files ...
    * 1/1  /root/cern_contributions/exercises/1a/tth_aa.root
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeReader.h
   requested to autoload type ExRootTreeReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeWriter.h
   requested to autoload type ExRootTreeWriter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTreeBranch.h
   requested to autoload type ExRootTreeBranch
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootResult.h
   requested to autoload type ExRootResult
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootClassifier.h
   requested to autoload type ExRootClassifier
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootFilter.h
   requested to autoload type ExRootFilter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootProgressBar.h
   requested to autoload type ExRootProgressBar
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
   requested to autoload type ExRootConfParam
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
   requested to autoload type ExRootConfReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for ExRootAnalysis/ExRootTask.h
   requested to autoload type ExRootTask
        => file size: 943.63 ko
WARNING: --------------------------------------------------------------------------------
WARNING:  Msg     | the input file has been produced with ROOT version 61000 whereas the loaded ROOT libs are related to the version 61206
WARNING:  Details | 
WARNING:  Where   | Function = ReadHeader ; File=root/ROOTReader.cpp ; Line=70
WARNING: --------------------------------------------------------------------------------
        => sample format: Delphes-ROOT file produced by Delphes + MA5tuned-cards.
        => progress: [===>                               ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 6
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 215.34)
Adding baseline jet (pt = 93.921)
Adding baseline jet (pt = 45.8521)
Adding baseline jet (pt = 35.5923)
Adding baseline jet (pt = 33.5812)
Adding baseline jet (pt = 31.3496)
Baseline jets: 6
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
Rejecting non-signal jet with pt=31.3496, |n|=2.5429
***
Signal electrons: 0
Signal muons: 0
Signal jets: 5
***

        => progress: [======>                            ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 6
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 182.809)
Adding baseline jet (pt = 93.1466)
Adding baseline jet (pt = 90.2955)
Adding baseline jet (pt = 52.5757)
Adding baseline jet (pt = 44.9884)
Adding baseline jet (pt = 26.5476)
Baseline jets: 6
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 6
***

        => progress: [==========>                        ]
Initial Electrons: 2, Initial Muons: 1, Initial Jets: 9
Adding baseline electron (pt = 50.001, |n| = 1.63238)
Adding baseline electron (pt = 18.628, |n| = 1.63263)
Baseline electrons: 2
Adding baseline muon (pt = 100.354, |n| = 0.505378)
Baseline muons: 1
Adding baseline jet (pt = 221.713)
Adding baseline jet (pt = 202.161)
Adding baseline jet (pt = 200.012)
Adding baseline jet (pt = 60.5474)
Adding baseline jet (pt = 56.4556)
Adding baseline jet (pt = 39.5496)
Adding baseline jet (pt = 37.2858)
Adding baseline jet (pt = 37.2195)
Adding baseline jet (pt = 34.2171)
Baseline jets: 9
(j,e) overlap detected. Keeping jet
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 1
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 9
***
Rejecting non-signal jet with pt=37.2858, |n|=4.63225
***
Signal electrons: 1
Signal muons: 0
Signal jets: 8
***

        => progress: [=============>                     ]
Initial Electrons: 0, Initial Muons: 1, Initial Jets: 10
Baseline electrons: 0
Adding baseline muon (pt = 10.0727, |n| = 2.32772)
Baseline muons: 1
Adding baseline jet (pt = 112.661)
Adding baseline jet (pt = 97.7057)
Adding baseline jet (pt = 69.5077)
Adding baseline jet (pt = 64.4589)
Adding baseline jet (pt = 62.6108)
Adding baseline jet (pt = 53.4359)
Adding baseline jet (pt = 42.9801)
Adding baseline jet (pt = 40.8307)
Adding baseline jet (pt = 29.5504)
Adding baseline jet (pt = 24.9408)
Baseline jets: 10
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 10
***
Rejecting non-signal jet with pt=64.4589, |n|=3.39025
Rejecting non-signal jet with pt=24.9408, |n|=0.372654
***
Signal electrons: 0
Signal muons: 0
Signal jets: 8
***

        => progress: [=================>                 ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 8
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 257.912)
Adding baseline jet (pt = 153.493)
Adding baseline jet (pt = 85.1586)
Adding baseline jet (pt = 75.27)
Adding baseline jet (pt = 67.0508)
Adding baseline jet (pt = 58.5218)
Adding baseline jet (pt = 50.6759)
Adding baseline jet (pt = 50.0392)
Baseline jets: 8
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 8
***
Rejecting non-signal jet with pt=67.0508, |n|=2.81922
***
Signal electrons: 0
Signal muons: 0
Signal jets: 7
***

        => progress: [====================>              ]
Initial Electrons: 0, Initial Muons: 1, Initial Jets: 6
Baseline electrons: 0
Adding baseline muon (pt = 46.0369, |n| = 0.182209)
Baseline muons: 1
Adding baseline jet (pt = 282.489)
Adding baseline jet (pt = 146.485)
Adding baseline jet (pt = 115.989)
Adding baseline jet (pt = 100.48)
Adding baseline jet (pt = 63.657)
Adding baseline jet (pt = 49.2006)
Baseline jets: 6
(j,u) overlap detected. Keeping jet
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 6
***

        => progress: [========================>          ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 4
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 88.2667)
Adding baseline jet (pt = 82.7576)
Adding baseline jet (pt = 70.9671)
Adding baseline jet (pt = 40.0826)
Baseline jets: 4
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 4
***
***
Signal electrons: 0
Signal muons: 0
Signal jets: 4
***

        => progress: [===========================>       ]
Initial Electrons: 1, Initial Muons: 0, Initial Jets: 6
Adding baseline electron (pt = 10.8771, |n| = 0.553089)
Baseline electrons: 1
Baseline muons: 0
Adding baseline jet (pt = 148.275)
Adding baseline jet (pt = 127.115)
Adding baseline jet (pt = 124.569)
Adding baseline jet (pt = 69.6743)
Adding baseline jet (pt = 58.3917)
Adding baseline jet (pt = 50.7217)
Baseline jets: 6
(e,j) overlap detected: DR = 0.137185
Jet is not b-tagged, keeping electron
***
Baseline electrons (after overlap removal): 1
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 5
***
Rejecting non-signal electron with pt 10.8771
***
Signal electrons: 0
Signal muons: 0
Signal jets: 5
***

        => progress: [===============================>   ]
Initial Electrons: 0, Initial Muons: 0, Initial Jets: 10
Baseline electrons: 0
Baseline muons: 0
Adding baseline jet (pt = 103.738)
Adding baseline jet (pt = 64.2951)
Adding baseline jet (pt = 51.9058)
Adding baseline jet (pt = 44.0021)
Adding baseline jet (pt = 41.2539)
Adding baseline jet (pt = 36.7969)
Adding baseline jet (pt = 35.0672)
Adding baseline jet (pt = 33.101)
Adding baseline jet (pt = 27.0914)
Adding baseline jet (pt = 23.0668)
Baseline jets: 10
***
Baseline electrons (after overlap removal): 0
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 10
***
Rejecting non-signal jet with pt=33.101, |n|=2.63671
Rejecting non-signal jet with pt=23.0668, |n|=0.359769
***
Signal electrons: 0
Signal muons: 0
Signal jets: 8
***

        => progress: [==================================>]
Initial Electrons: 1, Initial Muons: 0, Initial Jets: 7
Adding baseline electron (pt = 282.158, |n| = 0.71741)
Baseline electrons: 1
Baseline muons: 0
Adding baseline jet (pt = 285.005)
Adding baseline jet (pt = 252.772)
Adding baseline jet (pt = 152.672)
Adding baseline jet (pt = 68.6698)
Adding baseline jet (pt = 45.4375)
Adding baseline jet (pt = 43.5252)
Adding baseline jet (pt = 33.9009)
Baseline jets: 7
(e,j) overlap detected: DR = 1.11022e-16
Jet is not b-tagged, keeping electron
***
Baseline electrons (after overlap removal): 1
Baseline muons (after overlap removal): 0
Baseline jets (after overlap removal): 6
***
***
Signal electrons: 1
Signal muons: 0
Signal jets: 6
***

        => progress: [===================================]
        => total number of events: 10 ( analyzed: 10 ; skipped: 0 ) 
    * Finalizing all components ...
    * Total number of processed events: 10.
BEGIN Finalization
END   Finalization
+----------------------------------------------------------------------------------------------------------------------+
|                              LogReport-Warning                                                                       |
+----------------------------------------------------------------------------------------------------------------------+
| Message                                       NIterations @ File                                              Line   |
|----------------------------------------------------------------------------------------------------------------------|
| the input file has been produced with ROOT v  1             root/ROOTReader.cpp                               70     |
+----------------------------------------------------------------------------------------------------------------------+
    * Goodbye.

Comparing this result with the previous result, we get the following diff

root@lhc:~/madanalysis5/test_folder# diff ~/old.txt ~/new.txt 
236c236
< Jet not b-tagged, keeping jet
---
> Jet is not b-tagged, keeping electron
238c238
< Baseline electrons (after overlap removal): 0
---
> Baseline electrons (after overlap removal): 1
240c240
< Baseline jets (after overlap removal): 6
---
> Baseline jets (after overlap removal): 5
241a242
> Rejecting non-signal electron with pt 10.8771
245c246
< Signal jets: 6
---
> Signal jets: 5
290c291
< Jet not b-tagged, keeping jet
---
> Jet is not b-tagged, keeping electron
292c293
< Baseline electrons (after overlap removal): 0
---
> Baseline electrons (after overlap removal): 1
294c295
< Baseline jets (after overlap removal): 7
---
> Baseline jets (after overlap removal): 6
297c298
< Signal electrons: 0
---
> Signal electrons: 1
299c300
< Signal jets: 7
---
> Signal jets: 6

Resources

Series Backlinks

Sort:  
Loading...

I have now added a "Correction" section to this post to reflect the fixes that were made to the code to address the issues pointed out by @lemouth.

The post completes with the update result output.

Now we agree! :)

Hey @irelandscape
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

this is amazing thank you for this article.

Thank you very much.

Hello @irelandscape

I am happy to see you're participating in the @lemouth's attempt to do something unique just like @elear of utopian-io did, and today utopia is a household name. Goodluck in this endeavor.

Regards.

@eurogee of @euronation and @steemstem communities

Thanks @eurogee.
Yes it is quite an exciting experiment and I'm sure it is going to attract attention and gather momentum.

Sure! ✌️

Look at this guy working ahead on the b-tagging - nice job.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64400.33
ETH 3140.71
USDT 1.00
SBD 3.93