CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetVetoedTracksAssociatorAtVertex Class Reference
Inheritance diagram for JetVetoedTracksAssociatorAtVertex:
edm::stream::EDProducer<>

Public Member Functions

 JetVetoedTracksAssociatorAtVertex (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~JetVetoedTracksAssociatorAtVertex () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

TrackClassifier classifier
 
JetVetoedTracksAssociationDRVertex mAssociator
 
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
 
edm::EDGetTokenT< reco::TrackCollectionmTracks
 

Additional Inherited Members

- 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 24 of file JetVetoedTracksAssociatorAtVertex.cc.

Constructor & Destructor Documentation

◆ JetVetoedTracksAssociatorAtVertex()

JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex ( const edm::ParameterSet fConfig)

Definition at line 37 of file JetVetoedTracksAssociatorAtVertex.cc.

38  : mJets(consumes<edm::View<reco::Jet>>(fConfig.getParameter<edm::InputTag>("jets"))),
39  mTracks(consumes<reco::TrackCollection>(fConfig.getParameter<edm::InputTag>("tracks"))),
40  mAssociator(fConfig.getParameter<double>("coneSize")),
41  classifier(fConfig, consumesCollector()) {
42  produces<reco::JetTracksAssociation::Container>();
43 }

◆ ~JetVetoedTracksAssociatorAtVertex()

JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex ( )
override

Definition at line 45 of file JetVetoedTracksAssociatorAtVertex.cc.

45 {}

Member Function Documentation

◆ produce()

void JetVetoedTracksAssociatorAtVertex::produce ( edm::Event fEvent,
const edm::EventSetup fSetup 
)
override

Definition at line 47 of file JetVetoedTracksAssociatorAtVertex.cc.

47  {
48  // Gather contextual information for TrackCategories
49  classifier.newEvent(fEvent, fSetup);
50 
52  fEvent.getByToken(mJets, jets_h);
54  fEvent.getByToken(mTracks, tracks_h);
55 
56  std::unique_ptr<reco::JetTracksAssociation::Container> jetTracks(
58 
59  // format inputs
60  std::vector<edm::RefToBase<reco::Jet>> allJets;
61  allJets.reserve(jets_h->size());
62  for (unsigned i = 0; i < jets_h->size(); ++i)
63  allJets.push_back(jets_h->refAt(i));
64  std::vector<reco::TrackRef> allTracks;
65  allTracks.reserve(tracks_h->size());
66  for (unsigned i = 0; i < tracks_h->size(); ++i)
67  allTracks.push_back(reco::TrackRef(tracks_h, i));
68  // run algo
70  // store output
72 }

References reco::JetExtendedAssociation::allJets(), muonTagProbeFilters_cff::allTracks, classifier, hcaldqm::fEvent, mps_fire::i, HLT_2018_cff::jetTracks, mAssociator, mJets, eostools::move(), mTracks, TrackClassifier::newEvent(), and JetVetoedTracksAssociationDRVertex::produce().

Member Data Documentation

◆ classifier

TrackClassifier JetVetoedTracksAssociatorAtVertex::classifier
private

Definition at line 34 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

◆ mAssociator

JetVetoedTracksAssociationDRVertex JetVetoedTracksAssociatorAtVertex::mAssociator
private

Definition at line 33 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

◆ mJets

edm::EDGetTokenT<edm::View<reco::Jet> > JetVetoedTracksAssociatorAtVertex::mJets
private

Definition at line 31 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

◆ mTracks

edm::EDGetTokenT<reco::TrackCollection> JetVetoedTracksAssociatorAtVertex::mTracks
private

Definition at line 32 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

mps_fire.i
i
Definition: mps_fire.py:355
muonTagProbeFilters_cff.allTracks
allTracks
Definition: muonTagProbeFilters_cff.py:22
HLT_2018_cff.jetTracks
jetTracks
Definition: HLT_2018_cff.py:49366
edm::Handle
Definition: AssociativeIterator.h:50
JetVetoedTracksAssociatorAtVertex::classifier
TrackClassifier classifier
Definition: JetVetoedTracksAssociatorAtVertex.cc:34
edm::Ref< TrackCollection >
JetVetoedTracksAssociationDRVertex::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet >> &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
Definition: JetVetoedTracksAssociatorDRVertex.cc:6
edm::AssociationVector
Definition: AssociationVector.h:67
edm::View
Definition: CaloClusterFwd.h:14
JetVetoedTracksAssociatorAtVertex::mJets
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
Definition: JetVetoedTracksAssociatorAtVertex.cc:31
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition: TrackClassifier.cc:44
reco::JetExtendedAssociation::allJets
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
Definition: JetExtendedAssociation.cc:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
hcaldqm::fEvent
Definition: DQTask.h:32
eostools.move
def move(src, dest)
Definition: eostools.py:511
JetVetoedTracksAssociatorAtVertex::mAssociator
JetVetoedTracksAssociationDRVertex mAssociator
Definition: JetVetoedTracksAssociatorAtVertex.cc:33
edm::InputTag
Definition: InputTag.h:15
JetVetoedTracksAssociatorAtVertex::mTracks
edm::EDGetTokenT< reco::TrackCollection > mTracks
Definition: JetVetoedTracksAssociatorAtVertex.cc:32
edm::RefToBaseProd
Definition: RefToBase.h:65