CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L2TauRelaxingIsolationSelector.cc
Go to the documentation of this file.
1 
4 
5 using namespace reco;
6 
8  associationInput_(consumes<L2TauInfoAssociation>(iConfig.getParameter<edm::InputTag>("L2InfoAssociation"))),
9  ecalIsolEt_(iConfig.getParameter<std::vector<double> >("EcalIsolationEt")),
10  towerIsolEt_(iConfig.getParameter<std::vector<double> >("TowerIsolationEt")),
11  nClusters_(iConfig.getParameter<std::vector<double> >("NumberOfClusters")),
12  phiRMS_(iConfig.getParameter<std::vector<double> >("ClusterPhiRMS")),
13  etaRMS_(iConfig.getParameter<std::vector<double> >("ClusterEtaRMS")),
14  drRMS_(iConfig.getParameter<std::vector<double> >("ClusterDRRMS")),
15  et_(iConfig.getParameter<double>("MinJetEt")),
16  seedTowerEt_(iConfig.getParameter<double>("SeedTowerEt"))
17 {
18  produces<CaloJetCollection>("Isolated");
19 }
20 
21 
23 {
24 
25 }
26 
27 //
28 // member functions
29 //
30 
31 // ------------ method called to produce the data ------------
32 void
34 {
35  using namespace edm;
37 
38  std::auto_ptr<CaloJetCollection> l2IsolCaloJets( new CaloJetCollection );
39  iEvent.getByToken(associationInput_ ,Imap);
40 
41  if(Imap->size()>0)
42  for(L2TauInfoAssociation::const_iterator p = Imap->begin();p!=Imap->end();++p)
43  {
44  //Retrieve The L2TauIsolationInfo Class from the AssociationMap
45  const L2TauIsolationInfo l2info = p->val;
46  //Retrieve the Jet
47  const CaloJet jet =*(p->key);
48 
49  //If The Cuts are Satisfied
50  if(jet.et()>et_)
51  if(l2info.seedHcalHitEt()>seedTowerEt_)
52  if(l2info.ecalIsolEt()< ecalIsolEt_[0]+ecalIsolEt_[1]*jet.et()+ecalIsolEt_[2]*jet.et()*jet.et())
53  if(l2info.nEcalHits() <(int)(nClusters_[0]+nClusters_[1]*jet.et()+nClusters_[2]*jet.et()*jet.et()))
54  if(l2info.ecalClusterShape()[0] <etaRMS_[0]+etaRMS_[1]*jet.et()+etaRMS_[2]*jet.et()*jet.et())
55  if(l2info.ecalClusterShape()[1] <phiRMS_[0]+phiRMS_[1]*jet.et()+phiRMS_[2]*jet.et()*jet.et())
56  if(l2info.ecalClusterShape()[2] <drRMS_[0]+drRMS_[1]*jet.et()+drRMS_[2]*jet.et()*jet.et())
57  if(l2info.hcalIsolEt()<towerIsolEt_[0]+towerIsolEt_[1]*jet.et()+towerIsolEt_[2]*jet.et()*jet.et())
58  {
59  l2IsolCaloJets->push_back(jet);
60  }
61 
62  }
63 
64  iEvent.put(l2IsolCaloJets, "Isolated");
65 }
66 
67 // ------------ method called once each job just before starting event loop ------------
68 void
70 {
71 }
72 
73 // ------------ method called once each job just after ending the event loop ------------
74 void
76 }
77 
78 
79 
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual double et() const
transverse energy
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
L2TauRelaxingIsolationSelector(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:230
virtual void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
std::vector< double > ecalClusterShape() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::EDGetTokenT< reco::L2TauInfoAssociation > associationInput_