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
EMIsolatedTauJetsSelector Class Reference

#include <EMIsolatedTauJetsSelector.h>

Inheritance diagram for EMIsolatedTauJetsSelector:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EMIsolatedTauJetsSelector (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~EMIsolatedTauJetsSelector ()
 
- 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

std::vector< edm::InputTagtauSrc
 

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)
 
static void prevalidate (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 18 of file EMIsolatedTauJetsSelector.h.

Constructor & Destructor Documentation

EMIsolatedTauJetsSelector::EMIsolatedTauJetsSelector ( const edm::ParameterSet iConfig)
explicit

Definition at line 10 of file EMIsolatedTauJetsSelector.cc.

References edm::ParameterSet::getParameter(), and tauSrc.

11 {
12  tauSrc = iConfig.getParameter<std::vector< edm::InputTag > >("TauSrc");
13 
14  produces<reco::CaloJetCollection>("Isolated");
15  produces<reco::CaloJetCollection>("NotIsolated");
16 }
T getParameter(std::string const &) const
std::vector< edm::InputTag > tauSrc
EMIsolatedTauJetsSelector::~EMIsolatedTauJetsSelector ( )

Definition at line 18 of file EMIsolatedTauJetsSelector.cc.

18 { }

Member Function Documentation

void EMIsolatedTauJetsSelector::produce ( edm::Event iEvent,
const edm::EventSetup iES 
)
virtual

Implements edm::EDProducer.

Definition at line 20 of file EMIsolatedTauJetsSelector.cc.

References edm::Event::getByLabel(), i, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, alignCSCRings::s, and tauSrc.

21 {
22 
23  using namespace reco;
24  using namespace edm;
25  using namespace std;
26 
27 typedef std::vector<edm::InputTag> vtag;
28  std::auto_ptr<reco::CaloJetCollection> isolatedTaus(new CaloJetCollection);
29  std::auto_ptr<reco::CaloJetCollection> notIsolatedTaus(new CaloJetCollection);
30 
31  for( vtag::const_iterator s = tauSrc.begin(); s != tauSrc.end(); ++ s ) {
33  iEvent.getByLabel( * s, tauJets );
34  EMIsolatedTauTagInfoCollection::const_iterator i = tauJets->begin();
35  for(;i !=tauJets->end(); i++ ) {
36  double discriminator = (*i).discriminator();
37  if(discriminator > 0) {
38  const CaloJet* pippo = dynamic_cast<const CaloJet*>(i->jet().get());
39  isolatedTaus->push_back(*pippo );
40  }else{
41  const CaloJet* notPippo =dynamic_cast<const CaloJet*>(i->jet().get());
42 
43  notIsolatedTaus->push_back(*notPippo );
44  }
45  }
46  }
47 
48 
49 
50  iEvent.put(isolatedTaus, "Isolated");
51  iEvent.put(notIsolatedTaus,"NotIsolated");
52 
53 }
int i
Definition: DBlmapReader.cc:9
Jets made from CaloTowers.
Definition: CaloJet.h:30
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::vector< edm::InputTag > tauSrc
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects

Member Data Documentation

std::vector<edm::InputTag> EMIsolatedTauJetsSelector::tauSrc
private

Definition at line 25 of file EMIsolatedTauJetsSelector.h.

Referenced by EMIsolatedTauJetsSelector(), and produce().