43 using std::stable_sort;
127 return _leps.size ();
139 return _jets.size ();
154 assert (i <
_leps.size());
170 assert (i <
_jets.size());
186 assert (
i < _leps.size());
202 assert (
i < _jets.size());
396 _leps.push_back (lep);
408 _jets.push_back (jet);
424 _leps[
i].smear (engine, smear_dir);
429 _jets[
i].smear (engine, smear_dir);
445 std::stable_sort (
_leps.begin(),
_leps.end(), not2 (less<Lepjets_Event_Lep> ()));
446 std::stable_sort (
_jets.begin(),
_jets.end(), not2 (less<Lepjets_Event_Lep> ()));
455 std::vector<int>
ret;
457 ijet !=
_jets.size() ;
459 ret.push_back(
jet(ijet).
type());
471 if (
_jets.size() != _jet_types.size()) {
474 bool saw_hadw1 =
false;
476 int t = _jet_types[
i];
491 struct Lepjets_Event_Cutter
496 Lepjets_Event_Cutter (
double pt_cut,
double eta_cut)
499 bool operator() (
const Lepjets_Event_Lep&
l)
const;
505 bool Lepjets_Event_Cutter::operator () (
const Lepjets_Event_Lep&
l)
const
530 Lepjets_Event_Cutter (pt_cut, eta_cut)),
532 return _leps.size ();
549 Lepjets_Event_Cutter (pt_cut, eta_cut)),
551 return _jets.size ();
563 if (n >=
_jets.size())
581 s <<
"Run: " << _runnum <<
" Event: " << _evnum <<
"\n";
594 s <<
"Missing Et: " << _met <<
"\n";
596 s <<
"z-vertex: " << _zvertex <<
"\n";
611 std::string permutation;
const int & runnum() const
Return a constant reference to the run number.
double zvertex() const
Return the value of z-vertex.
void trimjets(std::vector< Lepjets_Event_Jet >::size_type n)
Remove all but the first n jets.
Fourvec kt() const
Return the sum of all objects' four-momentum and missing transverse energy.
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: ...
Lepjets_Event(int runnum, int evnum)
Constructor.
int cut_leps(double pt_cut, double eta_cut)
Remove leptons which fail transverse momentum and pseudorapidity cut.
Calculate and represent resolution for a physical quantity.
int cut_jets(double pt_cut, double eta_cut)
Remove jets which fail transverse momentum and pseudorapidity cut.
Resolution & kt_res()
Return a reference to the resolution.
bool set_jet_types(const std::vector< int > &)
Set the jet types in the event.
void add_lep(const Lepjets_Event_Lep &lep)
Add a new lepton to the event.
std::vector< Lepjets_Event_Lep > _leps
double pick(double x, double p, CLHEP::HepRandomEngine &engine) const
Generate random value from a Gaussian distribution described by this resolution. Given a value ...
Lepjets_Event_Jet & jet(std::vector< Lepjets_Event_Jet >::size_type i)
Return a reference to jet at index position i.
void setMC(bool isMC)
Set the Monte Carlo flag.
double & dnn()
Return a reference to the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment...
int & type()
Return a reference to the type code.
double & dlb()
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment)...
std::string jetTypeString(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
Represent a simple event consisting of lepton(s) and jet(s).
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.
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
std::vector< int > jet_types() const
Return the jet types in the event.
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
Fourvec sum(int type) const
Return the sum of all objects' four-momentum which have a particular type.
Fourvec & met()
Return a reference to the missing transverse energy.
Lepjets_Event_Lep & lep(std::vector< Lepjets_Event_Lep >::size_type i)
Return a reference to lepton at index position i.
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
void add_jet(const Lepjets_Event_Jet &jet)
Add a new jet to the event.
bool isMC() const
Return the Monte Carlo flag.
void sort()
Sort objects in the event according to their transverse momentum .
const int & evnum() const
Return a constant reference to the event number.
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream...
std::vector< Lepjets_Event_Jet > _jets
std::string jet_permutation() const
Return a string representing the jet permutation. The following notation is used for each type of jet...
void smear(CLHEP::HepRandomEngine &engine, bool smear_dir=false)
Smear the objects in the event according to their resolutions.