Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ic::EventInfo Class Reference

Stores core event information such as run, lumi and event number, as well as event weights and filter results. More...

#include "UserCode/ICHiggsTauTau/interface/EventInfo.hh"

Public Member Functions

 EventInfo ()
 
virtual ~EventInfo ()
 
virtual void Print () const
 
 ClassDef (EventInfo, 7)
 
Properties
bool is_data () const
 If event is real data returns true, otherwise false More...
 
unsigned long long event () const
 Event number. More...
 
int run () const
 Run number. More...
 
int lumi_block () const
 Lumisection number. More...
 
int bunch_crossing () const
 Bunch crossing number. More...
 
double jet_rho () const
 Energy density used for the jet energy corrections in this event. More...
 
double lepton_rho () const
 Energy density used for calculating lepton isolation in this event. More...
 
double gen_ht () const
 Generator level HT, used for combining HT binned samples with inclusive samples. More...
 
double gen_mll () const
 Generator level M_ll. More...
 
unsigned n_outgoing_partons () const
 Number of outgoing partons at generator level, used for combining n-jet binned samples with inclusive samples. More...
 
unsigned good_vertices () const
 Number of reconstructed vertices passing some baseline quality requirements. More...
 
Setters
void set_is_data (bool const &is_data)
 If event is real data returns true, otherwise false More...
 
void set_event (unsigned long long const &event)
 Event number. More...
 
void set_run (int const &run)
 Run number. More...
 
void set_lumi_block (int const &lumi_block)
 Lumisection number. More...
 
void set_bunch_crossing (int const &bunch_crossing)
 Bunch crossing number. More...
 
void set_jet_rho (double const &jet_rho)
 Energy density used for the jet energy corrections in this event. More...
 
void set_lepton_rho (double const &lepton_rho)
 Energy density used for calculating lepton isolation in this event. More...
 
void set_gen_ht (double const &gen_ht)
 Generator level HT, used for combining HT binned samples with inclusive samples. More...
 
void set_gen_mll (double const &gen_mll)
 Generator level M_ll. More...
 
void set_n_outgoing_partons (unsigned const &n_outgoing_partons)
 Number of outgoing partons at generator level, used for combining n-jet binned samples with inclusive samples. More...
 
void set_good_vertices (unsigned const &good_vertices)
 Number of reconstructed vertices passing some baseline quality requirements. More...
 
Event weights
double weight (std::string label) const
 Get the the value of a specific weight. More...
 
bool weight_defined (std::string label) const
 Check if a specific weight is defined. More...
 
void set_weight (std::string const &label, double const &weight, bool const &enabled)
 Add a new weight, overriding any existing value with the same label. More...
 
void set_weight (std::string label, double const &weight)
 Add a new weight. More...
 
double total_weight () const
 Calculate the product of all stored and enabled weights. More...
 
bool weight_is_enabled (std::string label)
 Return true if the weight with label is enabled, false otherwise. More...
 
void enable_weight (std::string label)
 Enable the weight with label in the total_weight() calculation. More...
 
void disable_weight (std::string label)
 Disable the weight with label in the total_weight() calculation. More...
 
Event filters
std::map< std::size_t, float >
const & 
filters () const
 Get the map containing all filter results. The map key is the hash of the original string chosen to identify each filter. More...
 
void set_filters (std::map< std::size_t, float > const &filters)
 Set the complete filter result map to a new value. More...
 
void set_filter_result (std::string const &label, bool const &result)
 Set the filter result for label to result, overwriting any existing filter result with this label. More...
 
bool filter_result (std::string const &label)
 Get the filter result for label, return true if not defined. More...
 
bool total_filter_result () const
 Returns true if all filter results are true, false otherwise. More...
 

Detailed Description

Stores core event information such as run, lumi and event number, as well as event weights and filter results.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 21 of file EventInfo.hh.

Constructor & Destructor Documentation

ic::EventInfo::EventInfo ( )

Definition at line 5 of file EventInfo.cc.

ic::EventInfo::~EventInfo ( )
virtual

Definition at line 18 of file EventInfo.cc.

Member Function Documentation

void ic::EventInfo::Print ( ) const
virtual

Definition at line 20 of file EventInfo.cc.

bool ic::EventInfo::is_data ( ) const
inline

If event is real data returns true, otherwise false

Definition at line 35 of file EventInfo.hh.

unsigned long long ic::EventInfo::event ( ) const
inline

Event number.

Definition at line 38 of file EventInfo.hh.

int ic::EventInfo::run ( ) const
inline

Run number.

Definition at line 41 of file EventInfo.hh.

int ic::EventInfo::lumi_block ( ) const
inline

Lumisection number.

Definition at line 44 of file EventInfo.hh.

int ic::EventInfo::bunch_crossing ( ) const
inline

Bunch crossing number.

Definition at line 47 of file EventInfo.hh.

double ic::EventInfo::jet_rho ( ) const
inline

Energy density used for the jet energy corrections in this event.

Definition at line 50 of file EventInfo.hh.

double ic::EventInfo::lepton_rho ( ) const
inline

Energy density used for calculating lepton isolation in this event.

Definition at line 53 of file EventInfo.hh.

double ic::EventInfo::gen_ht ( ) const
inline

Generator level HT, used for combining HT binned samples with inclusive samples.

Definition at line 56 of file EventInfo.hh.

double ic::EventInfo::gen_mll ( ) const
inline

Generator level M_ll.

Definition at line 60 of file EventInfo.hh.

unsigned ic::EventInfo::n_outgoing_partons ( ) const
inline

Number of outgoing partons at generator level, used for combining n-jet binned samples with inclusive samples.

Definition at line 63 of file EventInfo.hh.

unsigned ic::EventInfo::good_vertices ( ) const
inline

Number of reconstructed vertices passing some baseline quality requirements.

Definition at line 67 of file EventInfo.hh.

void ic::EventInfo::set_is_data ( bool const &  is_data)
inline

If event is real data returns true, otherwise false

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 73 of file EventInfo.hh.

void ic::EventInfo::set_event ( unsigned long long const &  event)
inline

Event number.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 76 of file EventInfo.hh.

void ic::EventInfo::set_run ( int const &  run)
inline

Run number.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 79 of file EventInfo.hh.

void ic::EventInfo::set_lumi_block ( int const &  lumi_block)
inline

Lumisection number.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 82 of file EventInfo.hh.

void ic::EventInfo::set_bunch_crossing ( int const &  bunch_crossing)
inline

Bunch crossing number.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 87 of file EventInfo.hh.

void ic::EventInfo::set_jet_rho ( double const &  jet_rho)
inline

Energy density used for the jet energy corrections in this event.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 92 of file EventInfo.hh.

void ic::EventInfo::set_lepton_rho ( double const &  lepton_rho)
inline

Energy density used for calculating lepton isolation in this event.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 95 of file EventInfo.hh.

void ic::EventInfo::set_gen_ht ( double const &  gen_ht)
inline

Generator level HT, used for combining HT binned samples with inclusive samples.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 100 of file EventInfo.hh.

void ic::EventInfo::set_gen_mll ( double const &  gen_mll)
inline

Generator level M_ll.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 104 of file EventInfo.hh.

void ic::EventInfo::set_n_outgoing_partons ( unsigned const &  n_outgoing_partons)
inline

Number of outgoing partons at generator level, used for combining n-jet binned samples with inclusive samples.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 107 of file EventInfo.hh.

void ic::EventInfo::set_good_vertices ( unsigned const &  good_vertices)
inline

Number of reconstructed vertices passing some baseline quality requirements.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 110 of file EventInfo.hh.

double ic::EventInfo::weight ( std::string  label) const
inline

Get the the value of a specific weight.

Returns
The value of the weight if defined, 1.0 otherwise

Definition at line 121 of file EventInfo.hh.

bool ic::EventInfo::weight_defined ( std::string  label) const
inline

Check if a specific weight is defined.

Returns
true if defined, false otherwise

Definition at line 135 of file EventInfo.hh.

void ic::EventInfo::set_weight ( std::string const &  label,
double const &  weight,
bool const &  enabled 
)
inline

Add a new weight, overriding any existing value with the same label.

Parameters
labelThe weight label
weightThe weight value
enabledWhether the weight should be enabled when calculating the total_weight()
Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 146 of file EventInfo.hh.

void ic::EventInfo::set_weight ( std::string  label,
double const &  weight 
)
inline

Add a new weight.

If label begins with the character '!' this weight will be disabled when calculating the total_weight(), and the '!' will be stripped from the stored label

Parameters
labelThe weight label
weightThe weight value

Definition at line 165 of file EventInfo.hh.

double ic::EventInfo::total_weight ( ) const
inline

Calculate the product of all stored and enabled weights.

Definition at line 184 of file EventInfo.hh.

bool ic::EventInfo::weight_is_enabled ( std::string  label)
inline

Return true if the weight with label is enabled, false otherwise.

Definition at line 198 of file EventInfo.hh.

void ic::EventInfo::enable_weight ( std::string  label)
inline

Enable the weight with label in the total_weight() calculation.

Definition at line 207 of file EventInfo.hh.

void ic::EventInfo::disable_weight ( std::string  label)
inline

Disable the weight with label in the total_weight() calculation.

Definition at line 214 of file EventInfo.hh.

std::map<std::size_t, float> const& ic::EventInfo::filters ( ) const
inline

Get the map containing all filter results. The map key is the hash of the original string chosen to identify each filter.

Definition at line 225 of file EventInfo.hh.

void ic::EventInfo::set_filters ( std::map< std::size_t, float > const &  filters)
inline

Set the complete filter result map to a new value.

Definition at line 230 of file EventInfo.hh.

void ic::EventInfo::set_filter_result ( std::string const &  label,
bool const &  result 
)
inline

Set the filter result for label to result, overwriting any existing filter result with this label.

Examples:
plugins/ICEventInfoProducer.cc.

Definition at line 236 of file EventInfo.hh.

bool ic::EventInfo::filter_result ( std::string const &  label)
inline

Get the filter result for label, return true if not defined.

Definition at line 241 of file EventInfo.hh.

bool ic::EventInfo::total_filter_result ( ) const
inline

Returns true if all filter results are true, false otherwise.

Definition at line 252 of file EventInfo.hh.

ic::EventInfo::ClassDef ( EventInfo  ,
 
)

The documentation for this class was generated from the following files: