CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetSignalVertexCompatibility Class Reference

#include <JetSignalVertexCompatibility.h>

Inheritance diagram for JetSignalVertexCompatibility:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 JetSignalVertexCompatibility (const edm::ParameterSet &params)
 
void produce (edm::Event &event, const edm::EventSetup &es) override
 
 ~JetSignalVertexCompatibility () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

reco::JetSignalVertexCompatibilityAlgo algo
 
edm::EDGetTokenT< reco::JetTracksAssociationCollectionjetTracksAssocToken
 
edm::EDGetTokenT< reco::VertexCollectionprimaryVerticesToken
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 14 of file JetSignalVertexCompatibility.h.

Constructor & Destructor Documentation

◆ JetSignalVertexCompatibility()

JetSignalVertexCompatibility::JetSignalVertexCompatibility ( const edm::ParameterSet params)

Definition at line 25 of file JetSignalVertexCompatibility.cc.

26  : algo(params.getParameter<double>("cut"), params.getParameter<double>("temperature")) {
27  jetTracksAssocToken = consumes<JetTracksAssociationCollection>(params.getParameter<edm::InputTag>("jetTracksAssoc"));
28  primaryVerticesToken = consumes<VertexCollection>(params.getParameter<edm::InputTag>("primaryVertices"));
29  produces<JetFloatAssociation::Container>();
30 }

References jetTracksAssocToken, CalibrationSummaryClient_cfi::params, and primaryVerticesToken.

◆ ~JetSignalVertexCompatibility()

JetSignalVertexCompatibility::~JetSignalVertexCompatibility ( )
override

Definition at line 32 of file JetSignalVertexCompatibility.cc.

32 {}

Member Function Documentation

◆ produce()

void JetSignalVertexCompatibility::produce ( edm::Event event,
const edm::EventSetup es 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 34 of file JetSignalVertexCompatibility.cc.

34  {
36  es.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilder);
37 
38  algo.resetEvent(trackBuilder.product());
39 
41  event.getByToken(jetTracksAssocToken, jetTracksAssoc);
42 
44  event.getByToken(primaryVerticesToken, primaryVertices);
45 
46  auto result = std::make_unique<JetFloatAssociation::Container>(jetTracksAssoc->keyProduct());
47 
49  ++iter) {
50  if (primaryVertices->empty())
51  (*result)[iter->first] = -1.;
52 
53  const TrackRefVector &tracks = iter->second;
54  std::vector<float> compatibility = algo.compatibility(*primaryVertices, tracks);
55 
56  // the first vertex is the presumed signal vertex
57  (*result)[iter->first] = compatibility[0];
58  }
59 
60  algo.resetEvent(nullptr);
61 
62  event.put(std::move(result));
63 }

References algo, reco::JetSignalVertexCompatibilityAlgo::compatibility(), edm::EventSetup::get(), get, ic5JetVertexCompatibility_cfi::jetTracksAssoc, jetTracksAssocToken, eostools::move(), HLT_FULL_cff::primaryVertices, primaryVerticesToken, edm::ESHandle< T >::product(), reco::JetSignalVertexCompatibilityAlgo::resetEvent(), mps_fire::result, and tracks.

Member Data Documentation

◆ algo

reco::JetSignalVertexCompatibilityAlgo JetSignalVertexCompatibility::algo
private

Definition at line 22 of file JetSignalVertexCompatibility.h.

Referenced by produce().

◆ jetTracksAssocToken

edm::EDGetTokenT<reco::JetTracksAssociationCollection> JetSignalVertexCompatibility::jetTracksAssocToken
private

Definition at line 24 of file JetSignalVertexCompatibility.h.

Referenced by JetSignalVertexCompatibility(), and produce().

◆ primaryVerticesToken

edm::EDGetTokenT<reco::VertexCollection> JetSignalVertexCompatibility::primaryVerticesToken
private

Definition at line 25 of file JetSignalVertexCompatibility.h.

Referenced by JetSignalVertexCompatibility(), and produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
reco::JetSignalVertexCompatibilityAlgo::compatibility
std::vector< float > compatibility(const reco::VertexCollection &vertices, const reco::TrackRefVector &tracks) const
Definition: JetSignalVertexCompatibilityAlgo.cc:63
edm::RefVector< TrackCollection >
edm::Handle
Definition: AssociativeIterator.h:50
reco::JetSignalVertexCompatibilityAlgo::resetEvent
void resetEvent(const TransientTrackBuilder *trackBuilder)
Definition: JetSignalVertexCompatibilityAlgo.cc:91
JetSignalVertexCompatibility::primaryVerticesToken
edm::EDGetTokenT< reco::VertexCollection > primaryVerticesToken
Definition: JetSignalVertexCompatibility.h:25
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TransientTrackRecord
Definition: TransientTrackRecord.h:11
edm::ESHandle< TransientTrackBuilder >
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
JetSignalVertexCompatibility::algo
reco::JetSignalVertexCompatibilityAlgo algo
Definition: JetSignalVertexCompatibility.h:22
edm::AssociationVector::const_iterator
transient_vector_type::const_iterator const_iterator
Definition: AssociationVector.h:106
get
#define get
eostools.move
def move(src, dest)
Definition: eostools.py:511
mps_fire.result
result
Definition: mps_fire.py:311
JetSignalVertexCompatibility::jetTracksAssocToken
edm::EDGetTokenT< reco::JetTracksAssociationCollection > jetTracksAssocToken
Definition: JetSignalVertexCompatibility.h:24
HLT_FULL_cff.primaryVertices
primaryVertices
Definition: HLT_FULL_cff.py:51939
edm::InputTag
Definition: InputTag.h:15
ic5JetVertexCompatibility_cfi.jetTracksAssoc
jetTracksAssoc
Definition: ic5JetVertexCompatibility_cfi.py:8