CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1AnalysisL1Extra.cc
Go to the documentation of this file.
2 
4 {
5 }
6 
8 {
9 
10 }
11 
13 {
14  for(l1extra::L1EmParticleCollection::const_iterator it=isoEm->begin(); it!=isoEm->end() && l1extra_.nIsoEm<maxL1Extra; it++){
15 
16  l1extra_.isoEmEt .push_back(it->et());
17  l1extra_.isoEmEta.push_back(it->eta());
18  l1extra_.isoEmPhi.push_back(it->phi());
19  l1extra_.isoEmBx .push_back(it->bx());
20  l1extra_.nIsoEm++;
21  }
22 }
23 
24 
26 {
27  for(l1extra::L1EmParticleCollection::const_iterator it=nonIsoEm->begin(); it!=nonIsoEm->end() && l1extra_.nNonIsoEm<maxL1Extra; it++){
28 
29  l1extra_.nonIsoEmEt .push_back(it->et());
30  l1extra_.nonIsoEmEta.push_back(it->eta());
31  l1extra_.nonIsoEmPhi.push_back(it->phi());
32  l1extra_.nonIsoEmBx .push_back(it->bx());
33  l1extra_.nNonIsoEm++;
34  }
35 }
36 
38 {
39 // std::cout << "Filling L1 Extra cenJets" << maxL1Extra << " " << cenJet->size() << std::endl;
40 
41  for(l1extra::L1JetParticleCollection::const_iterator it=cenJet->begin(); it!=cenJet->end() && l1extra_.nCenJets<maxL1Extra; it++){
42  //printf("L1CenJet (et,eta,phi,bx,) (%f,%f,%f,%d) \n",it->et(),it->eta(),it->phi(),it->bx() );
43 // std::cout << "L1 CenJets et,eta,phi,bx = " << it->et() << ", " << it->eta() <<", " <<it->phi() <<", " << it->bx() << std::endl;
44  l1extra_.cenJetEt .push_back(it->et());
45  l1extra_.cenJetEta.push_back(it->eta());
46  l1extra_.cenJetPhi.push_back(it->phi());
47  l1extra_.cenJetBx .push_back(it->bx());
48  l1extra_.nCenJets++;
49  }
50 }
51 
53 {
54  //std::cout << "Filling L1 Extra fwdJets" << std::endl;
55  for(l1extra::L1JetParticleCollection::const_iterator it=fwdJet->begin(); it!=fwdJet->end() && l1extra_.nFwdJets<maxL1Extra; it++){
56 
57  //printf("L1fwdJet (et,eta,phi,bx,) (%f,%f,%f,%d)\n",it->et(),it->eta(),it->phi(),it->bx() );
58  l1extra_.fwdJetEt .push_back(it->et());
59  l1extra_.fwdJetEta.push_back(it->eta());
60  l1extra_.fwdJetPhi.push_back(it->phi());
61  l1extra_.fwdJetBx .push_back(it->bx());
62  l1extra_.nFwdJets++;
63  }
64 }
65 
67 {
68  //std::cout << "Filling L1 Extra tauJets" << std::endl;
69  for(l1extra::L1JetParticleCollection::const_iterator it=tauJet->begin(); it!=tauJet->end() && l1extra_.nTauJets<maxL1Extra; it++){
70 
71  // printf("L1tauJet (et,eta,phi,bx,) (%f,%f,%f,%d)\n",it->et(),it->eta(),it->phi(),it->bx() );
72  l1extra_.tauJetEt .push_back(it->et());
73  l1extra_.tauJetEta.push_back(it->eta());
74  l1extra_.tauJetPhi.push_back(it->phi());
75  l1extra_.tauJetBx .push_back(it->bx());
76  l1extra_.nTauJets++;
77  }
78 }
79 
81 {
82  // std::cout << "Filling L1 Extra isoTauJets" << std::endl;
83  for(l1extra::L1JetParticleCollection::const_iterator it=isoTauJet->begin(); it!=isoTauJet->end() && l1extra_.nIsoTauJets<maxL1Extra; it++){
84 
85  // printf("L1isoTauJet (et,eta,phi,bx,) (%f,%f,%f,%d)\n",it->et(),it->eta(),it->phi(),it->bx() );
86  l1extra_.isoTauJetEt .push_back(it->et());
87  l1extra_.isoTauJetEta.push_back(it->eta());
88  l1extra_.isoTauJetPhi.push_back(it->phi());
89  l1extra_.isoTauJetBx .push_back(it->bx());
90  l1extra_.nIsoTauJets++;
91  }
92 }
93 
94 
96 {
97  for(l1extra::L1MuonParticleCollection::const_iterator it=muon->begin(); it!=muon->end() && l1extra_.nMuons<maxL1Extra; it++){
98 
99  l1extra_.muonEt .push_back( it->et());
100  l1extra_.muonEta.push_back(it->eta());
101  l1extra_.muonPhi.push_back(it->phi());
102  l1extra_.muonChg.push_back(it->charge());
103  l1extra_.muonIso.push_back(it->isIsolated());
104  l1extra_.muonMip.push_back(it->isMip());
105  l1extra_.muonFwd.push_back(it->isForward());
106  l1extra_.muonRPC.push_back(it->isRPC());
107  l1extra_.muonBx .push_back(it->bx());
108  l1extra_.muonQuality .push_back(it->gmtMuonCand().quality());
109 
110 // std::cout << "gmtmuon cand: pt " << it->gmtMuonCand().ptValue()
111 // << "; ptExtra " << it->et()
112 // << "; qual " << it->gmtMuonCand().quality()
113 // << std::endl;
114  l1extra_.nMuons++;
115  }
116 }
117 
119 {
120  for(l1extra::L1EtMissParticleCollection::const_iterator it=mets->begin(); it!=mets->end(); it++) {
121  l1extra_.et. push_back( it->etTotal() );
122  l1extra_.met. push_back( it->et() );
123  l1extra_.metPhi.push_back( it->phi() );
124  l1extra_.metBx. push_back( it->bx() );
125  l1extra_.nMet++;
126  }
127 }
128 
130 {
131  for(l1extra::L1EtMissParticleCollection::const_iterator it=mhts->begin(); it!=mhts->end(); it++) {
132  l1extra_.ht. push_back( it->etTotal() );
133  l1extra_.mht. push_back( it->et() );
134  l1extra_.mhtPhi.push_back( it->phi() );
135  l1extra_.mhtBx. push_back( it->bx() );
136  l1extra_.nMht++;
137  }
138 }
139 
141 {
142  l1extra_.hfEtSum.resize(4);
143  l1extra_.hfBitCnt.resize(4);
144  l1extra_.hfBx.resize(4);
145 
146  for(unsigned int i=0; i<4; ++i)
147  {
148  if (hfRings->size()==0) continue;
149 
150  l1extra_.hfEtSum[i] = (hfRings->begin()->hfEtSum((l1extra::L1HFRings::HFRingLabels) i));
151  l1extra_.hfBitCnt[i] = (hfRings->begin()->hfBitCount((l1extra::L1HFRings::HFRingLabels) i));
152  l1extra_.hfBx[i] = hfRings->begin()->bx();
153  }
154 }
155 
156 
void SetNonIsoEm(const edm::Handle< l1extra::L1EmParticleCollection > nonIsoEm, unsigned maxL1Extra)
int i
Definition: DBlmapReader.cc:9
void SetIsoEm(const edm::Handle< l1extra::L1EmParticleCollection > isoEm, unsigned maxL1Extra)
void SetMuon(const edm::Handle< l1extra::L1MuonParticleCollection > muon, unsigned maxL1Extra)
void SetTauJet(const edm::Handle< l1extra::L1JetParticleCollection > tauJet, unsigned maxL1Extra)
void SetMet(const edm::Handle< l1extra::L1EtMissParticleCollection > mets)
void SetHFring(const edm::Handle< l1extra::L1HFRingsCollection > hfRings)
void SetIsoTauJet(const edm::Handle< l1extra::L1JetParticleCollection > isoTauJet, unsigned maxL1Extra)
void SetFwdJet(const edm::Handle< l1extra::L1JetParticleCollection > fwdJet, unsigned maxL1Extra)
void SetMht(const edm::Handle< l1extra::L1EtMissParticleCollection > mhts)
void SetCenJet(const edm::Handle< l1extra::L1JetParticleCollection > cenJet, unsigned maxL1Extra)