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