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
pat::PATGenJetSlimmer Class Reference

Matcher of reconstructed objects to L1 Muons. More...

Inheritance diagram for pat::PATGenJetSlimmer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PATGenJetSlimmer (const edm::ParameterSet &iConfig)
 
virtual void produce (edm::Event &iEvent, const edm::EventSetup &iSetup)
 
virtual ~PATGenJetSlimmer ()
 
- 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

bool clearDaughters_
 reset daughters to an empty vector More...
 
StringCutObjectSelector
< reco::GenJet
cut_
 
bool dropSpecific_
 drop the specific More...
 
edm::EDGetTokenT< edm::View
< reco::GenJet > > 
src_
 

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

Matcher of reconstructed objects to L1 Muons.

Author
Giovanni Petrucciani

Definition at line 23 of file PATGenJetSlimmer.cc.

Constructor & Destructor Documentation

pat::PATGenJetSlimmer::PATGenJetSlimmer ( const edm::ParameterSet iConfig)
explicit

Definition at line 42 of file PATGenJetSlimmer.cc.

42  :
44  cut_(iConfig.getParameter<std::string>("cut")),
45  clearDaughters_(iConfig.getParameter<bool>("clearDaughters")),
46  dropSpecific_(iConfig.getParameter<bool>("dropSpecific"))
47 {
48  produces<std::vector<reco::GenJet> >();
49 }
T getParameter(std::string const &) const
StringCutObjectSelector< reco::GenJet > cut_
bool clearDaughters_
reset daughters to an empty vector
bool dropSpecific_
drop the specific
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< reco::GenJet > > src_
virtual pat::PATGenJetSlimmer::~PATGenJetSlimmer ( )
inlinevirtual

Definition at line 26 of file PATGenJetSlimmer.cc.

26 { }

Member Function Documentation

void pat::PATGenJetSlimmer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 52 of file PATGenJetSlimmer.cc.

References reco::CompositePtrCandidate::clearDaughters(), edm::Event::getByToken(), metsig::jet, dbtoconf::out, edm::Event::put(), reco::GenJet::setSpecific(), and alcazmumu_cfi::src.

52  {
53  using namespace edm;
54  using namespace std;
55 
57  iEvent.getByToken(src_, src);
58 
59  auto_ptr<vector<reco::GenJet> > out(new vector<reco::GenJet>());
60  out->reserve(src->size());
61 
62  for (View<reco::GenJet>::const_iterator it = src->begin(), ed = src->end(); it != ed; ++it) {
63  if (!cut_(*it)) continue;
64 
65  out->push_back(*it);
66  reco::GenJet & jet = out->back();
67 
68  if (clearDaughters_) {
69  jet.clearDaughters();
70  }
71  if (dropSpecific_) {
73  }
74  }
75 
76  iEvent.put(out);
77 }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
StringCutObjectSelector< reco::GenJet > cut_
bool clearDaughters_
reset daughters to an empty vector
bool dropSpecific_
drop the specific
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
Jets made from MC generator particles.
Definition: GenJet.h:24
tuple out
Definition: dbtoconf.py:99
edm::EDGetTokenT< edm::View< reco::GenJet > > src_
void clearDaughters()
clear daughter references
void setSpecific(const Specific &spec)
set the specific (note: responsibility of keeping it consistent with the jet daughers belongs to the ...
Definition: GenJet.h:80

Member Data Documentation

bool pat::PATGenJetSlimmer::clearDaughters_
private

reset daughters to an empty vector

Definition at line 35 of file PATGenJetSlimmer.cc.

StringCutObjectSelector<reco::GenJet> pat::PATGenJetSlimmer::cut_
private

Definition at line 32 of file PATGenJetSlimmer.cc.

bool pat::PATGenJetSlimmer::dropSpecific_
private

drop the specific

Definition at line 37 of file PATGenJetSlimmer.cc.

edm::EDGetTokenT<edm::View<reco::GenJet> > pat::PATGenJetSlimmer::src_
private

Definition at line 31 of file PATGenJetSlimmer.cc.