#include <CommonTools/RecoUtils/plugins/PFCand_NoPU_WithAM.cc>
Public Member Functions | |
PF_PU_AssoMap (const edm::ParameterSet &) | |
~PF_PU_AssoMap () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::InputTag | input_AssociationType_ |
edm::InputTag | input_TrackCollection_ |
Description: Produces a map with association between tracks and their particular most probable vertex with a quality of this association
Description: Produces collection of tracks associated to the first vertex based on the pf_pu Association Map
Description: Produces a collection of PFCandidates associated to the first vertex based on the association map
Definition at line 41 of file PF_PU_AssoMap.h.
PF_PU_AssoMap::PF_PU_AssoMap | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 26 of file PF_PU_AssoMap.cc.
References gather_cfg::cout, edm::ParameterSet::getParameter(), input_AssociationType_, input_TrackCollection_, and edm::InputTag::label().
:PF_PU_AssoMapAlgos(iConfig) { //now do what ever other initialization is needed input_AssociationType_ = iConfig.getParameter<edm::InputTag>("AssociationType"); input_TrackCollection_ = iConfig.getParameter<edm::InputTag>("TrackCollection"); //register your products if ( input_AssociationType_.label() == "TracksToVertex" ) { produces<TrackToVertexAssMap>(); } else { if ( input_AssociationType_.label() == "VertexToTracks" ) { produces<VertexToTrackAssMap>(); } else { if ( input_AssociationType_.label() == "Both" ) { produces<TrackToVertexAssMap>(); produces<VertexToTrackAssMap>(); } else { std::cout << "No correct InputTag for AssociationType!" << std::endl; std::cout << "Won't produce any AssociationMap!" << std::endl; } } } }
PF_PU_AssoMap::~PF_PU_AssoMap | ( | ) |
Definition at line 57 of file PF_PU_AssoMap.cc.
{ // do anything here that needs to be done at destruction time // (e.g. close files, deallocate resources etc.) }
void PF_PU_AssoMap::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 102 of file PF_PU_AssoMap.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); }
void PF_PU_AssoMap::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 72 of file PF_PU_AssoMap.cc.
References PF_PU_AssoMapAlgos::CreateTrackToVertexMap(), PF_PU_AssoMapAlgos::CreateVertexToTrackMap(), edm::Event::getByLabel(), PF_PU_AssoMapAlgos::GetInputCollections(), input_AssociationType_, input_TrackCollection_, edm::InputTag::label(), edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and PF_PU_AssoMapAlgos::SortAssociationMap().
{ using namespace edm; using namespace std; using namespace reco; //get the input track collection Handle<TrackCollection> trkcollH; iEvent.getByLabel(input_TrackCollection_, trkcollH); string asstype = input_AssociationType_.label(); PF_PU_AssoMapAlgos::GetInputCollections(iEvent,iSetup); if ( ( asstype == "TracksToVertex" ) || ( asstype == "Both" ) ) { auto_ptr<TrackToVertexAssMap> Track2Vertex = CreateTrackToVertexMap(trkcollH, iSetup); iEvent.put( SortAssociationMap( &(*Track2Vertex) ) ); } if ( ( asstype == "VertexToTracks" ) || ( asstype == "Both" ) ) { auto_ptr<VertexToTrackAssMap> Vertex2Track = CreateVertexToTrackMap(trkcollH, iSetup); iEvent.put( Vertex2Track ); } }
Definition at line 53 of file PF_PU_AssoMap.h.
Referenced by PF_PU_AssoMap(), and produce().
Definition at line 55 of file PF_PU_AssoMap.h.
Referenced by PF_PU_AssoMap(), and produce().