1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "AnalysisDataFormats/TopObjects/interface/TtFullHadronicEvent.h"
#include "AnalysisDataFormats/TopObjects/interface/TtFullHadEvtPartons.h"
#include "printParticle.h"
using ttevent::printParticle;
// print info via MessageLogger
void TtFullHadronicEvent::print(const int verbosity) const {
if (verbosity % 10 <= 0)
return;
edm::LogInfo log("TtFullHadronicEvent");
log << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n";
// get some information from the genEvent
if (!genEvt_)
log << " TtGenEvent not available! \n";
else {
log << " TtGenEvent says: ";
if (!this->genEvent()->isTtBar())
log << "Not TtBar";
else if (this->genEvent()->isFullHadronic())
log << "Fully Hadronic TtBar";
else if (this->genEvent()->isSemiLeptonic())
log << "Semi-leptonic TtBar";
else if (this->genEvent()->isFullLeptonic())
log << "Fully Leptonic TtBar";
log << "\n";
}
// get number of available hypothesis classes
log << " Number of available event hypothesis classes: " << this->numberOfAvailableHypoClasses() << " \n";
// create a legend for the jetLepComb
log << " - JetCombi : ";
for (unsigned idx = 0; idx < 6; idx++) {
switch (idx) {
case TtFullHadEvtPartons::LightQ:
log << " LightQ ";
break;
case TtFullHadEvtPartons::LightQBar:
log << " LightQBar";
break;
case TtFullHadEvtPartons::B:
log << " B ";
break;
case TtFullHadEvtPartons::LightP:
log << " LightP ";
break;
case TtFullHadEvtPartons::LightPBar:
log << " LightPBar";
break;
case TtFullHadEvtPartons::BBar:
log << " BBar ";
break;
}
}
log << "\n";
// get details from the hypotheses
typedef std::map<HypoClassKey, std::vector<HypoCombPair> >::const_iterator EventHypo;
for (EventHypo hyp = evtHyp_.begin(); hyp != evtHyp_.end(); ++hyp) {
HypoClassKey hypKey = (*hyp).first;
// header for each hypothesis
log << "---------------------------------------------------------------------------- \n";
switch (hypKey) {
case kGeom:
log << " Geom not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kWMassMaxSumPt:
log << " WMassMaxSumPt not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kMaxSumPtWMass:
log << " MaxSumPtWMass not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kGenMatch:
log << " GenMatch";
break;
case kMVADisc:
log << " MVADisc not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kKinFit:
log << " KinFit";
break;
case kKinSolution:
log << " KinSolution not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kWMassDeltaTopMass:
log << " WMassDeltaTopMass not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
case kHitFit:
log << " HitFit not (yet) applicable to TtFullHadronicEvent --> skipping";
continue;
default:
log << " Unknown TtEvent::HypoClassKey provided --> skipping";
continue;
}
log << "-Hypothesis: \n";
unsigned nOfHyp = this->numberOfAvailableHypos(hypKey);
if (nOfHyp > 1) {
log << " * Number of available jet combinations: " << nOfHyp << " \n";
if (verbosity < 10)
log << " The following was found to be the best one: \n";
}
// if verbosity level is smaller than 10, never show more than the best jet combination
if (verbosity < 10)
nOfHyp = 1;
for (unsigned cmb = 0; cmb < nOfHyp; ++cmb) {
// check if hypothesis is valid
if (!this->isHypoValid(hypKey, cmb))
log << " * Not valid! \n";
// get meta information for valid hypothesis
else {
// jetLepComb
log << " * JetCombi :";
std::vector<int> jets = this->jetLeptonCombination(hypKey, cmb);
for (unsigned int iJet = 0; iJet < jets.size(); iJet++) {
log << " " << jets[iJet] << " ";
}
log << "\n";
// specialties for some hypotheses
switch (hypKey) {
case kGenMatch:
log << " * Sum(DeltaR) : " << this->genMatchSumDR(cmb) << " \n"
<< " * Sum(DeltaPt): " << this->genMatchSumPt(cmb) << " \n";
break;
case kKinFit:
log << " * Chi^2 : " << this->fitChi2(cmb) << " \n"
<< " * Prob(Chi^2) : " << this->fitProb(cmb) << " \n";
break;
default:
break;
}
// kinematic quantities of particles (if last digit of verbosity level > 1)
if (verbosity % 10 >= 2) {
log << " * Candidates (pt; eta; phi; mass) :\n";
if (verbosity % 10 >= 3)
printParticle(log, "top pair", this->topPair(hypKey, cmb));
printParticle(log, "top ", this->top(hypKey, cmb));
printParticle(log, "W plus ", this->wPlus(hypKey, cmb));
if (verbosity % 10 >= 3) {
printParticle(log, "b ", this->b(hypKey, cmb));
printParticle(log, "lightQ ", this->lightQ(hypKey, cmb));
printParticle(log, "lightQBar ", this->lightQBar(hypKey, cmb));
}
printParticle(log, "topBar ", this->topBar(hypKey, cmb));
printParticle(log, "W minus ", this->wMinus(hypKey, cmb));
if (verbosity % 10 >= 3) {
printParticle(log, "bBar ", this->bBar(hypKey, cmb));
printParticle(log, "lightP ", this->lightP(hypKey, cmb));
printParticle(log, "lightPBar ", this->lightPBar(hypKey, cmb));
}
}
}
}
}
log << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
}
|