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::ProductRegistryHelper

Public Member Functions

 JetVetoedTracksAssociatorAtVertex (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual ~JetVetoedTracksAssociatorAtVertex ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- 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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 25 of file JetVetoedTracksAssociatorAtVertex.cc.

Constructor & Destructor Documentation

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

Definition at line 38 of file JetVetoedTracksAssociatorAtVertex.cc.

39  : mJets (fConfig.getParameter<edm::InputTag> ("jets")),
40  mTracks (fConfig.getParameter<edm::InputTag> ("tracks")),
41  mAssociator (fConfig.getParameter<double> ("coneSize")),
42  classifier(fConfig)
43 {
44  produces<reco::JetTracksAssociation::Container> ();
45 }
T getParameter(std::string const &) const
JetVetoedTracksAssociationDRVertex mAssociator
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex ( )
virtual

Definition at line 47 of file JetVetoedTracksAssociatorAtVertex.cc.

47 {}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 49 of file JetVetoedTracksAssociatorAtVertex.cc.

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

50 {
51  // Gather contextual information for TrackCategories
52  classifier.newEvent(fEvent, fSetup);
53 
55  fEvent.getByLabel (mJets, jets_h);
57  fEvent.getByLabel (mTracks, tracks_h);
58 
59  std::auto_ptr<reco::JetTracksAssociation::Container> jetTracks (new reco::JetTracksAssociation::Container (reco::JetRefBaseProd(jets_h)));
60 
61  // format inputs
62  std::vector <edm::RefToBase<reco::Jet> > allJets;
63  allJets.reserve (jets_h->size());
64  for (unsigned i = 0; i < jets_h->size(); ++i) allJets.push_back (jets_h->refAt(i));
65  std::vector <reco::TrackRef> allTracks;
66  allTracks.reserve (tracks_h->size());
67  for (unsigned i = 0; i < tracks_h->size(); ++i) allTracks.push_back (reco::TrackRef (tracks_h, i));
68  // run algo
69  mAssociator.produce (&*jetTracks, allJets, allTracks, classifier);
70  // store output
71  fEvent.put (jetTracks);
72 }
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:84
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:359
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 35 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

JetVetoedTracksAssociationDRVertex JetVetoedTracksAssociatorAtVertex::mAssociator
private

Definition at line 34 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

edm::InputTag JetVetoedTracksAssociatorAtVertex::mJets
private

Definition at line 32 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

edm::InputTag JetVetoedTracksAssociatorAtVertex::mTracks
private

Definition at line 33 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().