CMS 3D CMS Logo

L1AnalysisGCT.cc
Go to the documentation of this file.
3 
5 
7 
12  const edm::Handle<L1GctJetCandCollection> l1IsoTauJets) {
13  // std::cout << "L1IsoTauJets valid: " << l1IsoTauJets.isValid() <<std::endl;
14  // edm::LogAbsolute("L1") << "CCLA: " << l1IsoTauJets.isValid() <<std::endl;
15  // Central jets
16  if (verbose_) {
17  edm::LogInfo("L1Prompt") << "L1NtupleProducer: number of central jets = " << l1CenJets->size() << std::endl;
18  }
19  gct_.CJetSize = l1CenJets->size(); //1
20  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin(); cj != l1CenJets->end(); cj++) {
21  gct_.CJetEta.push_back(cj->regionId().ieta()); //2
22  gct_.CJetPhi.push_back(cj->regionId().iphi()); //3
23  gct_.CJetRnk.push_back(cj->rank()); //4
24  gct_.CJetBx.push_back(cj->bx()); //4
25  if (verbose_) {
26  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Central jet " << cj->regionId().iphi() << ", "
27  << cj->regionId().ieta() << ", " << cj->rank() << std::endl;
28  }
29  }
30 
31  // Forward jets
32  if (verbose_) {
33  edm::LogInfo("L1Prompt") << "L1NtupleProducer: number of forward jets = " << l1ForJets->size() << std::endl;
34  }
35  gct_.FJetSize = l1ForJets->size(); //5
36  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
37  gct_.FJetEta.push_back(fj->regionId().ieta()); //6
38  gct_.FJetPhi.push_back(fj->regionId().iphi()); //7
39  gct_.FJetRnk.push_back(fj->rank()); //8
40  gct_.FJetBx.push_back(fj->bx()); //8
41  if (verbose_) {
42  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Forward jet " << fj->regionId().iphi() << ", "
43  << fj->regionId().ieta() << ", " << fj->rank() << std::endl;
44  }
45  }
46 
47  // Tau jets
48  if (verbose_) {
49  edm::LogInfo("L1Prompt") << "L1NtupleProducer: number of tau jets = " << l1TauJets->size() << std::endl;
50  }
51  gct_.TJetSize = l1TauJets->size(); //9
52  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
53  //if ( tj->rank() == 0 ) continue;
54  gct_.TJetEta.push_back(tj->regionId().ieta()); //10
55  gct_.TJetPhi.push_back(tj->regionId().iphi()); //11
56  gct_.TJetRnk.push_back(tj->rank()); //12
57  gct_.TJetBx.push_back(tj->bx()); //
58  if (verbose_) {
59  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Tau jet " << tj->regionId().iphi() << ", " << tj->regionId().ieta()
60  << ", " << tj->rank() << std::endl;
61  }
62  }
63 
64  // Isolated Tau Jets
65  if (l1IsoTauJets.isValid()) {
66  if (verbose_) {
67  edm::LogInfo("L1Prompt") << "L1NtupleProducer: number of isoTau jets = " << l1IsoTauJets->size() << std::endl;
68  }
69  gct_.IsoTJetSize = l1IsoTauJets->size(); //9
70  for (L1GctJetCandCollection::const_iterator tj = l1IsoTauJets->begin(); tj != l1IsoTauJets->end(); tj++) {
71  //if ( tj->rank() == 0 ) continue;
72  gct_.IsoTJetEta.push_back(tj->regionId().ieta()); //10
73  gct_.IsoTJetPhi.push_back(tj->regionId().iphi()); //11
74  gct_.IsoTJetRnk.push_back(tj->rank()); //12
75  gct_.IsoTJetBx.push_back(tj->bx()); //
76  if (verbose_) {
77  edm::LogInfo("L1Prompt") << "L1NtupleProducer: IsoTau jet " << tj->regionId().iphi() << ", "
78  << tj->regionId().ieta() << ", " << tj->rank() << std::endl;
79  }
80  }
81  }
82 }
83 
87  const edm::Handle<L1GctEtTotalCollection> l1EtTotal) {
88  // Energy sums
89  for (L1GctEtMissCollection::const_iterator etm = l1EtMiss->begin(); etm != l1EtMiss->end(); ++etm) {
90  gct_.EtMiss.push_back(etm->et());
91  gct_.EtMissPhi.push_back(etm->phi());
92  gct_.EtMissBX.push_back(etm->bx());
93  gct_.EtMissSize++;
94 
95  if (verbose_) {
96  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Et Miss " << etm->et() << ", " << etm->phi() << ", " << etm->bx()
97  << std::endl;
98  }
99  }
100 
101  for (L1GctHtMissCollection::const_iterator htm = l1HtMiss->begin(); htm != l1HtMiss->end(); ++htm) {
102  gct_.HtMiss.push_back(htm->et());
103  gct_.HtMissPhi.push_back(htm->phi());
104  gct_.HtMissBX.push_back(htm->bx());
105  gct_.HtMissSize++;
106 
107  if (verbose_) {
108  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Ht Miss " << htm->et() << ", " << htm->phi() << ", " << htm->bx()
109  << std::endl;
110  }
111  }
112 
113  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ++ht) {
114  gct_.EtHad.push_back(ht->et());
115  gct_.EtHadBX.push_back(ht->bx());
116  gct_.EtHadSize++;
117 
118  if (verbose_) {
119  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Ht Total " << ht->et() << ", " << ht->bx() << std::endl;
120  }
121  }
122 
123  for (L1GctEtTotalCollection::const_iterator ett = l1EtTotal->begin(); ett != l1EtTotal->end(); ++ett) {
124  gct_.EtTot.push_back(ett->et());
125  gct_.EtTotBX.push_back(ett->bx());
126  gct_.EtTotSize++;
127 
128  if (verbose_) {
129  edm::LogInfo("L1Prompt") << "L1NtupleProducer: Et Total " << ett->et() << ", " << ett->bx() << std::endl;
130  }
131  }
132 }
133 
135  const edm::Handle<L1GctHFBitCountsCollection> l1HFCounts) {
136  //Fill HF Ring Histograms
137  gct_.HFRingEtSumSize = l1HFSums->size();
138  int ies = 0;
139  for (L1GctHFRingEtSumsCollection::const_iterator hfs = l1HFSums->begin(); hfs != l1HFSums->end(); hfs++) {
140  gct_.HFRingEtSumEta.push_back(hfs->etSum(ies));
141  if (verbose_) {
142  edm::LogInfo("L1Prompt") << "L1NtupleProducer: HF Sums " << l1HFSums->size() << ", " << hfs->etSum(ies)
143  << std::endl;
144  }
145  ies++;
146  }
147 
148  int ibc = 0;
149  gct_.HFBitCountsSize = l1HFCounts->size();
150  for (L1GctHFBitCountsCollection::const_iterator hfc = l1HFCounts->begin(); hfc != l1HFCounts->end(); hfc++) {
151  gct_.HFBitCountsEta.push_back(hfc->bitCount(ibc));
152  if (verbose_) {
153  edm::LogInfo("L1Prompt") << "L1NtupleProducer: HF Counts " << l1HFCounts->size() << ", " << hfc->bitCount(ibc)
154  << std::endl;
155  }
156  ibc++;
157  }
158 }
159 
161  const edm::Handle<L1GctEmCandCollection> l1NonIsoEm) {
162  // Isolated EM
163  if (verbose_) {
164  edm::LogInfo("L1Prompt") << "L1TGCT: number of iso em cands: " << l1IsoEm->size() << std::endl;
165  }
166 
167  gct_.IsoEmSize = l1IsoEm->size();
168  for (L1GctEmCandCollection::const_iterator ie = l1IsoEm->begin(); ie != l1IsoEm->end(); ie++) {
169  gct_.IsoEmEta.push_back(ie->regionId().ieta());
170  gct_.IsoEmPhi.push_back(ie->regionId().iphi());
171  gct_.IsoEmRnk.push_back(ie->rank());
172  gct_.IsoEmBx.push_back(ie->bx());
173  }
174 
175  // Non-isolated EM
176  if (verbose_) {
177  edm::LogInfo("L1Prompt") << "L1TGCT: number of non-iso em cands: " << l1NonIsoEm->size() << std::endl;
178  }
179  gct_.NonIsoEmSize = l1NonIsoEm->size();
180 
181  for (L1GctEmCandCollection::const_iterator ne = l1NonIsoEm->begin(); ne != l1NonIsoEm->end(); ne++) {
182  gct_.NonIsoEmEta.push_back(ne->regionId().ieta());
183  gct_.NonIsoEmPhi.push_back(ne->regionId().iphi());
184  gct_.NonIsoEmRnk.push_back(ne->rank());
185  gct_.NonIsoEmBx.push_back(ne->bx());
186  }
187 }
L1AnalysisGCT.h
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
L1Analysis::L1AnalysisGCT::L1AnalysisGCT
L1AnalysisGCT()
Definition: L1AnalysisGCT.cc:4
L1Analysis::L1AnalysisGCT::SetES
void SetES(const edm::Handle< L1GctEtMissCollection > l1EtMiss, const edm::Handle< L1GctHtMissCollection > l1HtMiss, const edm::Handle< L1GctEtHadCollection > l1EtHad, const edm::Handle< L1GctEtTotalCollection > l1EtTotal)
Definition: L1AnalysisGCT.cc:84
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
L1Analysis::L1AnalysisGCT::SetJet
void SetJet(const edm::Handle< L1GctJetCandCollection > l1CenJets, const edm::Handle< L1GctJetCandCollection > l1ForJets, const edm::Handle< L1GctJetCandCollection > l1TauJets, const edm::Handle< L1GctJetCandCollection > l1IsoTauJets)
Definition: L1AnalysisGCT.cc:9
L1Analysis::L1AnalysisGCT::SetEm
void SetEm(const edm::Handle< L1GctEmCandCollection > l1IsoEm, const edm::Handle< L1GctEmCandCollection > l1NonIsoEm)
Definition: L1AnalysisGCT.cc:160
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
L1Analysis::L1AnalysisGCT::~L1AnalysisGCT
~L1AnalysisGCT()
Definition: L1AnalysisGCT.cc:8
L1Analysis::L1AnalysisGCT::SetHFminbias
void SetHFminbias(const edm::Handle< L1GctHFRingEtSumsCollection > l1HFSums, const edm::Handle< L1GctHFBitCountsCollection > l1HFCounts)
Definition: L1AnalysisGCT.cc:134
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70