Software Training Day
6th January 1999
A Beta Candidiate is a representation of what is known or assumed about some (putative) particle. Candidates can represent
Candidates are represented by the BtaCandidate class. The interface is the same for all types of data (miniDST, DST, reconstruction output), though with different amounts of detail accessible.
Lists of BtaCandidates are stored in the event (eg. charged tracks, muon candidates).
Basic information about the candidate can be accessed directly, eg.
and similarly using other member functions such asconst BtaCandidate* cand; // point cand at some BtaCandidate. double trackMomentum= cand->p();
which access charge etc. at the origin or decay vertex.double charge() const double energy() const double mass() const Hep3Vector p3() const HepLorentzVector p4() const
Additional member functions provide access to
In many cases, the BtaCandidate member function just returns a pointer to another object which (if available) can be used to access the required information (eg. cand->recoTrk() returns a const TrkRecoTrk*, which can in turn be used to obtain hit lists, fit results, etc.)
Two BtaCandidates can be combined using an operator, eg.
combines BtaCandidates c1 and c2 to give the (putative) mother, c3. BtaOpAdd4 specifies a simple kinematic addition. Proper vertex fitting is explained elsewhere.BtaOpAdd4 op; BtaCandidate c3= op.combine( c1, c2 );
Obtaining just the mother's 4-vector is even simpler
HepLorentzVectorQ vec= c1 + c2;
BtaCandidates can be copied, compared, and printed using the normal C++ operators (=, ==, <<, etc.).
Although BtaCandidates contain a lot of information, copying is fast (implemented using a "smart pointer").