105 cout <<
"[calcTopMass] analysing event " << iEvent.
id() << endl;
109 cerr <<
"[calcTopMass] caught std::exception " << ce.what() << endl;
119 TLorentzVector jetsNoCorr[6];
120 TLorentzVector jetsCorFl0[6];
121 TLorentzVector jetsCorFlM[6];
122 TLorentzVector jetsCorMix[6];
124 bool isQuarkFound[6] = {
false};
132 int particPDG = thePhyDef.
get()->pdgId();
134 if (particPDG == 5) {
135 double bTcorr = bTopCorrector->
correction(theJet);
136 double tTcorr = tTopCorrector->
correction(theJet);
137 jetsNoCorr[0].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
138 jetsCorFl0[0].SetPtEtaPhiM(theJet.pt() * bTcorr, theJet.eta(), theJet.phi(), 0);
139 jetsCorFlM[0].SetPtEtaPhiM(theJet.pt() * bTcorr, theJet.eta(), theJet.phi(),
bMass);
140 jetsCorMix[0].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
141 isQuarkFound[0] =
true;
142 }
else if (particPDG == -5) {
143 double bTcorr = bTopCorrector->
correction(theJet);
144 double tTcorr = tTopCorrector->
correction(theJet);
145 jetsNoCorr[3].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
146 jetsCorFl0[3].SetPtEtaPhiM(theJet.pt() * bTcorr, theJet.eta(), theJet.phi(), 0);
147 jetsCorFlM[3].SetPtEtaPhiM(theJet.pt() * bTcorr, theJet.eta(), theJet.phi(),
bMass);
148 jetsCorMix[3].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
149 isQuarkFound[3] =
true;
150 }
else if (particPDG == 2) {
151 double qTcorr = qTopCorrector->
correction(theJet);
152 double tTcorr = tTopCorrector->
correction(theJet);
153 jetsNoCorr[1].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
154 jetsCorFl0[1].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
155 jetsCorFlM[1].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
156 jetsCorMix[1].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
157 isQuarkFound[1] =
true;
158 }
else if (particPDG == 4) {
159 double cTcorr = cTopCorrector->
correction(theJet);
160 double tTcorr = tTopCorrector->
correction(theJet);
161 jetsNoCorr[1].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
162 jetsCorFl0[1].SetPtEtaPhiM(theJet.pt() * cTcorr, theJet.eta(), theJet.phi(), 0);
163 jetsCorFlM[1].SetPtEtaPhiM(theJet.pt() * cTcorr, theJet.eta(), theJet.phi(),
cMass);
164 jetsCorMix[1].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
165 isQuarkFound[1] =
true;
166 }
else if (particPDG == -1) {
167 double qTcorr = qTopCorrector->
correction(theJet);
168 double tTcorr = tTopCorrector->
correction(theJet);
169 jetsNoCorr[2].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
170 jetsCorFl0[2].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
171 jetsCorFlM[2].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
172 jetsCorMix[2].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
173 isQuarkFound[2] =
true;
174 }
else if (particPDG == -3) {
175 double qTcorr = qTopCorrector->
correction(theJet);
176 double tTcorr = tTopCorrector->
correction(theJet);
177 jetsNoCorr[2].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
178 jetsCorFl0[2].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
179 jetsCorFlM[2].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
180 jetsCorMix[2].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
181 isQuarkFound[2] =
true;
182 }
else if (particPDG == -2) {
183 double qTcorr = qTopCorrector->
correction(theJet);
184 double tTcorr = tTopCorrector->
correction(theJet);
185 jetsNoCorr[4].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
186 jetsCorFl0[4].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
187 jetsCorFlM[4].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
188 jetsCorMix[4].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
189 isQuarkFound[4] =
true;
190 }
else if (particPDG == -4) {
191 double qTcorr = qTopCorrector->
correction(theJet);
192 double tTcorr = tTopCorrector->
correction(theJet);
193 jetsNoCorr[4].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
194 jetsCorFl0[4].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
195 jetsCorFlM[4].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
196 jetsCorMix[4].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
197 isQuarkFound[4] =
true;
198 }
else if (particPDG == 1) {
199 double qTcorr = qTopCorrector->
correction(theJet);
200 double tTcorr = tTopCorrector->
correction(theJet);
201 jetsNoCorr[5].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
202 jetsCorFl0[5].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(), 0);
203 jetsCorFlM[5].SetPtEtaPhiM(theJet.pt() * qTcorr, theJet.eta(), theJet.phi(),
qMass);
204 jetsCorMix[5].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
205 isQuarkFound[5] =
true;
206 }
else if (particPDG == 3) {
207 double cTcorr = cTopCorrector->
correction(theJet);
208 double tTcorr = tTopCorrector->
correction(theJet);
209 jetsNoCorr[5].SetPtEtaPhiM(theJet.pt(), theJet.eta(), theJet.phi(), theJet.mass());
210 jetsCorFl0[5].SetPtEtaPhiM(theJet.pt() * cTcorr, theJet.eta(), theJet.phi(), 0);
211 jetsCorFlM[5].SetPtEtaPhiM(theJet.pt() * cTcorr, theJet.eta(), theJet.phi(),
cMass);
212 jetsCorMix[5].SetPtEtaPhiM(theJet.pt() * tTcorr, theJet.eta(), theJet.phi(), 0);
213 isQuarkFound[5] =
true;
218 if (isQuarkFound[0] && isQuarkFound[1] && isQuarkFound[2]) {
219 TLorentzVector *theTopPNoCorr =
new TLorentzVector(jetsNoCorr[0] + jetsNoCorr[1] + jetsNoCorr[2]);
220 TLorentzVector *theTopPCorFl0 =
new TLorentzVector(jetsCorFl0[0] + jetsCorFl0[1] + jetsCorFl0[2]);
221 TLorentzVector *theTopPCorFlM =
new TLorentzVector(jetsCorFlM[0] + jetsCorFlM[1] + jetsCorFlM[2]);
222 TLorentzVector *theTopPCorMix =
new TLorentzVector(jetsCorMix[0] + jetsCorMix[1] + jetsCorMix[2]);
229 if (isQuarkFound[3] && isQuarkFound[4] && isQuarkFound[5]) {
230 TLorentzVector *theTopMNoCorr =
new TLorentzVector(jetsNoCorr[3] + jetsNoCorr[4] + jetsNoCorr[5]);
231 TLorentzVector *theTopMCorFl0 =
new TLorentzVector(jetsCorFl0[3] + jetsCorFl0[4] + jetsCorFl0[5]);
232 TLorentzVector *theTopMCorFlM =
new TLorentzVector(jetsCorFlM[3] + jetsCorFlM[4] + jetsCorFlM[5]);
233 TLorentzVector *theTopMCorMix =
new TLorentzVector(jetsCorMix[3] + jetsCorMix[4] + jetsCorMix[5]);
bool isNonnull() const
Checks for non-null.
edm::Handle< reco::JetMatchedPartonsCollection > theJetPartonMatch
std::string m_cT_CorrectorName
edm::InputTag sourceByRefer_
const_iterator end() const
double correction(const LorentzVector &fJet) const
get correction using Jet information only
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
T const * get() const
Returns C++ pointer to the item.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::string m_qT_CorrectorName
const GenParticleRef & physicsDefinitionParton() const
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
std::string m_tT_CorrectorName
const_iterator begin() const
std::string m_bT_CorrectorName