CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L2TauModularIsolationSelector.cc
Go to the documentation of this file.
1 
4 
5 using namespace reco;
6 
8  associationInput_(iConfig.getParameter<edm::InputTag>("L2InfoAssociation")),
9 
10  ecalIsolEt_(iConfig.getParameter<std::vector<double> >("EcalIsolationEt")),
11  nEcalClusters_(iConfig.getParameter<std::vector<double> >("NumberOfECALClusters")),
12  ecalClusterPhiRMS_(iConfig.getParameter<std::vector<double> >("ECALClusterPhiRMS")),
13  ecalClusterEtaRMS_(iConfig.getParameter<std::vector<double> >("ECALClusterEtaRMS")),
14  ecalClusterDrRMS_(iConfig.getParameter<std::vector<double> >("ECALClusterDRRMS")),
15  hcalIsolEt_(iConfig.getParameter<std::vector<double> >("HcalIsolationEt")),
16  nHcalClusters_(iConfig.getParameter<std::vector<double> >("NumberOfHCALClusters")),
17  hcalClusterPhiRMS_(iConfig.getParameter<std::vector<double> >("HCALClusterPhiRMS")),
18  hcalClusterEtaRMS_(iConfig.getParameter<std::vector<double> >("HCALClusterEtaRMS")),
19  hcalClusterDrRMS_(iConfig.getParameter<std::vector<double> >("HCALClusterDRRMS")),
20  et_(iConfig.getParameter<double>("MinJetEt")),
21  seedTowerEt_(iConfig.getParameter<double>("SeedTowerEt"))
22 {
23  produces<CaloJetCollection>("Isolated");
24 }
25 
26 
28 {
29 
30 }
31 
32 //
33 // member functions
34 //
35 
36 // ------------ method called to produce the data ------------
37 void
39 {
40  using namespace edm;
42 
43  std::auto_ptr<CaloJetCollection> l2IsolCaloJets( new CaloJetCollection );
44  iEvent.getByLabel(associationInput_ ,Imap);
45 
46  if(Imap->size()>0)
47  for(L2TauInfoAssociation::const_iterator p = Imap->begin();p!=Imap->end();++p)
48  {
49  //Retrieve The L2TauIsolationInfo Class from the AssociationMap
50  const L2TauIsolationInfo l2info = p->val;
51  //Retrieve the Jet
52  const CaloJet jet =*(p->key);
53 
54  //If The Cuts are Satisfied
55  if(jet.et()>et_)
56  if(l2info.seedHcalHitEt()>seedTowerEt_)
57  if(l2info.ecalIsolEt()< ecalIsolEt_[0]+ecalIsolEt_[1]*jet.et()+ecalIsolEt_[2]*jet.et()*jet.et())
58  if(l2info.nEcalHits() <(int)(nEcalClusters_[0]+nEcalClusters_[1]*jet.et()+nEcalClusters_[2]*jet.et()*jet.et()))
59  if(l2info.ecalClusterShape()[0] <ecalClusterEtaRMS_[0]+ecalClusterEtaRMS_[1]*jet.et()+ecalClusterEtaRMS_[2]*jet.et()*jet.et())
60  if(l2info.ecalClusterShape()[1] <ecalClusterPhiRMS_[0]+ecalClusterPhiRMS_[1]*jet.et()+ecalClusterPhiRMS_[2]*jet.et()*jet.et())
61  if(l2info.ecalClusterShape()[2] <ecalClusterDrRMS_[0]+ecalClusterDrRMS_[1]*jet.et()+ecalClusterDrRMS_[2]*jet.et()*jet.et())
62  if(l2info.hcalIsolEt()<hcalIsolEt_[0]+hcalIsolEt_[1]*jet.et()+hcalIsolEt_[2]*jet.et()*jet.et())
63  if(l2info.nHcalHits() <(int)(nHcalClusters_[0]+nHcalClusters_[1]*jet.et()+nHcalClusters_[2]*jet.et()*jet.et()))
64  if(l2info.hcalClusterShape()[0] <hcalClusterEtaRMS_[0]+hcalClusterEtaRMS_[1]*jet.et()+hcalClusterEtaRMS_[2]*jet.et()*jet.et())
65  if(l2info.hcalClusterShape()[1] <hcalClusterPhiRMS_[0]+hcalClusterPhiRMS_[1]*jet.et()+hcalClusterPhiRMS_[2]*jet.et()*jet.et())
66  if(l2info.hcalClusterShape()[2] <hcalClusterDrRMS_[0]+hcalClusterDrRMS_[1]*jet.et()+hcalClusterDrRMS_[2]*jet.et()*jet.et())
67  {
68  l2IsolCaloJets->push_back(jet);
69  }
70 
71  }
72 
73  iEvent.put(l2IsolCaloJets, "Isolated");
74 }
75 
76 // ------------ method called once each job just before starting event loop ------------
77 void
79 {
80 }
81 
82 // ------------ method called once each job just after ending the event loop ------------
83 void
85 }
86 
87 
88 
Jets made from CaloTowers.
Definition: CaloJet.h:30
virtual double et() const
transverse energy
L2TauModularIsolationSelector(const edm::ParameterSet &)
std::vector< double > hcalClusterShape() const
virtual void produce(edm::Event &, const edm::EventSetup &)
int iEvent
Definition: GenABIO.cc:243
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< double > ecalClusterShape() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects