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

#include <L1HLTJetsMatching.h>

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

Public Member Functions

 L1HLTJetsMatching (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~L1HLTJetsMatching ()
 
- 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
< l1extra::L1JetParticleRef
jetCandRefVec
 
edm::InputTag jetSrc
 
double mEt_Min
 
std::vector
< l1extra::L1JetParticleRef
objL1CandRefVec
 
l1extra::L1JetParticleRef tauCandRef
 
std::vector
< l1extra::L1JetParticleRef
tauCandRefVec
 
edm::InputTag tauTrigger
 

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 21 of file L1HLTJetsMatching.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file L1HLTJetsMatching.cc.

References edm::ParameterSet::getParameter().

16 {
17  jetSrc = iConfig.getParameter<InputTag>("JetSrc");
18  tauTrigger = iConfig.getParameter<InputTag>("L1TauTrigger");
19  mEt_Min = iConfig.getParameter<double>("EtMin");
20 
21  produces<CaloJetCollection>();
22 }
T getParameter(std::string const &) const
edm::InputTag jetSrc
edm::InputTag tauTrigger
L1HLTJetsMatching::~L1HLTJetsMatching ( )

Definition at line 24 of file L1HLTJetsMatching.cc.

24 { }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 26 of file L1HLTJetsMatching.cc.

References a, reco::deltaR(), f, edm::Event::getByLabel(), reco::Candidate::p4(), reco::Candidate::pt(), edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, trigger::TriggerL1CenJet, and trigger::TriggerL1TauJet.

27 {
28 
29  using namespace edm;
30  using namespace std;
31  using namespace reco;
32  using namespace trigger;
33  using namespace l1extra;
34 
35  typedef std::vector<LeafCandidate> LeafCandidateCollection;
36 
37  auto_ptr<CaloJetCollection> tauL2jets(new CaloJetCollection);
38 
39  double deltaR = 1.0;
40  double matchingR = 0.5;
41  //Getting HLT jets to be matched
43  iEvent.getByLabel( jetSrc, tauJets );
44 
45 // std::cout <<"Size of input jet collection "<<tauJets->size()<<std::endl;
46 
48  iEvent.getByLabel(tauTrigger,l1TriggeredTaus);
49 
50 
51  tauCandRefVec.clear();
52  jetCandRefVec.clear();
53 
54  l1TriggeredTaus->getObjects( trigger::TriggerL1TauJet,tauCandRefVec);
55  l1TriggeredTaus->getObjects( trigger::TriggerL1CenJet,jetCandRefVec);
56  math::XYZPoint a(0.,0.,0.);
58 
59  for( unsigned int iL1Tau=0; iL1Tau <tauCandRefVec.size();iL1Tau++)
60  {
61  for(unsigned int iJet=0;iJet<tauJets->size();iJet++)
62  {
63  //Find the relative L2TauJets, to see if it has been reconstructed
64  const Candidate & myJet = (*tauJets)[iJet];
65  deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.p4().Vect(), (tauCandRefVec[iL1Tau]->p4()).Vect());
66  if(deltaR < matchingR ) {
67  // LeafCandidate myLC(myJet);
68  CaloJet myCaloJet(myJet.p4(),a,f);
69  if(myJet.pt() > mEt_Min) {
70  // tauL2LC->push_back(myLC);
71  tauL2jets->push_back(myCaloJet);
72  }
73  break;
74  }
75  }
76  }
77 
78  for(unsigned int iL1Tau=0; iL1Tau <jetCandRefVec.size();iL1Tau++)
79  {
80  for(unsigned int iJet=0;iJet<tauJets->size();iJet++)
81  {
82  const Candidate & myJet = (*tauJets)[iJet];
83  //Find the relative L2TauJets, to see if it has been reconstructed
84  deltaR = ROOT::Math::VectorUtil::DeltaR(myJet.p4().Vect(), (jetCandRefVec[iL1Tau]->p4()).Vect());
85  if(deltaR < matchingR ) {
86  // LeafCandidate myLC(myJet);
87  CaloJet myCaloJet(myJet.p4(),a,f);
88  if(myJet.pt() > mEt_Min) {
89  //tauL2LC->push_back(myLC);
90  tauL2jets->push_back(myCaloJet);
91  }
92  break;
93  }
94  }
95  }
96 
97 
98 //std::cout <<"Size of L1HLT matched jets "<<tauL2jets->size()<<std::endl;
99 
100 iEvent.put(tauL2jets);
101 // iEvent.put(tauL2LC);
102 }
Jets made from CaloTowers.
Definition: CaloJet.h:30
virtual double pt() const =0
transverse momentum
edm::InputTag jetSrc
std::vector< l1extra::L1JetParticleRef > tauCandRefVec
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
double f[11][100]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
edm::InputTag tauTrigger
double a
Definition: hdecay.h:121
std::vector< l1extra::L1JetParticleRef > jetCandRefVec
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector

Member Data Documentation

std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::jetCandRefVec
private

Definition at line 29 of file L1HLTJetsMatching.h.

edm::InputTag L1HLTJetsMatching::jetSrc
private

Definition at line 33 of file L1HLTJetsMatching.h.

double L1HLTJetsMatching::mEt_Min
private

Definition at line 35 of file L1HLTJetsMatching.h.

std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::objL1CandRefVec
private

Definition at line 30 of file L1HLTJetsMatching.h.

l1extra::L1JetParticleRef L1HLTJetsMatching::tauCandRef
private

Definition at line 31 of file L1HLTJetsMatching.h.

std::vector<l1extra::L1JetParticleRef> L1HLTJetsMatching::tauCandRefVec
private

Definition at line 28 of file L1HLTJetsMatching.h.

edm::InputTag L1HLTJetsMatching::tauTrigger
private

Definition at line 34 of file L1HLTJetsMatching.h.