A candidate built by adding the four-momenta of other candidates. More...
#include "UserCode/ICHiggsTauTau/interface/CompositeCandidate.hh"
Inheritance diagram for ic::CompositeCandidate:Public Types | |
| typedef std::vector< Candidate * > ::const_iterator | const_iterator |
Public Member Functions | |
| CompositeCandidate () | |
| virtual | ~CompositeCandidate () |
| virtual void | Print () const |
| void | AddCandidate (std::string name, Candidate *cand) |
| Add a new Candidate. More... | |
| Candidate * | at (std::size_t const &index) const |
| Return a Candidate* using a vector index. Will throw if index is out of range. More... | |
| Candidate * | at (std::string const &label) const |
| Return a Candidate* using a label key. Will throw if a Candidate with label does not exist. More... | |
| const_iterator | begin () const |
| Return a const_iterator to the start of the internal vector<Candidate*> More... | |
| const_iterator | end () const |
| Return a const_iterator to the end of the internal vector<Candidate*> More... | |
| std::vector< Candidate * > const & | AsVector () const |
| Return a copy of the internal vector<Candidate*> More... | |
| Candidate * | GetCandidate (std::string name) const |
| Candidate * | At (unsigned index) const |
| double | PtOf (std::string name) const |
| double | ScalarPtSum () const |
| double | DeltaR (std::string name1, std::string name2) const |
| double | DeltaPhi (std::string name1, std::string name2) const |
Public Member Functions inherited from ic::Candidate | |
| Candidate () | |
| virtual | ~Candidate () |
| ClassDef (Candidate, 2) | |
| Vector const & | vector () const |
| Four-momentum. More... | |
| std::size_t | id () const |
| Unique identifier. More... | |
| double | pt () const |
| Direct access to the \( p_{\text{T}} \). More... | |
| double | eta () const |
| Direct access to \( \eta \). More... | |
| double | phi () const |
| Direct access to \( \phi \). More... | |
| double | energy () const |
| Direct access to the energy. More... | |
| int | charge () const |
| Electric charge. More... | |
| double | M () const |
| Calculates the candidate mass. More... | |
| void | set_vector (Vector const &vector) |
| Four-momentum. More... | |
| void | set_id (std::size_t const &id) |
| Unique identifier. More... | |
| void | set_pt (double const &pt) |
| Direct access to the \( p_{\text{T}} \). More... | |
| void | set_eta (double const &eta) |
| Direct access to \( \eta \). More... | |
| void | set_phi (double const &phi) |
| Direct access to \( \phi \). More... | |
| void | set_energy (double const &energy) |
| Direct access to the energy. More... | |
| void | set_charge (int const &charge) |
| Electric charge. More... | |
A candidate built by adding the four-momenta of other candidates.
Pointers to each consituent candidate are stored, and may be retrieved either by label or by index.
Due to the non-persistent nature of the pointers stored in this class it is not possible to write a CompositeCandidate into an ntuple. Instead it should be used as an "on-the-fly" tool to combine multiple candidates during an offline analysis sequence.
Definition at line 28 of file CompositeCandidate.hh.
| typedef std::vector<Candidate*>::const_iterator ic::CompositeCandidate::const_iterator |
Definition at line 34 of file CompositeCandidate.hh.
| ic::CompositeCandidate::CompositeCandidate | ( | ) |
Definition at line 9 of file CompositeCandidate.cc.
|
virtual |
Definition at line 11 of file CompositeCandidate.cc.
|
virtual |
Reimplemented from ic::Candidate.
Definition at line 69 of file CompositeCandidate.cc.
| void ic::CompositeCandidate::AddCandidate | ( | std::string | name, |
| Candidate * | cand | ||
| ) |
|
inline |
Return a Candidate* using a vector index. Will throw if index is out of range.
Definition at line 47 of file CompositeCandidate.hh.
|
inline |
Return a Candidate* using a label key. Will throw if a Candidate with label does not exist.
Definition at line 53 of file CompositeCandidate.hh.
|
inline |
Return a const_iterator to the start of the internal vector<Candidate*>
Definition at line 58 of file CompositeCandidate.hh.
|
inline |
Return a const_iterator to the end of the internal vector<Candidate*>
Definition at line 61 of file CompositeCandidate.hh.
|
inline |
Return a copy of the internal vector<Candidate*>
Definition at line 64 of file CompositeCandidate.hh.
| Candidate * ic::CompositeCandidate::GetCandidate | ( | std::string | name | ) | const |
Definition at line 20 of file CompositeCandidate.cc.
| Candidate * ic::CompositeCandidate::At | ( | unsigned | index | ) | const |
Definition at line 28 of file CompositeCandidate.cc.
| double ic::CompositeCandidate::PtOf | ( | std::string | name | ) | const |
Definition at line 32 of file CompositeCandidate.cc.
| double ic::CompositeCandidate::ScalarPtSum | ( | ) | const |
Definition at line 40 of file CompositeCandidate.cc.
| double ic::CompositeCandidate::DeltaR | ( | std::string | name1, |
| std::string | name2 | ||
| ) | const |
Definition at line 48 of file CompositeCandidate.cc.
| double ic::CompositeCandidate::DeltaPhi | ( | std::string | name1, |
| std::string | name2 | ||
| ) | const |
Definition at line 58 of file CompositeCandidate.cc.