CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1AnalysisL1Upgrade.cc
Go to the documentation of this file.
2 
4 {
5 }
6 
8 {
9 
10 }
11 
13 {
14  for (int ibx = em->getFirstBX(); ibx <= em->getLastBX(); ++ibx) {
15  for (l1t::EGammaBxCollection::const_iterator it=em->begin(ibx); it!=em->end(ibx) && l1upgrade_.nEGs<maxL1Upgrade; it++){
16  if (it->pt() > 0){
17  l1upgrade_.egEt .push_back(it->pt());
18  l1upgrade_.egEta.push_back(it->eta());
19  l1upgrade_.egPhi.push_back(it->phi());
20  l1upgrade_.egIEt .push_back(it->hwPt());
21  l1upgrade_.egIEta.push_back(it->hwEta());
22  l1upgrade_.egIPhi.push_back(it->hwPhi());
23  l1upgrade_.egIso.push_back(it->hwIso());
24  l1upgrade_.egBx .push_back(ibx);
25  l1upgrade_.nEGs++;
26  }
27  }
28  }
29 }
30 
31 
33 {
34  for (int ibx = tau->getFirstBX(); ibx <= tau->getLastBX(); ++ibx) {
35  for (l1t::TauBxCollection::const_iterator it=tau->begin(ibx); it!=tau->end(ibx) && l1upgrade_.nTaus<maxL1Upgrade; it++){
36  if (it->pt() > 0){
37  l1upgrade_.tauEt .push_back(it->et());
38  l1upgrade_.tauEta.push_back(it->eta());
39  l1upgrade_.tauPhi.push_back(it->phi());
40  l1upgrade_.tauIEt .push_back(it->hwPt());
41  l1upgrade_.tauIEta.push_back(it->hwEta());
42  l1upgrade_.tauIPhi.push_back(it->hwPhi());
43  l1upgrade_.tauIso.push_back(it->hwIso());
44  l1upgrade_.tauBx .push_back(ibx);
45  l1upgrade_.nTaus++;
46  }
47  }
48  }
49 }
50 
51 
53 {
54  for (int ibx = jet->getFirstBX(); ibx <= jet->getLastBX(); ++ibx) {
55  for (l1t::JetBxCollection::const_iterator it=jet->begin(ibx); it!=jet->end(ibx) && l1upgrade_.nJets<maxL1Upgrade; it++){
56  if (it->pt() > 0){
57  l1upgrade_.jetEt .push_back(it->et());
58  l1upgrade_.jetEta.push_back(it->eta());
59  l1upgrade_.jetPhi.push_back(it->phi());
60  l1upgrade_.jetIEt .push_back(it->hwPt());
61  l1upgrade_.jetIEta.push_back(it->hwEta());
62  l1upgrade_.jetIPhi.push_back(it->hwPhi());
63  l1upgrade_.jetBx .push_back(ibx);
64  l1upgrade_.nJets++;
65  }
66  }
67  }
68 }
69 
70 
72 {
73  for (int ibx = muon->getFirstBX(); ibx <= muon->getLastBX(); ++ibx) {
74  for (l1t::MuonBxCollection::const_iterator it=muon->begin(ibx); it!=muon->end(ibx) && l1upgrade_.nMuons<maxL1Upgrade; it++){
75  if (it->pt() > 0){
76  l1upgrade_.muonEt .push_back(it->et());
77  l1upgrade_.muonEta.push_back(it->eta());
78  l1upgrade_.muonPhi.push_back(it->phi());
79  l1upgrade_.muonIEt .push_back(it->hwPt());
80  l1upgrade_.muonIEta.push_back(it->hwEta());
81  l1upgrade_.muonIPhi.push_back(it->hwPhi());
82  l1upgrade_.muonChg.push_back(it->charge());
83  l1upgrade_.muonIso.push_back(it->hwIso());
84  l1upgrade_.muonQual.push_back(it->hwQual());
85  l1upgrade_.muonTfMuonIdx.push_back(it->tfMuonIndex());
86  l1upgrade_.muonBx .push_back(ibx);
87  l1upgrade_.nMuons++;
88  }
89  }
90  }
91 }
92 
94 {
95  for (int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
96  for (l1t::EtSumBxCollection::const_iterator it=sums->begin(ibx); it!=sums->end(ibx) && l1upgrade_.nSums<maxL1Upgrade; it++) {
97  int type = static_cast<int>( it->getType() );
98  l1upgrade_.sumType. push_back( type );
99  l1upgrade_.sumEt. push_back( it->et() );
100  l1upgrade_.sumPhi.push_back( it->phi() );
101  l1upgrade_.sumIEt. push_back( it->hwPt() );
102  l1upgrade_.sumIPhi.push_back( it->hwPhi() );
103  l1upgrade_.sumBx. push_back( ibx );
104  l1upgrade_.nSums++;
105  }
106  }
107 }
108 
109 
type
Definition: HCALResponse.h:21
void SetMuon(const edm::Handle< l1t::MuonBxCollection > muon, unsigned maxL1Upgrade)
void SetJet(const edm::Handle< l1t::JetBxCollection > jet, unsigned maxL1Upgrade)
void SetEm(const edm::Handle< l1t::EGammaBxCollection > em, unsigned maxL1Upgrade)
void SetTau(const edm::Handle< l1t::TauBxCollection > tau, unsigned maxL1Upgrade)
void SetSum(const edm::Handle< l1t::EtSumBxCollection > sums, unsigned maxL1Upgrade)
std::vector< EGamma >::const_iterator const_iterator
Definition: BXVector.h:20