CMS 3D CMS Logo

L1AnalysisL1Upgrade.cc
Go to the documentation of this file.
2 
4 
6 
8  for (int ibx = em->getFirstBX(); ibx <= em->getLastBX(); ++ibx) {
10  it != em->end(ibx) && l1upgrade_.nEGs < maxL1Upgrade;
11  it++) {
12  if (it->pt() > 0) {
13  l1upgrade_.egEt.push_back(it->pt());
14  l1upgrade_.egEta.push_back(it->eta());
15  l1upgrade_.egPhi.push_back(it->phi());
16  l1upgrade_.egIEt.push_back(it->hwPt());
17  l1upgrade_.egIEta.push_back(it->hwEta());
18  l1upgrade_.egIPhi.push_back(it->hwPhi());
19  l1upgrade_.egIso.push_back(it->hwIso());
20  l1upgrade_.egBx.push_back(ibx);
21  l1upgrade_.egTowerIPhi.push_back(it->towerIPhi());
22  l1upgrade_.egTowerIEta.push_back(it->towerIEta());
23  l1upgrade_.egRawEt.push_back(it->rawEt());
24  l1upgrade_.egIsoEt.push_back(it->isoEt());
25  l1upgrade_.egFootprintEt.push_back(it->footprintEt());
26  l1upgrade_.egNTT.push_back(it->nTT());
27  l1upgrade_.egShape.push_back(it->shape());
28  l1upgrade_.egTowerHoE.push_back(it->towerHoE());
29  l1upgrade_.egHwQual.push_back(it->hwQual());
30  l1upgrade_.nEGs++;
31  }
32  }
33  }
34 }
35 
37  for (int ibx = tau->getFirstBX(); ibx <= tau->getLastBX(); ++ibx) {
38  for (l1t::TauBxCollection::const_iterator it = tau->begin(ibx);
39  it != tau->end(ibx) && l1upgrade_.nTaus < maxL1Upgrade;
40  it++) {
41  if (it->pt() > 0) {
42  l1upgrade_.tauEt.push_back(it->et());
43  l1upgrade_.tauEta.push_back(it->eta());
44  l1upgrade_.tauPhi.push_back(it->phi());
45  l1upgrade_.tauIEt.push_back(it->hwPt());
46  l1upgrade_.tauIEta.push_back(it->hwEta());
47  l1upgrade_.tauIPhi.push_back(it->hwPhi());
48  l1upgrade_.tauIso.push_back(it->hwIso());
49  l1upgrade_.tauBx.push_back(ibx);
50  l1upgrade_.tauTowerIPhi.push_back(it->towerIPhi());
51  l1upgrade_.tauTowerIEta.push_back(it->towerIEta());
52  l1upgrade_.tauRawEt.push_back(it->rawEt());
53  l1upgrade_.tauIsoEt.push_back(it->isoEt());
54  l1upgrade_.tauNTT.push_back(it->nTT());
55  l1upgrade_.tauHasEM.push_back(it->hasEM());
56  l1upgrade_.tauIsMerged.push_back(it->isMerged());
57  l1upgrade_.tauHwQual.push_back(it->hwQual());
58  l1upgrade_.nTaus++;
59  }
60  }
61  }
62 }
63 
65  for (int ibx = jet->getFirstBX(); ibx <= jet->getLastBX(); ++ibx) {
66  for (l1t::JetBxCollection::const_iterator it = jet->begin(ibx);
67  it != jet->end(ibx) && l1upgrade_.nJets < maxL1Upgrade;
68  it++) {
69  if (it->pt() > 0) {
70  l1upgrade_.jetEt.push_back(it->et());
71  l1upgrade_.jetEta.push_back(it->eta());
72  l1upgrade_.jetPhi.push_back(it->phi());
73  l1upgrade_.jetIEt.push_back(it->hwPt());
74  l1upgrade_.jetIEta.push_back(it->hwEta());
75  l1upgrade_.jetIPhi.push_back(it->hwPhi());
76  l1upgrade_.jetBx.push_back(ibx);
77  l1upgrade_.jetRawEt.push_back(it->rawEt());
78  l1upgrade_.jetSeedEt.push_back(it->seedEt());
79  l1upgrade_.jetTowerIEta.push_back(it->towerIEta());
80  l1upgrade_.jetTowerIPhi.push_back(it->towerIPhi());
81  l1upgrade_.jetPUEt.push_back(it->puEt());
82  l1upgrade_.jetPUDonutEt0.push_back(it->puDonutEt(0));
83  l1upgrade_.jetPUDonutEt1.push_back(it->puDonutEt(1));
84  l1upgrade_.jetPUDonutEt2.push_back(it->puDonutEt(2));
85  l1upgrade_.jetPUDonutEt3.push_back(it->puDonutEt(3));
86  l1upgrade_.nJets++;
87  }
88  }
89  }
90 }
91 
93  for (int ibx = muon->getFirstBX(); ibx <= muon->getLastBX(); ++ibx) {
94  for (l1t::MuonBxCollection::const_iterator it = muon->begin(ibx);
95  it != muon->end(ibx) && l1upgrade_.nMuons < maxL1Upgrade;
96  it++) {
97  if (it->pt() > 0) {
98  l1upgrade_.muonEt.push_back(it->et());
99  l1upgrade_.muonEtUnconstrained.push_back(it->ptUnconstrained());
100  l1upgrade_.muonEta.push_back(it->eta());
101  l1upgrade_.muonPhi.push_back(it->phi());
102  l1upgrade_.muonEtaAtVtx.push_back(it->etaAtVtx());
103  l1upgrade_.muonPhiAtVtx.push_back(it->phiAtVtx());
104  l1upgrade_.muonIEt.push_back(it->hwPt());
105  l1upgrade_.muonIEtUnconstrained.push_back(it->hwPtUnconstrained());
106  l1upgrade_.muonIEta.push_back(it->hwEta());
107  l1upgrade_.muonIPhi.push_back(it->hwPhi());
108  l1upgrade_.muonIEtaAtVtx.push_back(it->hwEtaAtVtx());
109  l1upgrade_.muonIPhiAtVtx.push_back(it->hwPhiAtVtx());
110  l1upgrade_.muonIDEta.push_back(it->hwDEtaExtra());
111  l1upgrade_.muonIDPhi.push_back(it->hwDPhiExtra());
112  l1upgrade_.muonChg.push_back(it->charge());
113  l1upgrade_.muonIso.push_back(it->hwIso());
114  l1upgrade_.muonQual.push_back(it->hwQual());
115  l1upgrade_.muonDxy.push_back(it->hwDXY());
116  l1upgrade_.muonTfMuonIdx.push_back(it->tfMuonIndex());
117  l1upgrade_.muonBx.push_back(ibx);
118  l1upgrade_.nMuons++;
119  }
120  }
121  }
122 }
123 
125  for (int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
126  for (l1t::EtSumBxCollection::const_iterator it = sums->begin(ibx);
127  it != sums->end(ibx) && l1upgrade_.nSums < maxL1Upgrade;
128  it++) {
129  int type = static_cast<int>(it->getType());
130  l1upgrade_.sumType.push_back(type);
131  l1upgrade_.sumEt.push_back(it->et());
132  l1upgrade_.sumPhi.push_back(it->phi());
133  l1upgrade_.sumIEt.push_back(it->hwPt());
134  l1upgrade_.sumIPhi.push_back(it->hwPhi());
135  l1upgrade_.sumBx.push_back(ibx);
136  l1upgrade_.nSums++;
137  }
138  }
139 }
L1Analysis::L1AnalysisL1Upgrade::SetJet
void SetJet(const edm::Handle< l1t::JetBxCollection > jet, unsigned maxL1Upgrade)
Definition: L1AnalysisL1Upgrade.cc:64
metsig::tau
Definition: SignAlgoResolutions.h:49
muon
Definition: MuonCocktails.h:17
BXVector::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:18
edm::Handle
Definition: AssociativeIterator.h:50
l1UpgradeTree_cfi.maxL1Upgrade
maxL1Upgrade
Definition: l1UpgradeTree_cfi.py:11
BXVector::getFirstBX
int getFirstBX() const
L1Analysis::L1AnalysisL1Upgrade::~L1AnalysisL1Upgrade
~L1AnalysisL1Upgrade()
Definition: L1AnalysisL1Upgrade.cc:5
L1Analysis::L1AnalysisL1Upgrade::L1AnalysisL1Upgrade
L1AnalysisL1Upgrade()
Definition: L1AnalysisL1Upgrade.cc:3
BXVector::begin
const_iterator begin(int bx) const
L1Analysis::L1AnalysisL1Upgrade::SetMuon
void SetMuon(const edm::Handle< l1t::MuonBxCollection > muon, unsigned maxL1Upgrade)
Definition: L1AnalysisL1Upgrade.cc:92
BXVector::end
const_iterator end(int bx) const
L1Analysis::L1AnalysisL1Upgrade::SetSum
void SetSum(const edm::Handle< l1t::EtSumBxCollection > sums, unsigned maxL1Upgrade)
Definition: L1AnalysisL1Upgrade.cc:124
type
type
Definition: HCALResponse.h:21
L1Analysis::L1AnalysisL1Upgrade::SetEm
void SetEm(const edm::Handle< l1t::EGammaBxCollection > em, unsigned maxL1Upgrade)
Definition: L1AnalysisL1Upgrade.cc:7
metsig::jet
Definition: SignAlgoResolutions.h:47
L1AnalysisL1Upgrade.h
L1Analysis::L1AnalysisL1Upgrade::SetTau
void SetTau(const edm::Handle< l1t::TauBxCollection > tau, unsigned maxL1Upgrade)
Definition: L1AnalysisL1Upgrade.cc:36
BXVector::getLastBX
int getLastBX() const