/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Candidate/doc/Candidate.doc
96 строк
4 KB
Giulio Eulisse
Snapshot of CMSSW_6_2_0_pre8.
26 июн 2013, 18:12
26 июн 2013, 18:12
214ab73
Код
Авторство
О чём код?
/*! \page DataFormats_Candidate Package DataFormats/Candidate <center> <small> <a href=http://cmsdoc.cern.ch/swdev/viewcvs/viewcvs.cgi/CMSSW/DataFormats/Candidate/?cvsroot=CMSSW>CVS head for this package</a> - <a href=http://cmsdoc.cern.ch/swdev/viewcvs/viewcvs.cgi/CMSSW/DataFormats/Candidate/.admin/developers?rev=HEAD&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup>Administrative privileges</a> </small> </center> \section desc Description Classes defining particle candidate. The class reco::Candidate is intended to be a common class for many Physics Analysis tools. \subsection interface Public interface - reco::Particle: a reconstructed particle with momentum 4-vector, a vertex and an electric charge. - reco::Candidate: a generic reconstructed particle candidates. It adds to reco::Particle interface for navigation among constituents. Utilities to extract components from a reco::Candidate avoiding explicit <tt>dynamic_cast</tt> 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: \htmlonly <pre> const Candidate & cand = ...; TrackRef track1 = c.get<TrackRef>( c ); TrackRef track2 = get<TrackRef>( c ); TrackRef track3 = component<TrackRef>::get( c ); </pre> \endhtmlonly It is possible to access different types of components, but you have to get sure to <tt>#include</tt> the header files of the concrete candidate subclass in order to define the proper template specialization. \htmlonly <pre> const Candidate & c = ...; TrackRef track = c.get<TrackRef>(); SuperClusterRef cluster = c.get<SuperClusterRef>(); const Candidate & g = ...; const HepMC::GenParticle * gen = g.get<const HepMC::GenParticle *>(); </pre> \endhtmlonly In case of multiple components of the same type, it is possible to specify an extra "tag" to disentangle the ambiguity. For instance: \htmlonly <pre> const Candidate & muon = ...; // tracker fit: default TrackRef trackerFit = muon.get<TrackRef>(); // stand alone muon fit TrackRef standAloneMuFit = muon.get<TrackRef, StandAloneMuonTag>(); // combined muon + tracker fit TrackRef combinedFit = muon.get<TrackRef, CombinedMuonTag>(); </pre> \endhtmlonly - reco::LeafCandidate: a reco::Candidate with no component nor daughters. Suitable to store just 4-vector, vertex and electric charge. - reco::CompositeCandidate: a composite reco::Candidate where the daughters are owned by the composite candidate. - reco::CompositeRefCandidate: a composite reco::Candidate where the daughters have persistent references (edm::RefVector <b><...></b>) to reco::Candidate stored in a separate collection. - reco::CompositeRefBaseCandidate: a composite reco::Candidate where the daughters have persistent references (edm::RefToBase <b><...></b>) to reco::Candidate stored in a separate collection of concrete types. - reco::ShallowCloneCandidate: a candidate with a reference to a "master clone". All methods, except the kinematics, that is copied, are delegated to the master clone. - OverlapChecker: utility to check overlap between two candidates, looking for a common component recursively along daughters. \subsection typedefs - reco::CandidateCollection: collection of reco::Candidate objects - reco::CandidateRef: persistent reference to a reco::Candidate object - reco::CandidateBaseRef: persistent reference to a reco::Candidate object as base class - reco::CandidateRefProd: reference to a reco::Candidate collection - reco::CandidateRefVector: vector of references to reco::Candidate objects in the same collection - reco::candidate_iterator: iterator over a vector of references to reco::Candidate objects in the same collection - reco::CandMatchMap: one-to-one candidate association map by reference \subsection modules Modules None. \subsection tests Unit tests and examples - <b>testParticle</b>: test reco::Particle class - <b>testCompositeCandidate</b>: test reco::CompositeCandidate class - <b>testSetup</b>: test reco::Setup mechanism \section status Status and planned development Complete. <hr> Last updated: @DATE@ L. Lista */