CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L2TauIsolationSelector.cc
Go to the documentation of this file.
3 
4 using namespace reco;
5 
7  associationInput_(iConfig.getParameter<edm::InputTag>("L2InfoAssociation")),
8  ECALIsolEt_(iConfig.getParameter<double>("ECALIsolEt")),
9  TowerIsolEt_(iConfig.getParameter<double>("TowerIsolEt")),
10  Cluster_etaRMS_(iConfig.getParameter<double>("ClusterEtaRMS")),
11  Cluster_phiRMS_(iConfig.getParameter<double>("ClusterPhiRMS")),
12  Cluster_drRMS_(iConfig.getParameter<double>("ClusterDRRMS")),
13  Cluster_nClusters_(iConfig.getParameter<int>("ClusterNClusters")),
14  JetEt_(iConfig.getParameter<double>("MinJetEt")),
15  SeedTowerEt_(iConfig.getParameter<double>("SeedTowerEt"))
16 
17 {
18 
19  produces<CaloJetCollection>("Isolated");
20 }
21 
22 
24 {
25 
26 
27 }
28 
29 
30 //
31 // member functions
32 //
33 
34 // ------------ method called to produce the data ------------
35 void
37 {
38  using namespace edm;
40 
41  iEvent.getByLabel(associationInput_ ,Imap);
42  std::auto_ptr<CaloJetCollection> l2IsolCaloJets( new CaloJetCollection );
43 
44  if(Imap->size()>0)
45  for(L2TauInfoAssociation::const_iterator p = Imap->begin();p!=Imap->end();++p)
46  {
47  //Retrieve The L2TauIsolationInfo Class from the AssociationMap
48  const L2TauIsolationInfo l2info = p->val;
49  //Retrieve the Jet
50  const CaloJet jet =*(p->key);
51 
52  //If The Cuts are Satisfied
53  if(jet.et()>JetEt_)
54  if(l2info.ecalIsolEt()< ECALIsolEt_)
55  if(l2info.seedHcalHitEt()>SeedTowerEt_)
56  if(l2info.nEcalHits() <Cluster_nClusters_)
57  if(l2info.ecalClusterShape()[0] <Cluster_etaRMS_)
58  if(l2info.ecalClusterShape()[1] <Cluster_phiRMS_)
59  if(l2info.ecalClusterShape()[2] <Cluster_drRMS_)
60  if(l2info.hcalIsolEt()<TowerIsolEt_)
61  {
62  //Retrieve the Jet From the AssociationMap
63  l2IsolCaloJets->push_back(jet);
64  }
65 
66  }
67 
68  iEvent.put(l2IsolCaloJets, "Isolated");
69 }
70 
71 // ------------ method called once each job just before starting event loop ------------
72 void
74 {
75 }
76 
77 // ------------ method called once each job just after ending the event loop ------------
78 void
80 }
81 
82 
83 
virtual double et() const GCC11_FINAL
transverse energy
Jets made from CaloTowers.
Definition: CaloJet.h:30
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
virtual void produce(edm::Event &, const edm::EventSetup &) override
L2TauIsolationSelector(const edm::ParameterSet &)
std::vector< double > ecalClusterShape() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects