Mēnsūra
|
Adds a set of user-defined booleand IDs to the class Candidate. More...
#include <CandidateWithID.hpp>
Public Member Functions | |
CandidateWithID () noexcept | |
Constructor with no parameters. | |
virtual void | Reset () override |
Resets the object to a state right after the default initialisation. | |
void | SetBit (unsigned index, bool value=true) |
Sets or unsets an ID bit. More... | |
bool | TestBit (unsigned index) const |
Tests an ID bit. More... | |
![]() | |
Candidate () noexcept | |
Constructor with no parameters. More... | |
Candidate (Candidate &&)=default | |
Default move constructor. | |
Candidate (Candidate const &)=default | |
Default copy constructor. | |
Candidate & | operator= (Candidate const &)=default |
Default assignment operator. | |
virtual | ~Candidate ()=default |
Default virtual destructor. | |
void | SetPt (float pt) |
Sets transverse momentum (GeV/c) | |
void | SetEta (float eta) |
Sets pseudorapidity. | |
void | SetPhi (float phi) |
Sets azimuthal angle. More... | |
void | SetM (float mass) |
Sets mass (GeV/c^2) | |
float | Pt () const |
Returns transverse momentum (GeV/c) | |
float | Eta () const |
Returns pseudorapidity. | |
float | Phi () const |
Returns azimuthal angle. More... | |
float | M () const |
Returns mass (GeV/c^2) | |
Adds a set of user-defined booleand IDs to the class Candidate.
The ID flags are accessed by index, up to 8 flags are supported. If a flag is set to true, the candidate is supposed to be "good" in what concerns the corresponding ID.
void pec::CandidateWithID::SetBit | ( | unsigned | index, |
bool | value = true |
||
) |
Sets or unsets an ID bit.
Throws an exception if the index exceeds the maximal allowed number of flags.
bool pec::CandidateWithID::TestBit | ( | unsigned | index | ) | const |
Tests an ID bit.
Throws an exception if the index exceeds the maximal allowed number of flags.