CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
JetVetoedTracksAssociatorAtVertex Class Reference
Inheritance diagram for JetVetoedTracksAssociatorAtVertex:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 JetVetoedTracksAssociatorAtVertex (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
virtual ~JetVetoedTracksAssociatorAtVertex ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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 (const std::string &iProcessName, std::vector< const char * > &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

TrackClassifier classifier
 
JetVetoedTracksAssociationDRVertex mAssociator
 
edm::InputTag mJets
 
edm::InputTag mTracks
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

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.

References mJets, and mTracks.

38  : mJets (fConfig.getParameter<edm::InputTag> ("jets")),
39  mTracks (fConfig.getParameter<edm::InputTag> ("tracks")),
40  mAssociator (fConfig.getParameter<double> ("coneSize")),
41  classifier(fConfig,consumesCollector())
42 {
43  consumes<edm::View<reco::Jet>>(mJets);
44  consumes<reco::TrackCollection>(mTracks);
45  produces<reco::JetTracksAssociation::Container> ();
46 }
T getParameter(std::string const &) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
JetVetoedTracksAssociationDRVertex mAssociator
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex ( )
virtual

Definition at line 48 of file JetVetoedTracksAssociatorAtVertex.cc.

48 {}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 50 of file JetVetoedTracksAssociatorAtVertex.cc.

References reco::JetExtendedAssociation::allJets(), muonTagProbeFilters_cff::allTracks, classifier, edm::Event::getByLabel(), i, HLT_25ns14e33_v1_cff::jetTracks, mAssociator, mJets, mTracks, TrackClassifier::newEvent(), JetVetoedTracksAssociationDRVertex::produce(), and edm::Event::put().

51 {
52  // Gather contextual information for TrackCategories
53  classifier.newEvent(fEvent, fSetup);
54 
56  fEvent.getByLabel (mJets, jets_h);
58  fEvent.getByLabel (mTracks, tracks_h);
59 
60  std::auto_ptr<reco::JetTracksAssociation::Container> jetTracks (new reco::JetTracksAssociation::Container (reco::JetRefBaseProd(jets_h)));
61 
62  // format inputs
63  std::vector <edm::RefToBase<reco::Jet> > allJets;
64  allJets.reserve (jets_h->size());
65  for (unsigned i = 0; i < jets_h->size(); ++i) allJets.push_back (jets_h->refAt(i));
66  std::vector <reco::TrackRef> allTracks;
67  allTracks.reserve (tracks_h->size());
68  for (unsigned i = 0; i < tracks_h->size(); ++i) allTracks.push_back (reco::TrackRef (tracks_h, i));
69  // run algo
70  mAssociator.produce (&*jetTracks, allJets, allTracks, classifier);
71  // store output
72  fEvent.put (jetTracks);
73 }
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
int i
Definition: DBlmapReader.cc:9
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
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

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::InputTag JetVetoedTracksAssociatorAtVertex::mJets
private
edm::InputTag JetVetoedTracksAssociatorAtVertex::mTracks
private