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.
2 
3 using namespace reco;
4 
6  associationInput_(consumes<L2TauInfoAssociation>(iConfig.getParameter<edm::InputTag>("L2InfoAssociation"))),
7  ECALIsolEt_(iConfig.getParameter<double>("ECALIsolEt")),
8  TowerIsolEt_(iConfig.getParameter<double>("TowerIsolEt")),
9  Cluster_etaRMS_(iConfig.getParameter<double>("ClusterEtaRMS")),
10  Cluster_phiRMS_(iConfig.getParameter<double>("ClusterPhiRMS")),
11  Cluster_drRMS_(iConfig.getParameter<double>("ClusterDRRMS")),
12  Cluster_nClusters_(iConfig.getParameter<int>("ClusterNClusters")),
13  JetEt_(iConfig.getParameter<double>("MinJetEt")),
14  SeedTowerEt_(iConfig.getParameter<double>("SeedTowerEt"))
15 
16 {
17 
18  produces<CaloJetCollection>("Isolated");
19 }
20 
21 
23 {
24 
25 
26 }
27 
28 
29 //
30 // member functions
31 //
32 
33 // ------------ method called to produce the data ------------
34 void
36 {
37  using namespace edm;
39 
40  iEvent.getByToken(associationInput_ ,Imap);
41  std::auto_ptr<CaloJetCollection> l2IsolCaloJets( new CaloJetCollection );
42 
43  if(Imap->size()>0)
44  for(L2TauInfoAssociation::const_iterator p = Imap->begin();p!=Imap->end();++p)
45  {
46  //Retrieve The L2TauIsolationInfo Class from the AssociationMap
47  const L2TauIsolationInfo l2info = p->val;
48  //Retrieve the Jet
49  const CaloJet jet =*(p->key);
50 
51  //If The Cuts are Satisfied
52  if(jet.et()>JetEt_)
53  if(l2info.ecalIsolEt()< ECALIsolEt_)
54  if(l2info.seedHcalHitEt()>SeedTowerEt_)
55  if(l2info.nEcalHits() <Cluster_nClusters_)
56  if(l2info.ecalClusterShape()[0] <Cluster_etaRMS_)
57  if(l2info.ecalClusterShape()[1] <Cluster_phiRMS_)
58  if(l2info.ecalClusterShape()[2] <Cluster_drRMS_)
59  if(l2info.hcalIsolEt()<TowerIsolEt_)
60  {
61  //Retrieve the Jet From the AssociationMap
62  l2IsolCaloJets->push_back(jet);
63  }
64 
65  }
66 
67  iEvent.put(l2IsolCaloJets, "Isolated");
68 }
69 
70 // ------------ method called once each job just before starting event loop ------------
71 void
73 {
74 }
75 
76 // ------------ method called once each job just after ending the event loop ------------
77 void
79 }
80 
81 
82 
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:449
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::L2TauInfoAssociation > associationInput_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
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