Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list of leptons (as represented by the Lepjets_Event_Lep class) and jets (as represented by Lepjets_Event_Jet class). Also recorded are: More...
#include <Lepjets_Event.h>
Public Member Functions | |
void | add_jet (const Lepjets_Event_Jet &jet) |
Add a new jet to the event. More... | |
void | add_lep (const Lepjets_Event_Lep &lep) |
Add a new lepton to the event. More... | |
int | cut_jets (double pt_cut, double eta_cut) |
Remove jets which fail transverse momentum and pseudorapidity cut. More... | |
int | cut_leps (double pt_cut, double eta_cut) |
Remove leptons which fail transverse momentum and pseudorapidity cut. More... | |
double & | dlb () |
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment). More... | |
double | dlb () const |
Return the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment). More... | |
double & | dnn () |
Return a reference to the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment). More... | |
double | dnn () const |
Return a the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment). More... | |
std::ostream & | dump (std::ostream &s, bool full=false) const |
Print the content of this object. More... | |
const int & | evnum () const |
Return a constant reference to the event number. More... | |
int & | evnum () |
Return a reference to the event number. More... | |
bool | isMC () const |
Return the Monte Carlo flag. More... | |
Lepjets_Event_Jet & | jet (std::vector< Lepjets_Event_Jet >::size_type i) |
Return a reference to jet at index position i. More... | |
const Lepjets_Event_Jet & | jet (std::vector< Lepjets_Event_Jet >::size_type i) const |
Return a constant reference to jet at index position i. More... | |
std::string | jet_permutation () const |
Return a string representing the jet permutation. The following notation is used for each type of jet: More... | |
std::vector< int > | jet_types () const |
Return the jet types in the event. More... | |
Fourvec | kt () const |
Return the sum of all objects' four-momentum and missing transverse energy. More... | |
Resolution & | kt_res () |
Return a reference to the resolution. More... | |
const Resolution & | kt_res () const |
Return a const reference to the resolution. More... | |
Lepjets_Event_Lep & | lep (std::vector< Lepjets_Event_Lep >::size_type i) |
Return a reference to lepton at index position i. More... | |
const Lepjets_Event_Lep & | lep (std::vector< Lepjets_Event_Lep >::size_type i) const |
Return a constant reference to lepton at index position i. More... | |
Lepjets_Event (int runnum, int evnum) | |
Constructor. More... | |
Fourvec & | met () |
Return a reference to the missing transverse energy. More... | |
const Fourvec & | met () const |
Return a constant reference to the missing transverse energy. More... | |
std::vector< Lepjets_Event_Jet > ::size_type | njets () const |
Return the number of jets in the event. More... | |
std::vector< Lepjets_Event_Lep > ::size_type | nleps () const |
Return the number of leptons in the event. More... | |
const int & | runnum () const |
Return a constant reference to the run number. More... | |
int & | runnum () |
Return a reference to the run number. More... | |
bool | set_jet_types (const std::vector< int > &) |
Set the jet types in the event. More... | |
void | setMC (bool isMC) |
Set the Monte Carlo flag. More... | |
void | smear (CLHEP::HepRandomEngine &engine, bool smear_dir=false) |
Smear the objects in the event according to their resolutions. More... | |
void | sort () |
Sort objects in the event according to their transverse momentum . More... | |
Fourvec | sum (int type) const |
Return the sum of all objects' four-momentum which have a particular type. More... | |
void | trimjets (std::vector< Lepjets_Event_Jet >::size_type n) |
Remove all but the first n jets. More... | |
double | zvertex () const |
Return the value of z-vertex. More... | |
double & | zvertex () |
Return a reference to the value of z-vertex. More... | |
Private Attributes | |
double | _dlb |
double | _dnn |
int | _evnum |
bool | _isMC |
std::vector< Lepjets_Event_Jet > | _jets |
Resolution | _kt_res |
std::vector< Lepjets_Event_Lep > | _leps |
Fourvec | _met |
int | _runnum |
double | _zvertex |
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list of leptons (as represented by the Lepjets_Event_Lep class) and jets (as represented by Lepjets_Event_Jet class). Also recorded are:
Definition at line 66 of file Lepjets_Event.h.
hitfit::Lepjets_Event::Lepjets_Event | ( | int | runnum, |
int | evnum | ||
) |
Constructor.
runnum | The run number. |
evnum | The event number. |
Definition at line 52 of file Lepjets_Event.cc.
void hitfit::Lepjets_Event::add_jet | ( | const Lepjets_Event_Jet & | jet | ) |
Add a new jet to the event.
jet | The jet to be added. |
Definition at line 399 of file Lepjets_Event.cc.
References _jets.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation(), hitfit::gentop(), and hitfit::gentth().
void hitfit::Lepjets_Event::add_lep | ( | const Lepjets_Event_Lep & | lep | ) |
Add a new lepton to the event.
lep | The lepton to be added. |
Definition at line 387 of file Lepjets_Event.cc.
References _leps.
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::AddLepton(), hitfit::gentop(), and hitfit::gentth().
int hitfit::Lepjets_Event::cut_jets | ( | double | pt_cut, |
double | eta_cut | ||
) |
Remove jets which fail transverse momentum and pseudorapidity cut.
pt_cut | Remove jets which have transverse momentum less than this value, in GeV. |
eta_cut | Remove jetss which have absolute pseudorapidity more than this value. |
Definition at line 535 of file Lepjets_Event.cc.
References _jets.
int hitfit::Lepjets_Event::cut_leps | ( | double | pt_cut, |
double | eta_cut | ||
) |
Remove leptons which fail transverse momentum and pseudorapidity cut.
pt_cut | Remove leptons which have transverse momentum less than this value, in GeV. |
eta_cut | Remove leptons which have absolute pseudorapidity more than this value. |
Definition at line 516 of file Lepjets_Event.cc.
References _leps.
double & hitfit::Lepjets_Event::dlb | ( | ) |
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment).
Definition at line 313 of file Lepjets_Event.cc.
References _dlb.
double hitfit::Lepjets_Event::dlb | ( | ) | const |
Return the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment).
Definition at line 301 of file Lepjets_Event.cc.
References _dlb.
double & hitfit::Lepjets_Event::dnn | ( | ) |
Return a reference to the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment).
Definition at line 337 of file Lepjets_Event.cc.
References _dnn.
double hitfit::Lepjets_Event::dnn | ( | ) | const |
Return a the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment).
Definition at line 325 of file Lepjets_Event.cc.
References _dnn.
std::ostream & hitfit::Lepjets_Event::dump | ( | std::ostream & | s, |
bool | full = false |
||
) | const |
Print the content of this object.
s | The output stream to which to write |
full | If TRUE, print all information about this instance of Lepjets_Event. If FALSE, print partial information about this instance of Lepjets_Event. |
Definition at line 568 of file Lepjets_Event.cc.
References full, i, and alignCSCRings::s.
Referenced by hitfit::operator<<().
const int & hitfit::Lepjets_Event::evnum | ( | ) | const |
Return a constant reference to the event number.
Definition at line 94 of file Lepjets_Event.cc.
References _evnum.
int & hitfit::Lepjets_Event::evnum | ( | ) |
Return a reference to the event number.
Definition at line 106 of file Lepjets_Event.cc.
References _evnum.
bool hitfit::Lepjets_Event::isMC | ( | ) | const |
Return the Monte Carlo flag.
Definition at line 278 of file Lepjets_Event.cc.
References _isMC.
Referenced by setMC().
Lepjets_Event_Jet & hitfit::Lepjets_Event::jet | ( | std::vector< Lepjets_Event_Jet >::size_type | i | ) |
Return a reference to jet at index position i.
i | The jet index position. |
Definition at line 158 of file Lepjets_Event.cc.
References _jets, assert(), and i.
Referenced by jet_permutation(), jet_types(), TtSemiLepHitFitProducer< LeptonCollection >::produce(), and set_jet_types().
const Lepjets_Event_Jet & hitfit::Lepjets_Event::jet | ( | std::vector< Lepjets_Event_Jet >::size_type | i | ) | const |
Return a constant reference to jet at index position i.
i | The jet index position. |
Definition at line 190 of file Lepjets_Event.cc.
std::string hitfit::Lepjets_Event::jet_permutation | ( | ) | const |
Return a string representing the jet permutation. The following notation is used for each type of jet:
Definition at line 600 of file Lepjets_Event.cc.
References _jets, jet(), hitfit::jetTypeString(), and AlCaHLTBitMon_QueryRunRegistry::string.
std::vector< int > hitfit::Lepjets_Event::jet_types | ( | ) | const |
Return the jet types in the event.
Definition at line 449 of file Lepjets_Event.cc.
References _jets, jet(), and run_regression::ret.
Referenced by hitfit::Fit_Result::jet_types().
Fourvec hitfit::Lepjets_Event::kt | ( | ) | const |
Return the sum of all objects' four-momentum and missing transverse energy.
Definition at line 371 of file Lepjets_Event.cc.
References _jets, _leps, _met, i, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::v.
Referenced by smear().
Resolution & hitfit::Lepjets_Event::kt_res | ( | ) |
Return a reference to the resolution.
Definition at line 230 of file Lepjets_Event.cc.
References _kt_res.
Referenced by hitfit::gentop(), hitfit::gentth(), hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetKtResolution(), and hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetMet().
const Resolution & hitfit::Lepjets_Event::kt_res | ( | ) | const |
Return a const reference to the resolution.
Definition at line 242 of file Lepjets_Event.cc.
References _kt_res.
Lepjets_Event_Lep & hitfit::Lepjets_Event::lep | ( | std::vector< Lepjets_Event_Lep >::size_type | i | ) |
Return a reference to lepton at index position i.
i | The lepton index position. |
Definition at line 142 of file Lepjets_Event.cc.
References _leps, assert(), and i.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
const Lepjets_Event_Lep & hitfit::Lepjets_Event::lep | ( | std::vector< Lepjets_Event_Lep >::size_type | i | ) | const |
Return a constant reference to lepton at index position i.
i | The lepton index position. |
Definition at line 174 of file Lepjets_Event.cc.
Fourvec & hitfit::Lepjets_Event::met | ( | ) |
Return a reference to the missing transverse energy.
Definition at line 206 of file Lepjets_Event.cc.
References _met.
Referenced by hitfit::Top_Fit::fit_one_perm(), hitfit::gentop(), hitfit::gentth(), hitfit::Top_Decaykin::lepw(), TtSemiLepHitFitProducer< LeptonCollection >::produce(), hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::SetMet(), hitfit::Top_Decaykin::solve_nu(), and hitfit::Top_Decaykin::solve_nu_tmass().
const Fourvec & hitfit::Lepjets_Event::met | ( | ) | const |
Return a constant reference to the missing transverse energy.
Definition at line 218 of file Lepjets_Event.cc.
References _met.
std::vector< Lepjets_Event_Jet >::size_type hitfit::Lepjets_Event::njets | ( | ) | const |
Return the number of jets in the event.
Definition at line 130 of file Lepjets_Event.cc.
References _jets.
Referenced by hitfit::Top_Fit::fit(), and set_jet_types().
std::vector< Lepjets_Event_Lep >::size_type hitfit::Lepjets_Event::nleps | ( | ) | const |
Return the number of leptons in the event.
Definition at line 118 of file Lepjets_Event.cc.
References _leps.
const int & hitfit::Lepjets_Event::runnum | ( | ) | const |
Return a constant reference to the run number.
Definition at line 70 of file Lepjets_Event.cc.
References _runnum.
int & hitfit::Lepjets_Event::runnum | ( | ) |
Return a reference to the run number.
Definition at line 82 of file Lepjets_Event.cc.
References _runnum.
bool hitfit::Lepjets_Event::set_jet_types | ( | const std::vector< int > & | _jet_types | ) |
Set the jet types in the event.
Definition at line 464 of file Lepjets_Event.cc.
References _jets, hitfit::hadw1_label, hitfit::hadw2_label, i, jet(), njets(), edmStreamStallGrapher::t, and hitfit::Lepjets_Event_Lep::type().
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
void hitfit::Lepjets_Event::setMC | ( | bool | isMC | ) |
Set the Monte Carlo flag.
Definition at line 290 of file Lepjets_Event.cc.
void hitfit::Lepjets_Event::smear | ( | CLHEP::HepRandomEngine & | engine, |
bool | smear_dir = false |
||
) |
Smear the objects in the event according to their resolutions.
engine | The underlying random number generator. |
smear_dir | If TRUE, also smear the object's direction. If FALSE, then only smear the magnitude of three-momentum. |
Definition at line 411 of file Lepjets_Event.cc.
References _jets, _kt_res, _leps, _met, i, kt(), hitfit::Resolution::pick(), and X.
Referenced by hitfit::gentop(), and hitfit::gentth().
void hitfit::Lepjets_Event::sort | ( | ) |
Sort objects in the event according to their transverse momentum .
Definition at line 439 of file Lepjets_Event.cc.
Fourvec hitfit::Lepjets_Event::sum | ( | int | type | ) | const |
Return the sum of all objects' four-momentum which have a particular type.
type | The type code of the objects to be summed up. |
Definition at line 349 of file Lepjets_Event.cc.
References i, dbtoconf::out, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by hitfit::Top_Decaykin::hadt(), hitfit::Top_Decaykin::hadw(), hitfit::Top_Decaykin::hadw1(), hitfit::Top_Decaykin::hadw2(), hitfit::Top_Decaykin::lept(), and hitfit::Top_Decaykin::solve_nu_tmass().
void hitfit::Lepjets_Event::trimjets | ( | std::vector< Lepjets_Event_Jet >::size_type | n | ) |
Remove all but the first n jets.
n | The number of jets to keep. |
Definition at line 554 of file Lepjets_Event.cc.
double hitfit::Lepjets_Event::zvertex | ( | ) | const |
double & hitfit::Lepjets_Event::zvertex | ( | ) |
Return a reference to the value of z-vertex.
Definition at line 266 of file Lepjets_Event.cc.
References _zvertex.
|
private |
The low-bias (LB) discriminant.
Definition at line 383 of file Lepjets_Event.h.
Referenced by dlb().
|
private |
The neural network (NN) discriminant.
Definition at line 388 of file Lepjets_Event.h.
Referenced by dnn().
|
private |
|
private |
The Monte Calro flag.
Definition at line 368 of file Lepjets_Event.h.
|
private |
The list of jets in the event.
Definition at line 347 of file Lepjets_Event.h.
Referenced by add_jet(), cut_jets(), jet(), jet_permutation(), jet_types(), kt(), njets(), set_jet_types(), smear(), sort(), and trimjets().
|
private |
The resolution.
Definition at line 358 of file Lepjets_Event.h.
|
private |
The list of leptons in the event.
Definition at line 342 of file Lepjets_Event.h.
Referenced by add_lep(), cut_leps(), kt(), lep(), nleps(), smear(), and sort().
|
private |
Missing transverse energy.
Definition at line 353 of file Lepjets_Event.h.
|
private |
|
private |