DAS  3.0
Das Analysis System
Conservative

Description

Check jets reconstructed in hot regions of the detector and give them a weight of zero (previously, they were just removed from the list, which is fine for inclusive jet and b jet analyses, but which screws up multi-jet analyses).

We apply a conservative apporach in this code: one could refine a bit the code to apply it including time dependence (with a weight representative of the luminosity of the era), but the effect being very fine for 2016 and only in the tracker acceptance, we have not considered it

#include <Conservative.h>

+ Collaboration diagram for Conservative:

Public Member Functions

 Conservative (const std::filesystem::path &jetveto_file)
 
void operator() (DAS::RecJet &jet)
 
void Write (TDirectory *dir)
 

Public Attributes

std::unique_ptr< TH2 > h
 

Constructor & Destructor Documentation

◆ Conservative()

Conservative ( const std::filesystem::path &  jetveto_file)
inline
38  {
39  using namespace std;
40  namespace fs = filesystem;
41  namespace DE = Darwin::Exceptions;
42  if (!fs::exists(jetveto_file))
43  BOOST_THROW_EXCEPTION( fs::filesystem_error("No such file.", jetveto_file,
44  make_error_code(errc::no_such_file_or_directory)) );
45 
46  auto f = make_unique<TFile>(jetveto_file.c_str(), "READ");
47  h = unique_ptr<TH2>(f->Get<TH2>("h2hot2"));
48  if (!h) BOOST_THROW_EXCEPTION( DE::BadInput("Veto maps can't be found in input ROOT file.", f) );
49 
50  if (h->Integral() < feps)
51  BOOST_THROW_EXCEPTION( DE::BadInput("Empty histogram.", h) );
52 
53  for (int x = 1; x <= h->GetNbinsX(); ++x)
54  for (int y = 1; y <= h->GetNbinsY(); ++y) {
55  float eff = h->GetBinContent(x,y);
56  if (0 <= eff && eff <= 1) continue;
57  BOOST_THROW_EXCEPTION( DE::BadInput("The content of the histogram does "
58  "not seem to correspond to efficiencies.", h) );
59  }
60  }

Member Function Documentation

◆ operator()()

void operator() ( DAS::RecJet jet)
inline
63  {
64  int x = h->GetXaxis()->FindBin(jet.p4.Eta()),
65  y = h->GetYaxis()->FindBin(jet.p4.Phi());
66  float eff = h->GetBinContent(x,y);
67  jet.weights *= eff;
68  }

◆ Write()

void Write ( TDirectory *  dir)
inline
71  {
72  dir->cd();
73  h->SetDirectory(dir);
74  h->Write("jetvetomap");
75  }

Member Data Documentation

◆ h

std::unique_ptr<TH2> h

jet veto map


The documentation for this struct was generated from the following file:
DAS::PhysicsObject::p4
FourVector p4
raw four-momentum directly after reconstruction
Definition: PhysicsObject.h:47
Ntupliser_cfg.f
f
Definition: Ntupliser_cfg.py:252
DAS::JetVeto::Conservative::h
std::unique_ptr< TH2 > h
jet veto map
Definition: Conservative.h:35
Darwin::Exceptions
Handling of exceptions.
Definition: darwin.h:35
DAS::PhysicsObject::weights
Weights weights
object weights
Definition: PhysicsObject.h:49
Darwin::Exceptions::BadInput
Generic exception for ill-defined input (before the event loop).
Definition: exceptions.h:68
feps
static const auto feps
Definition: Conservative.h:18