Produces a list containing a single vertex selected by some criteria. More...
#include "PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.h"
Public Member Functions | |
virtual bool | filter (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
PATSingleVertexSelector (const edm::ParameterSet &iConfig) | |
~PATSingleVertexSelector () | |
Public Member Functions inherited from edm::stream::EDFilter<> | |
EDFilter ()=default | |
Public Member Functions inherited from edm::stream::EDFilterBase | |
EDFilterBase () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDFilterBase () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
Private Types | |
typedef StringCutObjectSelector < reco::Candidate > | CandSel |
enum | Mode { First, NearestToCand, FromCand, FromBeamSpot } |
typedef StringCutObjectSelector < reco::Vertex > | VtxSel |
Private Member Functions | |
std::auto_ptr< std::vector < reco::Vertex > > | filter_ (Mode mode, const edm::Event &iEvent, const edm::EventSetup &iSetup) |
bool | hasMode_ (Mode mode) const |
Mode | parseMode (const std::string &name) const |
Private Attributes | |
edm::EDGetTokenT< reco::BeamSpot > | beamSpotToken_ |
reco::CandidatePtr | bestCand_ |
std::vector< edm::EDGetTokenT < edm::View< reco::Candidate > > > | candidatesToken_ |
const CandSel | candPreselection_ |
bool | doFilterEvents_ |
std::vector< Mode > | modes_ |
std::vector< reco::VertexRef > | selVtxs_ |
edm::EDGetTokenT< std::vector < reco::Vertex > > | verticesToken_ |
const VtxSel | vtxPreselection_ |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDFilter<> | |
typedef CacheContexts< T...> | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T...> | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT < LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
Public Types inherited from edm::stream::EDFilterBase | |
typedef EDFilterAdaptorBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::stream::EDFilterBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
Produces a list containing a single vertex selected by some criteria.
Definition at line 28 of file PATSingleVertexSelector.h.
|
private |
Definition at line 40 of file PATSingleVertexSelector.h.
|
private |
Definition at line 39 of file PATSingleVertexSelector.h.
|
private |
Enumerator | |
---|---|
First | |
NearestToCand | |
FromCand | |
FromBeamSpot |
Definition at line 38 of file PATSingleVertexSelector.h.
|
explicit |
Definition at line 29 of file PATSingleVertexSelector.cc.
References candidatesToken_, edm::EDConsumerBase::consumes(), edm::ParameterSet::exists(), First, FromCand, edm::ParameterSet::getParameter(), hasMode_(), modes_, NearestToCand, parseMode(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, edm::vector_transform(), and verticesToken_.
PATSingleVertexSelector::~PATSingleVertexSelector | ( | ) |
Definition at line 59 of file PATSingleVertexSelector.cc.
|
overridevirtual |
Implements edm::stream::EDFilterBase.
Definition at line 68 of file PATSingleVertexSelector.cc.
References bestCand_, candidatesToken_, candPreselection_, HLT_FULL_cff::distance, doFilterEvents_, filter_(), First, FromCand, edm::Event::getByToken(), hasMode_(), modes_, NearestToCand, edm::Event::put(), query::result, selVtxs_, HLT_FULL_cff::vertices, verticesToken_, and vtxPreselection_.
|
private |
Definition at line 118 of file PATSingleVertexSelector.cc.
References funct::abs(), SiPixelRawToDigiRegional_cfi::beamSpot, beamSpotToken_, bestCand_, First, FromBeamSpot, FromCand, edm::Event::getByToken(), edm::Ref< C, T, F >::isNonnull(), edm::Ptr< T >::isNull(), NearestToCand, query::result, selVtxs_, and eostools::which().
Referenced by filter().
|
private |
Definition at line 63 of file PATSingleVertexSelector.cc.
References spr::find(), alignBH_cfg::mode, and modes_.
Referenced by filter(), and PATSingleVertexSelector().
|
private |
Definition at line 14 of file PATSingleVertexSelector.cc.
References Exception, First, FromBeamSpot, FromCand, and NearestToCand.
Referenced by PATSingleVertexSelector().
|
private |
Definition at line 53 of file PATSingleVertexSelector.h.
Referenced by filter_().
|
private |
Definition at line 56 of file PATSingleVertexSelector.h.
|
private |
Definition at line 50 of file PATSingleVertexSelector.h.
Referenced by filter(), and PATSingleVertexSelector().
|
private |
Definition at line 52 of file PATSingleVertexSelector.h.
Referenced by filter().
|
private |
Definition at line 61 of file PATSingleVertexSelector.h.
Referenced by filter().
|
private |
Definition at line 48 of file PATSingleVertexSelector.h.
Referenced by filter(), hasMode_(), and PATSingleVertexSelector().
|
private |
Definition at line 55 of file PATSingleVertexSelector.h.
|
private |
Definition at line 49 of file PATSingleVertexSelector.h.
Referenced by filter(), and PATSingleVertexSelector().
|
private |
Definition at line 51 of file PATSingleVertexSelector.h.
Referenced by filter().