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:
#include <Lepjets_Event.h>
Public Member Functions | |
void | add_jet (const Lepjets_Event_Jet &jet) |
Add a new jet to the event. | |
void | add_lep (const Lepjets_Event_Lep &lep) |
Add a new lepton to the event. | |
int | cut_jets (double pt_cut, double eta_cut) |
Remove jets which fail transverse momentum and pseudorapidity cut. | |
int | cut_leps (double pt_cut, double eta_cut) |
Remove leptons which fail transverse momentum and pseudorapidity cut. | |
double | dlb () const |
Return the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment). | |
double & | dlb () |
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment). | |
double & | dnn () |
Return a reference to the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment). | |
double | dnn () const |
Return a the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment). | |
std::ostream & | dump (std::ostream &s, bool full=false) const |
Print the content of this object. | |
int & | evnum () |
Return a reference to the event number. | |
const int & | evnum () const |
Return a constant reference to the event number. | |
bool | isMC () const |
Return the Monte Carlo flag. | |
Lepjets_Event_Jet & | jet (std::vector< Lepjets_Event_Jet >::size_type i) |
Return a reference to jet at index position i. | |
const Lepjets_Event_Jet & | jet (std::vector< Lepjets_Event_Jet >::size_type i) const |
Return a constant reference to jet at index position i. | |
std::string | jet_permutation () const |
Return a string representing the jet permutation. The following notation is used for each type of jet:
| |
std::vector< int > | jet_types () const |
Return the jet types in the event. | |
Fourvec | kt () const |
Return the sum of all objects' four-momentum and missing transverse energy. | |
Resolution & | kt_res () |
Return a reference to the resolution. | |
const Resolution & | kt_res () const |
Return a const reference to the resolution. | |
Lepjets_Event_Lep & | lep (std::vector< Lepjets_Event_Lep >::size_type i) |
Return a reference to lepton at index position i. | |
const Lepjets_Event_Lep & | lep (std::vector< Lepjets_Event_Lep >::size_type i) const |
Return a constant reference to lepton at index position i. | |
Lepjets_Event (int runnum, int evnum) | |
Constructor. | |
const Fourvec & | met () const |
Return a constant reference to the missing transverse energy. | |
Fourvec & | met () |
Return a reference to the missing transverse energy. | |
std::vector< Lepjets_Event_Jet > ::size_type | njets () const |
Return the number of jets in the event. | |
std::vector< Lepjets_Event_Lep > ::size_type | nleps () const |
Return the number of leptons in the event. | |
const int & | runnum () const |
Return a constant reference to the run number. | |
int & | runnum () |
Return a reference to the run number. | |
bool | set_jet_types (const std::vector< int > &) |
Set the jet types in the event. | |
void | setMC (bool isMC) |
Set the Monte Carlo flag. | |
void | smear (CLHEP::HepRandomEngine &engine, bool smear_dir=false) |
Smear the objects in the event according to their resolutions. | |
void | sort () |
Sort objects in the event according to their transverse momentum . | |
Fourvec | sum (int type) const |
Return the sum of all objects' four-momentum which have a particular type. | |
void | trimjets (std::vector< Lepjets_Event_Jet >::size_type n) |
Remove all but the first n jets. | |
double | zvertex () const |
Return the value of z-vertex. | |
double & | zvertex () |
Return a reference to the value of z-vertex. | |
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 67 of file Lepjets_Event.h.
hitfit::Lepjets_Event::Lepjets_Event | ( | int | runnum, |
int | evnum | ||
) |
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 400 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 388 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 536 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 517 of file Lepjets_Event.cc.
References _leps.
double hitfit::Lepjets_Event::dlb | ( | ) | const |
Return the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment).
Definition at line 302 of file Lepjets_Event.cc.
References _dlb.
{ return _dlb; }
double & hitfit::Lepjets_Event::dlb | ( | ) |
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment).
Definition at line 314 of file Lepjets_Event.cc.
References _dlb.
{ return _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 338 of file Lepjets_Event.cc.
References _dnn.
{ return _dnn; }
double hitfit::Lepjets_Event::dnn | ( | ) | const |
Return a the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment).
Definition at line 326 of file Lepjets_Event.cc.
References _dnn.
{ return _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 569 of file Lepjets_Event.cc.
References full, i, and alignCSCRings::s.
Referenced by hitfit::operator<<().
{ s << "Run: " << _runnum << " Event: " << _evnum << "\n"; s << "Leptons:\n"; for (std::vector<Lepjets_Event_Lep>::size_type i=0; i < _leps.size(); i++) { s << " "; _leps[i].dump (s, full); s << "\n"; } s << "Jets:\n"; for (std::vector<Lepjets_Event_Jet>::size_type i=0; i < _jets.size(); i++) { s << " "; _jets[i].dump (s, full); s << "\n"; } s << "Missing Et: " << _met << "\n"; if (_zvertex != 0) s << "z-vertex: " << _zvertex << "\n"; return s; }
int & hitfit::Lepjets_Event::evnum | ( | ) |
Return a reference to the event number.
Definition at line 107 of file Lepjets_Event.cc.
References _evnum.
{ return _evnum; }
const int & hitfit::Lepjets_Event::evnum | ( | ) | const |
Return a constant reference to the event number.
Definition at line 95 of file Lepjets_Event.cc.
References _evnum.
{ return _evnum; }
bool hitfit::Lepjets_Event::isMC | ( | ) | const |
Return the Monte Carlo flag.
Definition at line 279 of file Lepjets_Event.cc.
References _isMC.
Referenced by setMC().
{ return _isMC; }
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 159 of file Lepjets_Event.cc.
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 |
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 601 of file Lepjets_Event.cc.
References _jets, jet(), and hitfit::jetTypeString().
std::vector< int > hitfit::Lepjets_Event::jet_types | ( | ) | const |
Return the jet types in the event.
Definition at line 450 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 372 of file Lepjets_Event.cc.
References _jets, _leps, _met, i, AlCaHLTBitMon_ParallelJobs::p, and v.
Referenced by smear().
Resolution & hitfit::Lepjets_Event::kt_res | ( | ) |
Return a reference to the resolution.
Definition at line 231 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().
{ return _kt_res; }
const Resolution & hitfit::Lepjets_Event::kt_res | ( | ) | const |
Return a const reference to the resolution.
Definition at line 243 of file Lepjets_Event.cc.
References _kt_res.
{ return _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 143 of file Lepjets_Event.cc.
Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().
const Lepjets_Event_Lep & hitfit::Lepjets_Event::lep | ( | std::vector< Lepjets_Event_Lep >::size_type | i | ) | const |
Fourvec & hitfit::Lepjets_Event::met | ( | ) |
Return a reference to the missing transverse energy.
Definition at line 207 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().
{ return _met; }
const Fourvec & hitfit::Lepjets_Event::met | ( | ) | const |
Return a constant reference to the missing transverse energy.
Definition at line 219 of file Lepjets_Event.cc.
References _met.
{ return _met; }
std::vector< Lepjets_Event_Jet >::size_type hitfit::Lepjets_Event::njets | ( | ) | const |
Return the number of jets in the event.
Definition at line 131 of file Lepjets_Event.cc.
References _jets.
Referenced by hitfit::Top_Fit::fit(), and set_jet_types().
{ return _jets.size (); }
std::vector< Lepjets_Event_Lep >::size_type hitfit::Lepjets_Event::nleps | ( | ) | const |
Return the number of leptons in the event.
Definition at line 119 of file Lepjets_Event.cc.
References _leps.
{ return _leps.size (); }
int & hitfit::Lepjets_Event::runnum | ( | ) |
Return a reference to the run number.
Definition at line 83 of file Lepjets_Event.cc.
References _runnum.
{ return _runnum; }
const int & hitfit::Lepjets_Event::runnum | ( | ) | const |
Return a constant reference to the run number.
Definition at line 71 of file Lepjets_Event.cc.
References _runnum.
{ return _runnum; }
bool hitfit::Lepjets_Event::set_jet_types | ( | const std::vector< int > & | _jet_types | ) |
Set the jet types in the event.
Definition at line 465 of file Lepjets_Event.cc.
References _jets, hitfit::hadw1_label, hitfit::hadw2_label, i, jet(), njets(), lumiQTWidget::t, and hitfit::Lepjets_Event_Lep::type().
Referenced by hitfit::RunHitFit< AElectron, AMuon, AJet, AMet >::FitAllPermutation().
{ if (_jets.size() != _jet_types.size()) { return false; } bool saw_hadw1 = false; for (std::vector<Lepjets_Event_Jet>::size_type i=0; i < njets(); i++) { int t = _jet_types[i]; if (t == hadw1_label) { if (saw_hadw1) t = hadw2_label; saw_hadw1 = true; } jet (i).type() = t; } return true; }
void hitfit::Lepjets_Event::setMC | ( | bool | isMC | ) |
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 412 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().
{ Fourvec before, after; for (std::vector<Lepjets_Event_Lep>::size_type i=0; i < _leps.size(); i++) { before += _leps[i].p(); _leps[i].smear (engine, smear_dir); after += _leps[i].p(); } for (std::vector<Lepjets_Event_Jet>::size_type i=0; i < _jets.size(); i++) { before += _jets[i].p(); _jets[i].smear (engine, smear_dir); after += _jets[i].p(); } Fourvec kt = _met + before; kt(Fourvec::X) = _kt_res.pick (kt(Fourvec::X), kt(Fourvec::X), engine); kt(Fourvec::Y) = _kt_res.pick (kt(Fourvec::Y), kt(Fourvec::Y), engine); _met = kt - after; }
void hitfit::Lepjets_Event::sort | ( | ) |
Sort objects in the event according to their transverse momentum .
Definition at line 440 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 350 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 | ) |
double & hitfit::Lepjets_Event::zvertex | ( | ) |
Return a reference to the value of z-vertex.
Definition at line 267 of file Lepjets_Event.cc.
References _zvertex.
{ return _zvertex; }
double hitfit::Lepjets_Event::zvertex | ( | ) | const |
Return the value of z-vertex.
Definition at line 255 of file Lepjets_Event.cc.
References _zvertex.
{ return _zvertex; }
double hitfit::Lepjets_Event::_dlb [private] |
The low-bias (LB) discriminant.
Definition at line 384 of file Lepjets_Event.h.
Referenced by dlb().
double hitfit::Lepjets_Event::_dnn [private] |
The neural network (NN) discriminant.
Definition at line 389 of file Lepjets_Event.h.
Referenced by dnn().
int hitfit::Lepjets_Event::_evnum [private] |
bool hitfit::Lepjets_Event::_isMC [private] |
The Monte Calro flag.
Definition at line 369 of file Lepjets_Event.h.
std::vector<Lepjets_Event_Jet> hitfit::Lepjets_Event::_jets [private] |
The list of jets in the event.
Definition at line 348 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().
Resolution hitfit::Lepjets_Event::_kt_res [private] |
The resolution.
Definition at line 359 of file Lepjets_Event.h.
std::vector<Lepjets_Event_Lep> hitfit::Lepjets_Event::_leps [private] |
The list of leptons in the event.
Definition at line 343 of file Lepjets_Event.h.
Referenced by add_lep(), cut_leps(), kt(), lep(), nleps(), smear(), and sort().
Fourvec hitfit::Lepjets_Event::_met [private] |
Missing transverse energy.
Definition at line 354 of file Lepjets_Event.h.
int hitfit::Lepjets_Event::_runnum [private] |
double hitfit::Lepjets_Event::_zvertex [private] |