Darwin  1.0
Event loop based prototype framework
Jetabstract

Description

An abstract class for jets.

#include <Objects.h>

+ Inheritance diagram for Jet:
+ Collaboration diagram for Jet:

Public Member Functions

virtual float CorrPt () const =0
 
virtual float CorrEta () const =0
 
virtual Jetoperator+= (const Jet &)
 
virtual float weight () const =0
 
void clear () override
 
 Jet ()
 
virtual ~Jet ()=default
 
- Public Member Functions inherited from FourVector
virtual float Rapidity () const
 
virtual float AbsRap () const
 
virtual FourVectoroperator+= (const ROOT::Math::PtEtaPhiM4D< float > &)
 
virtual FourVector operator+ (const ROOT::Math::PtEtaPhiM4D< float > &) const
 
 FourVector ()=default
 
 FourVector (const ROOT::Math::PtEtaPhiM4D< float > &)
 
virtual ~FourVector ()=default
 

Public Attributes

char pdgID
 
char nBHadrons
 
char nCHadrons
 
std::vector< float > scales
 
std::vector< float > weights
 

Static Public Attributes

static float R = 0.4
 

Constructor & Destructor Documentation

◆ Jet()

Jet ( )

constructor

174 : pdgID(0), nBHadrons(0), nCHadrons(0), scales(1,1), weights(1,1) { }

◆ ~Jet()

virtual ~Jet ( )
virtualdefault

destructor

Member Function Documentation

◆ clear()

void clear ( )
overridevirtual

resets all members to the same values as in the constructor

Reimplemented from FourVector.

Reimplemented in RecJet, and GenJet.

177 {
179  pdgID = 0;
180  nBHadrons = 0;
181  nCHadrons = 0;
182  weights.resize(1);
183  weights.front() = 1;
184  scales.resize(1);
185  scales.front() = 1;
186 }

◆ CorrEta()

virtual float CorrEta ( ) const
pure virtual

uses the scale internally with global index in daughter class

Implemented in RecJet, and GenJet.

◆ CorrPt()

virtual float CorrPt ( ) const
pure virtual

uses the scale internally with global index in daughter class

Implemented in RecJet, and GenJet.

◆ operator+=()

Jet & operator+= ( const Jet other)
virtual
189 {
190  if (this->weights.size() != other.weights.size() ||
191  this->scales.size() != other.scales.size())
192  BOOST_THROW_EXCEPTION(length_error("These jets have incompatible content and therefore cannot be added together."));
193 
194  float pt0 = this->Pt();
195  *dynamic_cast<FourVector*>(this) += other;
196 
197  for (size_t iWgt = 0; iWgt < weights.size(); ++iWgt)
198  this->weights[iWgt] *= other.weights[iWgt];
199 
200  if (this->Pt() > 0)
201  for (size_t iScl = 0; iScl < scales.size(); ++iScl) {
202  float pt1 = pt0 * this->scales[iScl],
203  pt2 = other.Pt()*other.scales[iScl];
204  this->scales[iScl] = (pt1+pt2) / this->Pt();
205  }
206  else fill(this->scales.begin(), this->scales.end(), 0.);
207 
208  this->nBHadrons += other.nBHadrons;
209  this->nCHadrons += other.nCHadrons;
210 
211  return *this;
212 }

◆ weight()

virtual float weight ( ) const
pure virtual

access to weight, using iWgt in daughter classes

Implemented in RecJet, and GenJet.

Member Data Documentation

◆ nBHadrons

char nBHadrons

number of B hadrons (0, 1 or 2+)

◆ nCHadrons

char nCHadrons

number of C hadrons (0, 1+ in 2017; 0, 1, 2+ in 2016)

◆ pdgID

char pdgID

pdgID (default is 0 = undefined)

◆ R

float R = 0.4
static

parameter of clustering algorithm

◆ scales

std::vector<float> scales

variations of the energy scale (e.g. JES or JER), a priori only for rec-level, but the possibility for this variable to be useful at gen level shouldn't be excluded

◆ weights

std::vector<float> weights

jet weight (typically expected to be trivial for all-flavour inclusive jet cross section)


The documentation for this struct was generated from the following files:
Darwin::Physics::FourVector::clear
virtual void clear()
resets all members to the same values as in the constructor
Definition: Objects.cc:149
Darwin::Physics::FourVector
An extended version of ROOT 4-vectors.
Definition: Objects.h:128
Darwin::Physics::Jet::pdgID
char pdgID
pdgID (default is 0 = undefined)
Definition: Objects.h:149
Darwin::Physics::Jet::weights
std::vector< float > weights
jet weight (typically expected to be trivial for all-flavour inclusive jet cross section)
Definition: Objects.h:155
Darwin::Tools::fill
@ fill
activate -f to fill the tree
Definition: Options.h:27
Darwin::Physics::Jet::nCHadrons
char nCHadrons
number of C hadrons (0, 1+ in 2017; 0, 1, 2+ in 2016)
Definition: Objects.h:151
Darwin::Physics::Jet::scales
std::vector< float > scales
Definition: Objects.h:154
Darwin::Physics::Jet::nBHadrons
char nBHadrons
number of B hadrons (0, 1 or 2+)
Definition: Objects.h:150