CMS 3D CMS Logo

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

#include <Validation/RecoVertex/src/PrimaryVertexAnalyzer4PUSlimmed.cc>

Inheritance diagram for PrimaryVertexAnalyzer4PUSlimmed:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  recoPrimaryVertex
 
struct  simPrimaryVertex
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 PrimaryVertexAnalyzer4PUSlimmed (const edm::ParameterSet &)
 
 ~PrimaryVertexAnalyzer4PUSlimmed ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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 Types

typedef math::XYZTLorentzVector LorentzVector
 
enum  SignalVertexKind { HIGHEST_PT = 0, IS_ASSOC2FIRST_RECO = 1, IS_ASSOC2ANY_RECO = 2 }
 

Private Member Functions

void calculatePurityAndFillHistograms (const std::string &, std::vector< recoPrimaryVertex > &, int, bool)
 
template<class T >
void computePairDistance (const T &collection, MonitorElement *me)
 
void fillGenAssociatedRecoVertexHistograms (const std::string &, int, recoPrimaryVertex &v)
 
void fillGenericGenVertexHistograms (const simPrimaryVertex &v)
 
void fillRecoAssociatedGenVertexHistograms (const std::string &, const simPrimaryVertex &v)
 
void fillResolutionAndPullHistograms (const std::string &, int, recoPrimaryVertex &v)
 
std::vector
< PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex
getRecoPVs (const edm::Handle< edm::View< reco::Vertex >> &)
 
std::vector
< PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex
getSimPVs (const edm::Handle< TrackingVertexCollection > &)
 
void matchReco2SimVertices (std::vector< recoPrimaryVertex > &, const reco::VertexRecoToSimCollection &, const std::vector< simPrimaryVertex > &)
 
bool matchRecoTrack2SimSignal (const reco::TrackBaseRef &)
 
void matchSim2RecoVertices (std::vector< simPrimaryVertex > &, const reco::VertexSimToRecoCollection &)
 
void resetSimPVAssociation (std::vector< simPrimaryVertex > &)
 

Private Attributes

double abs_z_match_
 
edm::EDGetTokenT< edm::View
< reco::Track > > 
edmView_recoTrack_Token_
 
std::map< std::string,
std::map< std::string,
MonitorElement * > > 
mes_
 
const reco::RecoToSimCollectionr2s_
 
std::vector< edm::EDGetTokenT
< edm::View< reco::Vertex > > > 
reco_vertex_collection_tokens_
 
std::vector< edm::InputTagreco_vertex_collections_
 
edm::EDGetTokenT
< reco::RecoToSimCollection
recoToSimAssociationToken_
 
edm::EDGetTokenT
< reco::TrackCollection
recoTrackCollectionToken_
 
std::string root_folder_
 
const reco::SimToRecoCollections2r_
 
double sigma_z_match_
 
edm::EDGetTokenT
< reco::SimToRecoCollection
simToRecoAssociationToken_
 
edm::EDGetTokenT
< TrackingParticleCollection
trackingParticleCollectionToken_
 
edm::EDGetTokenT
< TrackingVertexCollection
trackingVertexCollectionToken_
 
bool use_only_charged_tracks_
 
edm::EDGetTokenT< std::vector
< PileupSummaryInfo > > 
vecPileupSummaryInfoToken_
 
bool verbose_
 
edm::EDGetTokenT
< reco::VertexToTrackingVertexAssociator
vertexAssociatorToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
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::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
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

Description: primary vertex analyzer for events with pile-up

Implementation: <Notes on="" implementation>="">

Definition at line 63 of file PrimaryVertexAnalyzer4PUSlimmed.h.

Member Typedef Documentation

Definition at line 64 of file PrimaryVertexAnalyzer4PUSlimmed.h.

Member Enumeration Documentation

Enumerator
HIGHEST_PT 
IS_ASSOC2FIRST_RECO 
IS_ASSOC2ANY_RECO 

Definition at line 66 of file PrimaryVertexAnalyzer4PUSlimmed.h.

Constructor & Destructor Documentation

PrimaryVertexAnalyzer4PUSlimmed::PrimaryVertexAnalyzer4PUSlimmed ( const edm::ParameterSet )
explicit
PrimaryVertexAnalyzer4PUSlimmed::~PrimaryVertexAnalyzer4PUSlimmed ( )

Member Function Documentation

virtual void PrimaryVertexAnalyzer4PUSlimmed::analyze ( const edm::Event ,
const edm::EventSetup  
)
overridevirtual
virtual void PrimaryVertexAnalyzer4PUSlimmed::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

void PrimaryVertexAnalyzer4PUSlimmed::calculatePurityAndFillHistograms ( const std::string &  ,
std::vector< recoPrimaryVertex > &  ,
int  ,
bool   
)
private
template<class T >
void PrimaryVertexAnalyzer4PUSlimmed::computePairDistance ( const T collection,
MonitorElement me 
)
private
void PrimaryVertexAnalyzer4PUSlimmed::fillGenAssociatedRecoVertexHistograms ( const std::string &  ,
int  ,
recoPrimaryVertex v 
)
private
void PrimaryVertexAnalyzer4PUSlimmed::fillGenericGenVertexHistograms ( const simPrimaryVertex v)
private
void PrimaryVertexAnalyzer4PUSlimmed::fillRecoAssociatedGenVertexHistograms ( const std::string &  ,
const simPrimaryVertex v 
)
private
void PrimaryVertexAnalyzer4PUSlimmed::fillResolutionAndPullHistograms ( const std::string &  ,
int  ,
recoPrimaryVertex v 
)
private
std::vector<PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex> PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs ( const edm::Handle< edm::View< reco::Vertex >> &  )
private
std::vector<PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex> PrimaryVertexAnalyzer4PUSlimmed::getSimPVs ( const edm::Handle< TrackingVertexCollection > &  )
private
void PrimaryVertexAnalyzer4PUSlimmed::matchReco2SimVertices ( std::vector< recoPrimaryVertex > &  ,
const reco::VertexRecoToSimCollection ,
const std::vector< simPrimaryVertex > &   
)
private
bool PrimaryVertexAnalyzer4PUSlimmed::matchRecoTrack2SimSignal ( const reco::TrackBaseRef )
private
void PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices ( std::vector< simPrimaryVertex > &  ,
const reco::VertexSimToRecoCollection  
)
private
void PrimaryVertexAnalyzer4PUSlimmed::resetSimPVAssociation ( std::vector< simPrimaryVertex > &  )
private

Member Data Documentation

double PrimaryVertexAnalyzer4PUSlimmed::abs_z_match_
private

Definition at line 177 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT< edm::View<reco::Track> > PrimaryVertexAnalyzer4PUSlimmed::edmView_recoTrack_Token_
private

Definition at line 188 of file PrimaryVertexAnalyzer4PUSlimmed.h.

std::map<std::string, std::map<std::string, MonitorElement*> > PrimaryVertexAnalyzer4PUSlimmed::mes_
private

Definition at line 180 of file PrimaryVertexAnalyzer4PUSlimmed.h.

const reco::RecoToSimCollection* PrimaryVertexAnalyzer4PUSlimmed::r2s_
private

Definition at line 181 of file PrimaryVertexAnalyzer4PUSlimmed.h.

std::vector<edm::EDGetTokenT<edm::View<reco::Vertex> > > PrimaryVertexAnalyzer4PUSlimmed::reco_vertex_collection_tokens_
private

Definition at line 185 of file PrimaryVertexAnalyzer4PUSlimmed.h.

std::vector<edm::InputTag > PrimaryVertexAnalyzer4PUSlimmed::reco_vertex_collections_
private

Definition at line 186 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<reco::RecoToSimCollection> PrimaryVertexAnalyzer4PUSlimmed::recoToSimAssociationToken_
private

Definition at line 192 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<reco::TrackCollection> PrimaryVertexAnalyzer4PUSlimmed::recoTrackCollectionToken_
private

Definition at line 187 of file PrimaryVertexAnalyzer4PUSlimmed.h.

std::string PrimaryVertexAnalyzer4PUSlimmed::root_folder_
private

Definition at line 178 of file PrimaryVertexAnalyzer4PUSlimmed.h.

const reco::SimToRecoCollection* PrimaryVertexAnalyzer4PUSlimmed::s2r_
private

Definition at line 182 of file PrimaryVertexAnalyzer4PUSlimmed.h.

double PrimaryVertexAnalyzer4PUSlimmed::sigma_z_match_
private

Definition at line 176 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<reco::SimToRecoCollection> PrimaryVertexAnalyzer4PUSlimmed::simToRecoAssociationToken_
private

Definition at line 191 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<TrackingParticleCollection> PrimaryVertexAnalyzer4PUSlimmed::trackingParticleCollectionToken_
private

Definition at line 189 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<TrackingVertexCollection> PrimaryVertexAnalyzer4PUSlimmed::trackingVertexCollectionToken_
private

Definition at line 190 of file PrimaryVertexAnalyzer4PUSlimmed.h.

bool PrimaryVertexAnalyzer4PUSlimmed::use_only_charged_tracks_
private

Definition at line 175 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT< std::vector<PileupSummaryInfo> > PrimaryVertexAnalyzer4PUSlimmed::vecPileupSummaryInfoToken_
private

Definition at line 184 of file PrimaryVertexAnalyzer4PUSlimmed.h.

bool PrimaryVertexAnalyzer4PUSlimmed::verbose_
private

Definition at line 174 of file PrimaryVertexAnalyzer4PUSlimmed.h.

edm::EDGetTokenT<reco::VertexToTrackingVertexAssociator> PrimaryVertexAnalyzer4PUSlimmed::vertexAssociatorToken_
private

Definition at line 193 of file PrimaryVertexAnalyzer4PUSlimmed.h.