CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisL1Upgrade Class Reference

#include <L1AnalysisL1Upgrade.h>

Public Types

enum  { TEST =0 }
 

Public Member Functions

L1AnalysisL1UpgradeDataFormatgetData ()
 
 L1AnalysisL1Upgrade ()
 
void Reset ()
 
void SetEm (const edm::Handle< l1t::EGammaBxCollection > em, unsigned maxL1Upgrade)
 
void SetJet (const edm::Handle< l1t::JetBxCollection > jet, unsigned maxL1Upgrade)
 
void SetMuon (const edm::Handle< l1t::MuonBxCollection > muon, unsigned maxL1Upgrade)
 
void SetSum (const edm::Handle< l1t::EtSumBxCollection > sums, unsigned maxL1Upgrade)
 
void SetTau (const edm::Handle< l1t::TauBxCollection > tau, unsigned maxL1Upgrade)
 
 ~L1AnalysisL1Upgrade ()
 

Private Attributes

L1AnalysisL1UpgradeDataFormat l1upgrade_
 

Detailed Description

Definition at line 23 of file L1AnalysisL1Upgrade.h.

Member Enumeration Documentation

anonymous enum
Enumerator
TEST 

Definition at line 26 of file L1AnalysisL1Upgrade.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisL1Upgrade::L1AnalysisL1Upgrade ( )

Definition at line 3 of file L1AnalysisL1Upgrade.cc.

4 {
5 }
L1Analysis::L1AnalysisL1Upgrade::~L1AnalysisL1Upgrade ( )

Definition at line 7 of file L1AnalysisL1Upgrade.cc.

8 {
9 
10 }

Member Function Documentation

L1AnalysisL1UpgradeDataFormat* L1Analysis::L1AnalysisL1Upgrade::getData ( void  )
inline

Definition at line 35 of file L1AnalysisL1Upgrade.h.

References l1upgrade_.

35 {return &l1upgrade_;}
L1AnalysisL1UpgradeDataFormat l1upgrade_
void L1Analysis::L1AnalysisL1Upgrade::Reset ( )
inline
void L1Analysis::L1AnalysisL1Upgrade::SetEm ( const edm::Handle< l1t::EGammaBxCollection em,
unsigned  maxL1Upgrade 
)

Definition at line 12 of file L1AnalysisL1Upgrade.cc.

References BXVector< T >::begin(), L1Analysis::L1AnalysisL1UpgradeDataFormat::egBx, L1Analysis::L1AnalysisL1UpgradeDataFormat::egEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::egEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::egFootprintEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::egHwQual, L1Analysis::L1AnalysisL1UpgradeDataFormat::egIEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::egIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::egIPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::egIso, L1Analysis::L1AnalysisL1UpgradeDataFormat::egIsoEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::egNTT, L1Analysis::L1AnalysisL1UpgradeDataFormat::egPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::egRawEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::egShape, L1Analysis::L1AnalysisL1UpgradeDataFormat::egTowerHoE, L1Analysis::L1AnalysisL1UpgradeDataFormat::egTowerIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::egTowerIPhi, BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), l1upgrade_, and L1Analysis::L1AnalysisL1UpgradeDataFormat::nEGs.

Referenced by L1UpgradeTreeProducer::analyze(), and Reset().

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_.egTowerIPhi.push_back(it->towerIPhi());
26  l1upgrade_.egTowerIEta.push_back(it->towerIEta());
27  l1upgrade_.egRawEt.push_back(it->rawEt());
28  l1upgrade_.egIsoEt.push_back(it->isoEt());
29  l1upgrade_.egFootprintEt.push_back(it->footprintEt());
30  l1upgrade_.egNTT.push_back(it->nTT());
31  l1upgrade_.egShape.push_back(it->shape());
32  l1upgrade_.egTowerHoE.push_back(it->towerHoE());
33  l1upgrade_.egHwQual.push_back(it->hwQual());
34  l1upgrade_.nEGs++;
35  }
36  }
37  }
38 }
const_iterator end(int bx) const
int getFirstBX() const
int getLastBX() const
L1AnalysisL1UpgradeDataFormat l1upgrade_
const_iterator begin(int bx) const
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20
void L1Analysis::L1AnalysisL1Upgrade::SetJet ( const edm::Handle< l1t::JetBxCollection jet,
unsigned  maxL1Upgrade 
)

Definition at line 69 of file L1AnalysisL1Upgrade.cc.

References BXVector< T >::begin(), BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), L1Analysis::L1AnalysisL1UpgradeDataFormat::jetBx, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetIEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetIPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPUDonutEt0, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPUDonutEt1, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPUDonutEt2, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPUDonutEt3, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetPUEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetRawEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetSeedEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetTowerIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::jetTowerIPhi, l1upgrade_, and L1Analysis::L1AnalysisL1UpgradeDataFormat::nJets.

Referenced by L1UpgradeTreeProducer::analyze(), and Reset().

70 {
71  for (int ibx = jet->getFirstBX(); ibx <= jet->getLastBX(); ++ibx) {
72  for (l1t::JetBxCollection::const_iterator it=jet->begin(ibx); it!=jet->end(ibx) && l1upgrade_.nJets<maxL1Upgrade; it++){
73  if (it->pt() > 0){
74  l1upgrade_.jetEt .push_back(it->et());
75  l1upgrade_.jetEta.push_back(it->eta());
76  l1upgrade_.jetPhi.push_back(it->phi());
77  l1upgrade_.jetIEt .push_back(it->hwPt());
78  l1upgrade_.jetIEta.push_back(it->hwEta());
79  l1upgrade_.jetIPhi.push_back(it->hwPhi());
80  l1upgrade_.jetBx .push_back(ibx);
81  l1upgrade_.jetRawEt.push_back(it->rawEt());
82  l1upgrade_.jetSeedEt.push_back(it->seedEt());
83  l1upgrade_.jetTowerIEta.push_back(it->towerIEta());
84  l1upgrade_.jetTowerIPhi.push_back(it->towerIPhi());
85  l1upgrade_.jetPUEt.push_back(it->puEt());
86  l1upgrade_.jetPUDonutEt0.push_back(it->puDonutEt(0));
87  l1upgrade_.jetPUDonutEt1.push_back(it->puDonutEt(1));
88  l1upgrade_.jetPUDonutEt2.push_back(it->puDonutEt(2));
89  l1upgrade_.jetPUDonutEt3.push_back(it->puDonutEt(3));
90  l1upgrade_.nJets++;
91  }
92  }
93  }
94 }
const_iterator end(int bx) const
int getFirstBX() const
int getLastBX() const
L1AnalysisL1UpgradeDataFormat l1upgrade_
const_iterator begin(int bx) const
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20
void L1Analysis::L1AnalysisL1Upgrade::SetMuon ( const edm::Handle< l1t::MuonBxCollection muon,
unsigned  maxL1Upgrade 
)

Definition at line 97 of file L1AnalysisL1Upgrade.cc.

References BXVector< T >::begin(), BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), l1upgrade_, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonBx, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonChg, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonEtaAtVtx, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIDEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIDPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIEtaAtVtx, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIPhiAtVtx, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonIso, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonPhiAtVtx, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonQual, L1Analysis::L1AnalysisL1UpgradeDataFormat::muonTfMuonIdx, and L1Analysis::L1AnalysisL1UpgradeDataFormat::nMuons.

Referenced by L1UpgradeTreeProducer::analyze(), and Reset().

98 {
99  for (int ibx = muon->getFirstBX(); ibx <= muon->getLastBX(); ++ibx) {
100  for (l1t::MuonBxCollection::const_iterator it=muon->begin(ibx); it!=muon->end(ibx) && l1upgrade_.nMuons<maxL1Upgrade; it++){
101  if (it->pt() > 0){
102  l1upgrade_.muonEt .push_back(it->et());
103  l1upgrade_.muonEta.push_back(it->eta());
104  l1upgrade_.muonPhi.push_back(it->phi());
105  l1upgrade_.muonEtaAtVtx.push_back(it->etaAtVtx());
106  l1upgrade_.muonPhiAtVtx.push_back(it->phiAtVtx());
107  l1upgrade_.muonIEt .push_back(it->hwPt());
108  l1upgrade_.muonIEta.push_back(it->hwEta());
109  l1upgrade_.muonIPhi.push_back(it->hwPhi());
110  l1upgrade_.muonIEtaAtVtx.push_back(it->hwEtaAtVtx());
111  l1upgrade_.muonIPhiAtVtx.push_back(it->hwPhiAtVtx());
112  l1upgrade_.muonIDEta.push_back(it->hwDEtaExtra());
113  l1upgrade_.muonIDPhi.push_back(it->hwDPhiExtra());
114  l1upgrade_.muonChg.push_back(it->charge());
115  l1upgrade_.muonIso.push_back(it->hwIso());
116  l1upgrade_.muonQual.push_back(it->hwQual());
117  l1upgrade_.muonTfMuonIdx.push_back(it->tfMuonIndex());
118  l1upgrade_.muonBx .push_back(ibx);
119  l1upgrade_.nMuons++;
120  }
121  }
122  }
123 }
const_iterator end(int bx) const
int getFirstBX() const
int getLastBX() const
L1AnalysisL1UpgradeDataFormat l1upgrade_
const_iterator begin(int bx) const
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20
void L1Analysis::L1AnalysisL1Upgrade::SetSum ( const edm::Handle< l1t::EtSumBxCollection sums,
unsigned  maxL1Upgrade 
)

Definition at line 125 of file L1AnalysisL1Upgrade.cc.

References BXVector< T >::begin(), BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), l1upgrade_, L1Analysis::L1AnalysisL1UpgradeDataFormat::nSums, L1Analysis::L1AnalysisL1UpgradeDataFormat::sumBx, L1Analysis::L1AnalysisL1UpgradeDataFormat::sumEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::sumIEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::sumIPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::sumPhi, and L1Analysis::L1AnalysisL1UpgradeDataFormat::sumType.

Referenced by L1UpgradeTreeProducer::analyze(), and Reset().

126 {
127  for (int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
128  for (l1t::EtSumBxCollection::const_iterator it=sums->begin(ibx); it!=sums->end(ibx) && l1upgrade_.nSums<maxL1Upgrade; 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 }
const_iterator end(int bx) const
type
Definition: HCALResponse.h:21
int getFirstBX() const
int getLastBX() const
L1AnalysisL1UpgradeDataFormat l1upgrade_
const_iterator begin(int bx) const
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20
void L1Analysis::L1AnalysisL1Upgrade::SetTau ( const edm::Handle< l1t::TauBxCollection tau,
unsigned  maxL1Upgrade 
)

Definition at line 41 of file L1AnalysisL1Upgrade.cc.

References BXVector< T >::begin(), BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), l1upgrade_, L1Analysis::L1AnalysisL1UpgradeDataFormat::nTaus, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauBx, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauHasEM, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauHwQual, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIEta, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIsMerged, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIso, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauIsoEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauNTT, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauPhi, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauRawEt, L1Analysis::L1AnalysisL1UpgradeDataFormat::tauTowerIEta, and L1Analysis::L1AnalysisL1UpgradeDataFormat::tauTowerIPhi.

Referenced by L1UpgradeTreeProducer::analyze(), and Reset().

42 {
43  for (int ibx = tau->getFirstBX(); ibx <= tau->getLastBX(); ++ibx) {
44  for (l1t::TauBxCollection::const_iterator it=tau->begin(ibx); it!=tau->end(ibx) && l1upgrade_.nTaus<maxL1Upgrade; it++){
45  if (it->pt() > 0){
46  l1upgrade_.tauEt .push_back(it->et());
47  l1upgrade_.tauEta.push_back(it->eta());
48  l1upgrade_.tauPhi.push_back(it->phi());
49  l1upgrade_.tauIEt .push_back(it->hwPt());
50  l1upgrade_.tauIEta.push_back(it->hwEta());
51  l1upgrade_.tauIPhi.push_back(it->hwPhi());
52  l1upgrade_.tauIso.push_back(it->hwIso());
53  l1upgrade_.tauBx .push_back(ibx);
54  l1upgrade_.tauTowerIPhi.push_back(it->towerIPhi());
55  l1upgrade_.tauTowerIEta.push_back(it->towerIEta());
56  l1upgrade_.tauRawEt.push_back(it->rawEt());
57  l1upgrade_.tauIsoEt.push_back(it->isoEt());
58  l1upgrade_.tauNTT.push_back(it->nTT());
59  l1upgrade_.tauHasEM.push_back(it->hasEM());
60  l1upgrade_.tauIsMerged.push_back(it->isMerged());
61  l1upgrade_.tauHwQual.push_back(it->hwQual());
62  l1upgrade_.nTaus++;
63  }
64  }
65  }
66 }
const_iterator end(int bx) const
int getFirstBX() const
int getLastBX() const
L1AnalysisL1UpgradeDataFormat l1upgrade_
const_iterator begin(int bx) const
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:20

Member Data Documentation

L1AnalysisL1UpgradeDataFormat L1Analysis::L1AnalysisL1Upgrade::l1upgrade_
private

Definition at line 38 of file L1AnalysisL1Upgrade.h.

Referenced by getData(), Reset(), SetEm(), SetJet(), SetMuon(), SetSum(), and SetTau().