CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
PrimaryVertexSorter< ParticlesCollection > Class Template Reference

#include <PrimaryVertexSorter.h>

Inheritance diagram for PrimaryVertexSorter< ParticlesCollection >:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef edm::Association
< reco::VertexCollection
CandToVertex
 
typedef edm::ValueMap< int > CandToVertexQuality
 
typedef ParticlesCollection PFCollection
 
typedef edm::ValueMap< float > VertexScore
 
- Public Types inherited from edm::stream::EDProducer<>
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::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 PrimaryVertexSorter (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
std::vector< reco::VertexsortedList (const reco::VertexCollection &primaryVertex) const
 
 ~PrimaryVertexSorter ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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< ConsumesInfoconsumesInfo () 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 Attributes

PrimaryVertexAssignment assignmentAlgo_
 
bool produceOriginalMapping_
 
bool producePFNoPileUp_
 
bool producePFPileUp_
 
bool produceSortedVertices_
 
int qualityCut_
 
PrimaryVertexSorting sortingAlgo_
 
edm::EDGetTokenT< PFCollectiontokenCandidates_
 Candidates to be analyzed. More...
 
edm::EDGetTokenT< edm::View
< reco::Candidate > > 
tokenJets_
 
edm::EDGetTokenT
< reco::VertexCollection
tokenVertices_
 vertices More...
 
bool useMET_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::stream::EDProducerBase
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)
 

Detailed Description

template<class ParticlesCollection>
class PrimaryVertexSorter< ParticlesCollection >

Author
Andrea Rizzi

class to sort VertexCollection in decreasing order of the sum of the squared track pT's

Definition at line 32 of file PrimaryVertexSorter.h.

Member Typedef Documentation

template<class ParticlesCollection>
typedef edm::Association<reco::VertexCollection> PrimaryVertexSorter< ParticlesCollection >::CandToVertex

Definition at line 35 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
typedef edm::ValueMap<int> PrimaryVertexSorter< ParticlesCollection >::CandToVertexQuality

Definition at line 36 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
typedef ParticlesCollection PrimaryVertexSorter< ParticlesCollection >::PFCollection

Definition at line 39 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
typedef edm::ValueMap<float> PrimaryVertexSorter< ParticlesCollection >::VertexScore

Definition at line 37 of file PrimaryVertexSorter.h.

Constructor & Destructor Documentation

template<class ParticlesCollection >
PrimaryVertexSorter< ParticlesCollection >::PrimaryVertexSorter ( const edm::ParameterSet iConfig)
explicit

Definition at line 81 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
PrimaryVertexSorter< ParticlesCollection >::~PrimaryVertexSorter ( )
inline

Definition at line 43 of file PrimaryVertexSorter.h.

Member Function Documentation

template<class ParticlesCollection >
void PrimaryVertexSorter< ParticlesCollection >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::stream::EDProducerBase.

Definition at line 133 of file PrimaryVertexSorter.h.

Referenced by JSONExport.JsonExport::export().

template<class ParticlesCollection>
VertexCollection PrimaryVertexSorter< ParticlesCollection >::sortedList ( const reco::VertexCollection primaryVertex) const

Definition at line 8 of file PrimaryVertexSorter.cc.

9 {
10  VertexCollection pvs = unsortedPVColl;
11  sort(pvs.begin(), pvs.end(), VertexHigherPtSquared());
12  return pvs;
13 }
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9

Member Data Documentation

template<class ParticlesCollection>
PrimaryVertexAssignment PrimaryVertexSorter< ParticlesCollection >::assignmentAlgo_
private

Definition at line 49 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
bool PrimaryVertexSorter< ParticlesCollection >::produceOriginalMapping_
private

Definition at line 59 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
bool PrimaryVertexSorter< ParticlesCollection >::producePFNoPileUp_
private

Definition at line 62 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
bool PrimaryVertexSorter< ParticlesCollection >::producePFPileUp_
private

Definition at line 61 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
bool PrimaryVertexSorter< ParticlesCollection >::produceSortedVertices_
private

Definition at line 60 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
int PrimaryVertexSorter< ParticlesCollection >::qualityCut_
private

Definition at line 63 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
PrimaryVertexSorting PrimaryVertexSorter< ParticlesCollection >::sortingAlgo_
private

Definition at line 50 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
edm::EDGetTokenT<PFCollection> PrimaryVertexSorter< ParticlesCollection >::tokenCandidates_
private

Candidates to be analyzed.

Definition at line 53 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
edm::EDGetTokenT<edm::View<reco::Candidate> > PrimaryVertexSorter< ParticlesCollection >::tokenJets_
private

Definition at line 57 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
edm::EDGetTokenT<reco::VertexCollection> PrimaryVertexSorter< ParticlesCollection >::tokenVertices_
private

vertices

Definition at line 56 of file PrimaryVertexSorter.h.

template<class ParticlesCollection>
bool PrimaryVertexSorter< ParticlesCollection >::useMET_
private

Definition at line 64 of file PrimaryVertexSorter.h.