Classes defining particle candidate. The class reco::Candidate is intended to be a common class for many Physics Analysis tools.
dynamic_cast
are provided. A tag struct can be used as optional second template parameter to disambiguate between more components in a Candidate of the same type. The following example shows how to extract references to a
reco::Track
or
reco::Muon
. The following syntaxes are all equivalent:
const Candidate & cand = ...; TrackRef track1 = c.getIt is possible to access different types of components, but you have to get sure to( c ); TrackRef track2 = get ( c ); TrackRef track3 = component ::get( c );
include
the header files of the concrete candidate subclass in order to define the proper template specialization.
const Candidate & c = ...; TrackRef track = c.getIn case of multiple components of the same type, it is possible to specify an extra "tag" to disentangle the ambiguity. For instance:(); SuperClusterRef cluster = c.get (); const Candidate & g = ...; const HepMC::GenParticle * gen = g.get ();
const Candidate & muon = ...; // tracker fit: default TrackRef trackerFit = muon.get(); // stand alone muon fit TrackRef standAloneMuFit = muon.get (); // combined muon + tracker fit TrackRef combinedFit = muon.get ();
None.
Complete.
Last updated: @ L. Lista