Get track history and classification by proxy. More...
#include <VertexClassifierByProxy.h>
Public Types | |
typedef edm::AssociationMap < edm::OneToMany< Collection, reco::VertexCollection > > | Association |
Association type. | |
Public Member Functions | |
VertexClassifierByProxy < Collection > const & | evaluate (TrackingVertexRef const &vertex) |
Classify the TrackingVertex in categories. | |
VertexClassifierByProxy < Collection > const & | evaluate (edm::Ref< Collection > const &vertex) |
Classify any vertexes in categories. | |
VertexClassifierByProxy < Collection > const & | evaluate (edm::Ref< Collection > const &vertex, std::size_t index) |
Classify any vertexes in categories. | |
virtual void | newEvent (edm::Event const &event, edm::EventSetup const &config) |
Pre-process event information (for accessing reconstraction information). | |
VertexClassifierByProxy (edm::ParameterSet const &config) | |
Constructor by ParameterSet. | |
Private Attributes | |
const edm::InputTag | proxy_ |
edm::Handle< Association > | proxyHandler_ |
Get track history and classification by proxy.
Definition at line 11 of file VertexClassifierByProxy.h.
typedef edm::AssociationMap<edm::OneToMany<Collection, reco::VertexCollection> > VertexClassifierByProxy< Collection >::Association |
Association type.
Definition at line 17 of file VertexClassifierByProxy.h.
VertexClassifierByProxy< Collection >::VertexClassifierByProxy | ( | edm::ParameterSet const & | config | ) | [inline] |
Constructor by ParameterSet.
Definition at line 20 of file VertexClassifierByProxy.h.
: VertexClassifier(config), proxy_( config.getUntrackedParameter<edm::InputTag>("vertexProducer") ) {}
VertexClassifierByProxy<Collection> const& VertexClassifierByProxy< Collection >::evaluate | ( | TrackingVertexRef const & | vertex | ) | [inline] |
Classify the TrackingVertex in categories.
Reimplemented from VertexClassifier.
Definition at line 33 of file VertexClassifierByProxy.h.
Referenced by recoBSVTagInfoValidationAnalyzer::analyze(), SVTagInfoValidationAnalyzer::analyze(), and VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::evaluate().
{ VertexClassifier::evaluate(vertex); return *this; }
VertexClassifierByProxy<Collection> const& VertexClassifierByProxy< Collection >::evaluate | ( | edm::Ref< Collection > const & | vertex | ) | [inline] |
Classify any vertexes in categories.
Definition at line 64 of file VertexClassifierByProxy.h.
{ const reco::VertexRefVector * vertexes = 0; try { // Get a reference to the vector of associated vertexes vertexes = &(proxyHandler_->find(vertex)->val); } catch (edm::Exception& e) { // If association fails define the vertex as unknown reset(); unknownVertex(); return *this; } // Loop over all the associated vertexes for (std::size_t index = 0; index < vertexes->size(); ++index) { // Copy the last status for all the flags Flags flags(flags_); // Evaluate the history for a given index VertexClassifier::evaluate( vertexes->at(index) ); // Combine OR the flag information for (std::size_t i = 0; i < flags_.size(); ++i) flags_[i] = flags_[i] | flags[i]; } return *this; }
VertexClassifierByProxy<Collection> const& VertexClassifierByProxy< Collection >::evaluate | ( | edm::Ref< Collection > const & | vertex, |
std::size_t | index | ||
) | [inline] |
Classify any vertexes in categories.
Definition at line 40 of file VertexClassifierByProxy.h.
{ const reco::VertexRefVector * vertexes = 0; try { // Get a reference to the vector of associated vertexes vertexes = &(proxyHandler_->find(vertex)->val); } catch (edm::Exception& e) { // If association fails define the vertex as unknown reset(); unknownVertex(); return *this; } // Evaluate the history for a given index VertexClassifier::evaluate( vertexes->at(index) ); return *this; }
virtual void VertexClassifierByProxy< Collection >::newEvent | ( | edm::Event const & | event, |
edm::EventSetup const & | config | ||
) | [inline, virtual] |
Pre-process event information (for accessing reconstraction information).
Reimplemented from VertexClassifier.
Definition at line 24 of file VertexClassifierByProxy.h.
Referenced by recoBSVTagInfoValidationAnalyzer::analyze(), SVTagInfoValidationAnalyzer::analyze(), and VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::newEvent().
{ // Get the association part of the proxy to the collection event.getByLabel(proxy_, proxyHandler_); // Call the previous new event VertexClassifier::newEvent(event, config); }
const edm::InputTag VertexClassifierByProxy< Collection >::proxy_ [private] |
Definition at line 100 of file VertexClassifierByProxy.h.
Referenced by VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::newEvent().
edm::Handle<Association> VertexClassifierByProxy< Collection >::proxyHandler_ [private] |
Definition at line 102 of file VertexClassifierByProxy.h.
Referenced by VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::evaluate(), and VertexClassifierByProxy< reco::SecondaryVertexTagInfoCollection >::newEvent().