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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 ( 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 {
43  produces<reco::JetTracksAssociation::Container> ();
44 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackCollection > mTracks
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
JetVetoedTracksAssociationDRVertex mAssociator
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex ( )
override

Definition at line 46 of file JetVetoedTracksAssociatorAtVertex.cc.

46 {}

Member Function Documentation

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

Definition at line 48 of file JetVetoedTracksAssociatorAtVertex.cc.

References reco::JetExtendedAssociation::allJets(), allTracks_cfi::allTracks, classifier, DEFINE_FWK_MODULE, edm::Event::getByToken(), mps_fire::i, impactParameterTagInfos_cfi::jetTracks, mAssociator, mJets, eostools::move(), mTracks, TrackClassifier::newEvent(), JetVetoedTracksAssociationDRVertex::produce(), and edm::Event::put().

49 {
50  // Gather contextual information for TrackCategories
51  classifier.newEvent(fEvent, fSetup);
52 
54  fEvent.getByToken (mJets, jets_h);
56  fEvent.getByToken (mTracks, tracks_h);
57 
58  std::unique_ptr<reco::JetTracksAssociation::Container> jetTracks (new reco::JetTracksAssociation::Container (reco::JetRefBaseProd(jets_h)));
59 
60  // format inputs
61  std::vector <edm::RefToBase<reco::Jet> > allJets;
62  allJets.reserve (jets_h->size());
63  for (unsigned i = 0; i < jets_h->size(); ++i) 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) allTracks.push_back (reco::TrackRef (tracks_h, i));
67  // run algo
68  mAssociator.produce (&*jetTracks, allJets, allTracks, classifier);
69  // store output
70  fEvent.put(std::move(jetTracks));
71 }
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
edm::EDGetTokenT< reco::TrackCollection > mTracks
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
JetVetoedTracksAssociationDRVertex mAssociator
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

TrackClassifier JetVetoedTracksAssociatorAtVertex::classifier
private

Definition at line 34 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

JetVetoedTracksAssociationDRVertex JetVetoedTracksAssociatorAtVertex::mAssociator
private

Definition at line 33 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

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

Definition at line 31 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

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

Definition at line 32 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().