ATLAS Offline Software
CalcTzqPartonHistory.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3  */
4 
9 
10 
11 namespace top {
13 
16  bool isAfterGamma(false);
17  const int particle_ID = particle->pdgId();
18  int forLoop;
19 
20  while (!isAfterGamma) {
21  forLoop = 0;
22  for (size_t j = 0; j < particle->nChildren(); j++) {
23  const xAOD::TruthParticle* tmp_children = particle->child(j);
24  if (tmp_children && tmp_children->pdgId() == particle_ID && tmp_children->pdgId() != 22) {
25  particle = particle->child(j);
26  forLoop++;
27  break;
28  }//if
29  }//for
30 
31  if (forLoop == 0) isAfterGamma = true;
32  }//while
33  return particle;
34  }
35 
37  {
38  const auto & parent = particle->parent(0);
39  if (!parent) return nullptr;
40 
41  for (size_t i=0; i<parent->nChildren(); ++i)
42  {
43  const auto & sibling_candidate = parent->child(i);
44  if (!sibling_candidate) continue;
45  if (sibling_candidate->pdgId() == -particle->pdgId())
46  {
47  return sibling_candidate;
48  }
49  }
50 
51  return nullptr;
52  }
53 
55  if (a < 0) {
56  return -1;
57  } else return 1;
58  }
59 
61  for (const xAOD::TruthParticle* particle : *truthParticles) {
62  if (particle->pdgId() != start) {
63  continue;
64  }
65  tZ.b_p4 = particle->p4();
66  tZ.b_pdgId = particle->pdgId();
67  return true;
68  }
69  return false;
70  }
71 
73 
74  for (const xAOD::TruthParticle* particle : *truthParticles) {
75  if (particle->pdgId() != start || particle->nChildren() != 2) {
76  continue;
77  }
78  tZ.Z_p4 = particle->p4();
79 
80  for (size_t k = 0; k < particle->nChildren(); k++) {
81 
82  const xAOD::TruthParticle* ZChildren = particle->child(k);
83  if (ZChildren->pdgId() > 0) {
84  tZ.Zdecay1_p4 = ZChildren->p4();
85  tZ.Zdecay1_pdgId = ZChildren->pdgId();
86  tZ.Zdecay1_status = ZChildren->status();
87  } else {
88  tZ.Zdecay2_p4 = ZChildren->p4();
89  tZ.Zdecay2_pdgId = ZChildren->pdgId();
90  tZ.Zdecay1_status = ZChildren->status();
91  }
92  } //for
93  // here we ask to return true if it identifies the particle and its children correctly.
94  return true;
95  }
96  return false;
97  }
98 
100  {
101  for (const xAOD::TruthParticle * particle: *truthParticles)
102  {
103  if (std::abs(particle->pdgId()) > 19) continue;
104  if (particle->pdgId() < 0) continue;
105  if (particle->nParents() != 1) continue;
106  const xAOD::TruthParticle * parent = particle->parent(0);
107  if (!parent) continue;
108  if (parent->pdgId() != 23) continue;
109  const auto* sibling = getFlavourSibling(particle); // look for fermion with sibling
110  if (!sibling) continue;
111 
112  tZ.Zdecay1_p4 = particle->p4();
113  tZ.Zdecay1_pdgId = particle->pdgId();
114  tZ.Zdecay1_status = particle->status();
115  if (std::abs(tZ.Zdecay1_pdgId) == 15)
116  {
117  bool isOk;
119  }
120 
121  tZ.Zdecay2_p4 = sibling->p4();
122  tZ.Zdecay2_pdgId = sibling->pdgId();
123  tZ.Zdecay2_status = sibling->status();
124  if (std::abs(tZ.Zdecay2_pdgId) == 15) {
125  bool isOk;
127  }
128 
130  return true;
131  }
132 
133  return false;
134  }
135 
136 
138  {
139  tZ.Z_p4 = particle->p4();
140 
141  for (size_t k = 0; k < particle->nChildren(); k++) {
142  const xAOD::TruthParticle* ZChildren = particle->child(k);
143  if (ZChildren->pdgId() > 0) {
144  tZ.Zdecay1_p4 = ZChildren->p4();
145  tZ.Zdecay1_pdgId = ZChildren->pdgId();
146  tZ.Zdecay1_status = ZChildren->status();
147 
148  // Tautau channel -> Check whether the Tau is hadronic or leptonic
149  if (std::abs(tZ.Zdecay1_pdgId) == 15) {
150  bool isOk;
152  }
153  } else {
154  tZ.Zdecay2_p4 = ZChildren->p4();
155  tZ.Zdecay2_pdgId = ZChildren->pdgId();
156  tZ.Zdecay2_status = ZChildren->status();
157 
158  // Tautau channel -> Check whether the Tau is hadronic or leptonic
159  if (std::abs(tZ.Zdecay2_pdgId) == 15) {
160  bool isOk;
162  }
163  }
164  }
165 
166  return;
167  }
168 
170  {
171  bool foundZ = false;
172  bool foundQ = false;
173 
174  for (const xAOD::TruthParticle * particle : *truthParticles)
175  {
176  // Step 1: find top
177  if (std::abs(particle->pdgId()) != 6) continue;
178 
179  // Step 2: go to parent
180  const xAOD::TruthParticle * parent = particle->parent(0);
181  if (!parent) continue;
182 
183  // Step 3: loop over children
184  for (size_t i=0; i<parent->nChildren(); i++)
185  {
186  const xAOD::TruthParticle * child = parent->child(i);
187  if (!child) continue;
188  if (std::abs(child->pdgId()) == 6) continue;
189  if (child->pdgId() == 23)
190  {
191  child = PartonHistoryUtils::findAfterFSR(child);
192  if (child->nChildren() == 2)
193  {
194  foundZ = true;
195  FillZ(child);
196  }
197  else
198  {
199  foundZ = false;
200  }
201  }
202  else if (std::abs(child->pdgId()) == 5)
203  {
204  tZ.b_p4 = child->p4();
205  tZ.b_pdgId = child->pdgId();
206  }
207  else if (std::abs(child->pdgId()) < 5)
208  {
209  foundQ = true;
210  tZ.q_p4 = child->p4();
211  tZ.q_pdgId = child->pdgId();
212  }
213  else if (child->pdgId() == 25 )
214  {
215  // some events are tHq so reset and return
216  tZ.reset();
217  tZ.isThq = true;
218  return true;
219  }
220  else
221  {
222  // looking for offshell z
223  if (child->pdgId() < 0) continue;
224  if (child->pdgId() > 19) continue;
225  const auto* sibling = getFlavourSibling(child); // look for fermion with sibling
226  if (!sibling) continue;
227  foundZ = true;
228  tZ.Zdecay1_p4 = child->p4();
229  tZ.Zdecay1_pdgId = child->pdgId();
230  tZ.Zdecay1_status = child->status();
231  if (std::abs(tZ.Zdecay1_pdgId) == 15)
232  {
233  bool isOk;
235  }
236 
237  tZ.Zdecay2_p4 = sibling->p4();
238  tZ.Zdecay2_pdgId = sibling->pdgId();
239  tZ.Zdecay2_status = sibling->status();
240  if (std::abs(tZ.Zdecay2_pdgId) == 15)
241  {
242  bool isOk;
244  }
245 
247  }
248  }
249  if (foundZ&&foundQ) return true;
250  }
251 
252  if(!foundZ&&foundQ)
253  {
254  foundZ = FindLostZ(truthParticles);
255  }
256 
257  return (foundZ&&foundQ);
258  }
259 
261  TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId,
262  TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
263  {
264  bool hasWdecayProd1 = false;
265  bool hasWdecayProd2 = false;
266 
267  for (const xAOD::TruthParticle *particle : *truthParticles)
268  {
269  if (std::abs(particle->pdgId()) == 24 && particle->nParents() == 0)
270  {
272  for (size_t l=0; l<particle->nChildren(); l++)
273  {
274  const xAOD::TruthParticle *p = particle->child(l);
275  if (!p) continue;
276  if (std::abs(p->pdgId()) < 17)
277  {
278  if (p->pdgId() > 0)
279  {
280  Wdecay1_p4 = p->p4();
281  Wdecay1_pdgId = p->pdgId();
282  hasWdecayProd1 = true;
283  }
284  else
285  {
286  Wdecay2_p4 = p->p4();
287  Wdecay2_pdgId = p->pdgId();
288  hasWdecayProd2 = true;
289  }
290  }
291  if (hasWdecayProd1 && hasWdecayProd2) return true;
292  }
293  }
294  }
295 
296  return false;
297  }
298 
300  TLorentzVector &t_beforeFSR_p4, TLorentzVector &t_afterFSR_p4,
301  TLorentzVector &W_p4, TLorentzVector &b_p4, TLorentzVector &Wdecay1_p4,
302  int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
303  {
304  bool hasT = false;
305  bool hasW = false;
306  bool hasB = false;
307  bool hasWdecayProd1 = false;
308  bool hasWdecayProd2 = false;
309 
310  for (const xAOD::TruthParticle *particle : *truthParticles)
311  {
312  if (std::abs(particle->pdgId()) != 6) continue;
313  if (PartonHistoryUtils::hasParticleIdenticalParent(particle)) continue; // keeping only top before FSR
314 
315  t_beforeFSR_p4 = particle->p4();
316  hasT = true;
317 
319  t_afterFSR_p4 = particle->p4();
320 
321  for (size_t j=0; j<particle->nChildren(); j++)
322  {
323  const xAOD::TruthParticle *child = particle->child(j);
324  if (!child) continue;
325  if (std::abs(child->pdgId()) == 24)
326  {
327  W_p4 = child->p4();
328  hasW = true;
329  child = PartonHistoryUtils::findAfterFSR(child);
330  for (size_t k=0; k<child->nChildren(); k++)
331  {
332  const xAOD::TruthParticle *Wchild = child->child(k);
333  if (!Wchild) continue;
334  if (std::abs(Wchild->pdgId()) < 17)
335  {
336  if (Wchild->pdgId() > 0)
337  {
338  Wdecay1_p4 = Wchild->p4();
339  Wdecay1_pdgId = Wchild->pdgId();
340  hasWdecayProd1 = true;
341  }
342  else
343  {
344  Wdecay2_p4 = Wchild->p4();
345  Wdecay2_pdgId = Wchild->pdgId();
346  hasWdecayProd2 = true;
347  }
348  }
349  }
350  }
351  else if (std::abs(child->pdgId()) == 5)
352  {
353  b_p4 = child->p4();
354  hasB = true;
355  }
356  }
357  if (hasT && hasW && hasB && hasWdecayProd1 && hasWdecayProd2) return true;
358  }
359 
360  if (!hasWdecayProd1 || !hasWdecayProd2)
361  {
362  hasWdecayProd1 = hasWdecayProd2 = FindLostW(truthParticles, Wdecay1_p4, Wdecay1_pdgId, Wdecay2_p4, Wdecay2_pdgId);
363  }
364 
365  return (hasT && hasW && hasB && hasWdecayProd1 && hasWdecayProd2);
366  }
367 
369  xAOD::PartonHistory* TzqPartonHistory) {
370  TzqPartonHistory->IniVarTzq();
371  TLorentzVector t_before, t_after, t_after_SC;
372  TLorentzVector Wp;
373  TLorentzVector b;
374  TLorentzVector WpDecay1;
375  TLorentzVector WpDecay2;
376  int WpDecay1_pdgId{};
377  int WpDecay2_pdgId{};
378 
379  bool event_top = CalcTopPartonHistory::topWb(truthParticles, 6, t_before, t_after, Wp, b, WpDecay1, WpDecay1_pdgId,
380  WpDecay2, WpDecay2_pdgId);
381  bool event_top_SC = CalcTopPartonHistory::topAfterFSR_SC(truthParticles, 6, t_after_SC);
382  bool event_topbar = CalcTopPartonHistory::topWb(truthParticles, -6, t_before, t_after, Wp, b, WpDecay1,
383  WpDecay1_pdgId, WpDecay2, WpDecay2_pdgId);
384  bool event_topbar_SC = CalcTopPartonHistory::topAfterFSR_SC(truthParticles, -6, t_after_SC);
385 
386  if (!event_top && !event_topbar) {
387  event_top = FindLostTop(truthParticles,
388  t_before, t_after,
389  Wp, b,
390  WpDecay1, WpDecay1_pdgId,
391  WpDecay2, WpDecay2_pdgId);
392  }
393 
394  tZ.reset();
395  bool event_ZandQ = FindTZQVertex(truthParticles);
396 
397  if (event_ZandQ) {
398  if (event_top || event_topbar) {
399  decorateWithMPtPhi(TzqPartonHistory, "MC_t_beforeFSR", t_before);
400  fillEtaBranch(TzqPartonHistory, "MC_t_beforeFSR_eta", t_before);
401 
402  decorateWithMPtPhi(TzqPartonHistory, "MC_t_afterFSR", t_after);
403  fillEtaBranch(TzqPartonHistory, "MC_t_afterFSR_eta", t_after);
404 
405  if (event_top_SC || event_topbar_SC) {
406  decorateWithMPtPhi(TzqPartonHistory, "MC_t_afterFSR_SC", t_after_SC);
407  fillEtaBranch(TzqPartonHistory, "MC_t_afterFSR_SC_eta", t_after_SC);
408  }
409  decorateWithMPtPhi(TzqPartonHistory, "MC_W_from_t", Wp);
410  fillEtaBranch(TzqPartonHistory, "MC_W_from_t_eta", Wp);
411 
412  decorateWithMPtPhi(TzqPartonHistory, "MC_b_from_t", b);
413  fillEtaBranch(TzqPartonHistory, "MC_b_from_t_eta", b);
414 
415  decorateWithMPtPhi(TzqPartonHistory, "MC_Wdecay1_from_t", WpDecay1);
416  TzqPartonHistory->auxdecor< int >("MC_Wdecay1_from_t_pdgId") = WpDecay1_pdgId;
417  fillEtaBranch(TzqPartonHistory, "MC_Wdecay1_from_t_eta", WpDecay1);
418 
419  decorateWithMPtPhi(TzqPartonHistory, "MC_Wdecay2_from_t", WpDecay2);
420  TzqPartonHistory->auxdecor< int >("MC_Wdecay2_from_t_pdgId") = WpDecay2_pdgId;
421  fillEtaBranch(TzqPartonHistory, "MC_Wdecay2_from_t_eta", WpDecay2);
422 
423  //Z-Variables
424  decorateWithMPtPhi(TzqPartonHistory, "MC_Z", tZ.Z_p4);
425  fillEtaBranch(TzqPartonHistory, "MC_Z_eta", tZ.Z_p4);
426 
427  //First Decay (Zdecay1)
428  decorateWithMPtPhi(TzqPartonHistory, "MC_Zdecay1", tZ.Zdecay1_p4);
429  TzqPartonHistory->auxdecor< int >("MC_Zdecay1_pdgId") = tZ.Zdecay1_pdgId;
430  TzqPartonHistory->auxdecor< int >("MC_Zdecay1_status") = tZ.Zdecay1_status;
431  fillEtaBranch(TzqPartonHistory, "MC_Zdecay1_eta", tZ.Zdecay1_p4);
432  if (std::abs(tZ.Zdecay1_pdgId) == 15)
433  {
434  TzqPartonHistory->auxdecor<int> ("MC_Zdecay1_tau_isHadronic") = tZ.Zdecay1_tau_isHadronic;
435  decorateWithMPtPhi(TzqPartonHistory, "MC_Zdecay1_tauvis", tZ.Zdecay1_tauvis_p4);
436  fillEtaBranch(TzqPartonHistory, "MC_Zdecay1_tauvis_eta", tZ.Zdecay1_tauvis_p4);
437  }
438 
439  //Second Decay (Zdecay2)
440  decorateWithMPtPhi(TzqPartonHistory, "MC_Zdecay2", tZ.Zdecay2_p4);
441  TzqPartonHistory->auxdecor< int >("MC_Zdecay2_pdgId") = tZ.Zdecay2_pdgId;
442  TzqPartonHistory->auxdecor< int >("MC_Zdecay2_status") = tZ.Zdecay2_status;
443  fillEtaBranch(TzqPartonHistory, "MC_Zdecay2_eta", tZ.Zdecay2_p4);
444  if (std::abs(tZ.Zdecay2_pdgId) == 15)
445  {
446  TzqPartonHistory->auxdecor<int> ("MC_Zdecay2_tau_isHadronic") = tZ.Zdecay2_tau_isHadronic;
447  decorateWithMPtPhi(TzqPartonHistory, "MC_Zdecay2_tauvis", tZ.Zdecay2_tauvis_p4);
448  fillEtaBranch(TzqPartonHistory, "MC_Zdecay2_tauvis_eta", tZ.Zdecay2_tauvis_p4);
449  }
450 
451  //b quark
452  decorateWithMPtPhi(TzqPartonHistory, "MC_b", tZ.b_p4);
453  TzqPartonHistory->auxdecor< int >("MC_b_pdgId") = tZ.b_pdgId;
454  fillEtaBranch(TzqPartonHistory, "MC_b_eta", tZ.b_p4);
455 
456  //q quark
457  decorateWithMPtPhi(TzqPartonHistory, "MC_q", tZ.q_p4);
458  TzqPartonHistory->auxdecor< int >("MC_q_pdgId") = tZ.q_pdgId;
459  fillEtaBranch(TzqPartonHistory, "MC_q_eta", tZ.q_p4);
460 
461  TzqPartonHistory->auxdecor< int >("isThqEvent") = tZ.isThq;
462  }
463  }
464  }
465 
467  //Get the Truth Particles
468  const xAOD::TruthParticleContainer* truthParticles(nullptr);
469 
470  if(m_config->getDerivationStream() == "PHYS") //in DAOD_PHYS we don't have the truth particles container
471  {
472  // To obtain both the top and the Z boson, we need the collections for both
473  std::vector<std::string> collections = {"TruthTop", "TruthBosonsWithDecayParticles", "HardScatterParticles"};
474  ATH_CHECK(buildContainerFromMultipleCollections(collections,"AT_TZqPartonHistory_TruthParticles"));
475  ATH_CHECK(evtStore()->retrieve(truthParticles, "AT_TZqPartonHistory_TruthParticles"));
476 
477  //we need to be able to navigate from the Ws to their decayProducts, see CalcTopPartonHistory.h for details
479  }
480  else //otherwise we retrieve the container as usual
481  {
482  ATH_CHECK(evtStore()->retrieve(truthParticles, m_config->sgKeyMCParticle()));
483  }
484 
485  // Create the partonHistory xAOD object
486  //cppcheck-suppress uninitvar
488  //cppcheck-suppress uninitvar
490  partonCont->setStore(partonAuxCont);
491  //cppcheck-suppress uninitvar
492  xAOD::PartonHistory* TzqPartonHistory = new xAOD::PartonHistory {};
493  partonCont->push_back(TzqPartonHistory);
494 
495  // Recover the parton history for TZ events
496  TZHistorySaver(truthParticles, TzqPartonHistory);
497 
498  // Save to StoreGate / TStore
499  std::string outputSGKey = m_config->sgKeyTopPartonHistory();
500  std::string outputSGKeyAux = outputSGKey + "Aux.";
501 
502  StatusCode save = evtStore()->tds()->record(partonCont, outputSGKey);
503  StatusCode saveAux = evtStore()->tds()->record(partonAuxCont, outputSGKeyAux);
504  if (!save || !saveAux) {
505  return StatusCode::FAILURE;
506  }
507 
508  return StatusCode::SUCCESS;
509  }
510 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CalcTzqPartonHistory.h
top::CalcTzqPartonHistory::tZ_values::Zdecay1_tauvis_p4
TLorentzVector Zdecay1_tauvis_p4
Definition: CalcTzqPartonHistory.h:40
xAOD::PartonHistory
Interface class.
Definition: PartonHistory.h:48
top::CalcTzqPartonHistory::tZ_values::Zdecay2_status
int Zdecay2_status
Definition: CalcTzqPartonHistory.h:33
top::CalcTopPartonHistory::buildContainerFromMultipleCollections
StatusCode buildContainerFromMultipleCollections(const std::vector< std::string > &collections, const std::string &out_contName)
used to build container from multiple collections in DAOD_PHYS we don't have the TruthParticles colle...
Definition: CalcTopPartonHistory.cxx:21
top::CalcTzqPartonHistory::tZ_values::Zdecay2_tau_isHadronic
int Zdecay2_tau_isHadronic
Definition: CalcTzqPartonHistory.h:39
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::CalcTopPartonHistory::linkBosonCollections
StatusCode linkBosonCollections()
currently in DAOD_PHYS TruthTop have links to Ws from the TruthBoson collection, which have no link t...
Definition: CalcTopPartonHistory.cxx:39
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
top::CalcTzqPartonHistory::FindLostTop
bool FindLostTop(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &t_beforeFSR_p4, TLorentzVector &t_afterFSR_p4, TLorentzVector &W_p4, TLorentzVector &b_p4, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Definition: CalcTzqPartonHistory.cxx:299
top::CalcTzqPartonHistory::tZ_values::Zdecay2_p4
TLorentzVector Zdecay2_p4
Definition: CalcTzqPartonHistory.h:31
top::CalcTzqPartonHistory::tZ_values::Zdecay1_pdgId
int Zdecay1_pdgId
Definition: CalcTzqPartonHistory.h:29
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
top::CalcTzqPartonHistory::FillZ
void FillZ(const xAOD::TruthParticle *particle)
Definition: CalcTzqPartonHistory.cxx:137
top::CalcTzqPartonHistory::tZ_values::isThq
bool isThq
Definition: CalcTzqPartonHistory.h:50
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
SG::AuxElement::auxdecor
Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name) const
Fetch an aux decoration, as a non-const reference.
top::CalcTzqPartonHistory::execute
virtual StatusCode execute()
Definition: CalcTzqPartonHistory.cxx:466
top::CalcTopPartonHistory::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: CalcTopPartonHistory.h:87
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
top::CalcTzqPartonHistory::CalcTzqPartonHistory
CalcTzqPartonHistory(const std::string &name)
Definition: CalcTzqPartonHistory.cxx:14
top::CalcTzqPartonHistory::findAfterGamma
const xAOD::TruthParticle * findAfterGamma(const xAOD::TruthParticle *particle)
Definition: CalcTzqPartonHistory.cxx:15
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
top::CalcTopPartonHistory::b
bool b(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &b_beforeFSR, TLorentzVector &b_afterFSR)
Store the four-momentum of b (not from tops_ before and after FSR.
Definition: CalcTopPartonHistory.cxx:156
top::PartonHistoryUtils::findAfterFSR
const xAOD::TruthParticle * findAfterFSR(const xAOD::TruthParticle *particle)
Return particle after FSR (before the decay vertex)
Definition: PartonHistoryUtils.cxx:8
top::CalcTzqPartonHistory::tZ_values::q_pdgId
int q_pdgId
Definition: CalcTzqPartonHistory.h:49
top::PartonHistoryUtils::TauIsHadronic
bool TauIsHadronic(const xAOD::TruthParticle *tau, bool &isOk)
Check if tau decays hadronically or not.
Definition: PartonHistoryUtils.cxx:119
lumiFormat.i
int i
Definition: lumiFormat.py:92
top::CalcTzqPartonHistory::sign
int sign(int a)
Definition: CalcTzqPartonHistory.cxx:54
top::CalcTzqPartonHistory::tZ_values::Z_p4
TLorentzVector Z_p4
Definition: CalcTzqPartonHistory.h:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
top::CalcTzqPartonHistory::tZ_values::Zdecay1_status
int Zdecay1_status
Definition: CalcTzqPartonHistory.h:30
PartonHistoryUtils.h
top::CalcTzqPartonHistory::tZ_values::Zdecay2_tauvis_p4
TLorentzVector Zdecay2_tauvis_p4
Definition: CalcTzqPartonHistory.h:41
top::CalcTzqPartonHistory::bottom
bool bottom(const xAOD::TruthParticleContainer *truthParticles, int start)
Definition: CalcTzqPartonHistory.cxx:60
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
top::CalcTopPartonHistory::topAfterFSR_SC
bool topAfterFSR_SC(const xAOD::TruthParticleContainer *truthParticles, int start, TLorentzVector &top_afterFSR_SC_p4)
Store the four-momentum of the post-FSR top or anti-top found using statusCodes This would only work ...
Definition: CalcTopPartonHistory.cxx:83
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
top::CalcTzqPartonHistory::Zllqq
bool Zllqq(const xAOD::TruthParticleContainer *truthParticles, int start)
Store the four-momentum of several particles in the Z decay chain.
Definition: CalcTzqPartonHistory.cxx:72
top::CalcTzqPartonHistory::getFlavourSibling
const xAOD::TruthParticle * getFlavourSibling(const xAOD::TruthParticle *particle)
Definition: CalcTzqPartonHistory.cxx:36
top::CalcTzqPartonHistory::tZ_values::Zdecay1_tau_isHadronic
int Zdecay1_tau_isHadronic
Definition: CalcTzqPartonHistory.h:38
xAOD::TruthParticle_v1::nChildren
size_t nChildren() const
Number of children of this particle.
Definition: TruthParticle_v1.cxx:140
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
xAOD::PartonHistory::IniVarTzq
void IniVarTzq()
Definition: PartonHistory.cxx:559
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
TopConfig.h
top::CalcTzqPartonHistory::FindTZQVertex
bool FindTZQVertex(const xAOD::TruthParticleContainer *truthParticles)
Definition: CalcTzqPartonHistory.cxx:169
top::CalcTzqPartonHistory::tZ_values::Zdecay1_p4
TLorentzVector Zdecay1_p4
Definition: CalcTzqPartonHistory.h:28
top::CalcTopPartonHistory
Definition: CalcTopPartonHistory.h:39
xAOD::TruthParticle_v1::status
int status() const
Status code.
a
TList * a
Definition: liststreamerinfos.cxx:10
top::CalcTzqPartonHistory::tZ_values::reset
void reset()
Definition: CalcTzqPartonHistory.h:52
xAOD::PartonHistoryAuxContainer
Aux Container.
Definition: PartonHistory.h:41
top::CalcTzqPartonHistory::tZ_values::b_pdgId
int b_pdgId
Definition: CalcTzqPartonHistory.h:45
xAOD::TruthParticle_v1::child
const TruthParticle_v1 * child(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:149
top::CalcTzqPartonHistory::tZ
struct top::CalcTzqPartonHistory::tZ_values tZ
top::CalcTzqPartonHistory::FindLostZ
bool FindLostZ(const xAOD::TruthParticleContainer *truthParticles)
Definition: CalcTzqPartonHistory.cxx:99
top::CalcTopPartonHistory::topWb
bool topWb(const xAOD::TruthParticleContainer *truthParticles, int start, TLorentzVector &t_beforeFSR_p4, TLorentzVector &t_afterFSR_p4, TLorentzVector &W_p4, TLorentzVector &b_p4, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Store the four-momentum of several particles in the top decay chain.
Definition: CalcTopPartonHistory.cxx:182
CalcTopPartonHistory.h
xAOD::TruthParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TruthParticle_v1.cxx:196
top::CalcTzqPartonHistory::tZ_values::Zdecay2_pdgId
int Zdecay2_pdgId
Definition: CalcTzqPartonHistory.h:32
top::CalcTzqPartonHistory::tZ_values::q_p4
TLorentzVector q_p4
Definition: CalcTzqPartonHistory.h:48
top::CalcTopPartonHistory::fillEtaBranch
void fillEtaBranch(xAOD::PartonHistory *partonHistory, std::string branchName, TLorentzVector &tlv)
Definition: CalcTopPartonHistory.cxx:692
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
top::CalcTzqPartonHistory::FindLostW
bool FindLostW(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Definition: CalcTzqPartonHistory.cxx:260
top::PartonHistoryUtils::hasParticleIdenticalParent
bool hasParticleIdenticalParent(const xAOD::TruthParticle *particle)
Return true when particle is a top before FSR.
Definition: PartonHistoryUtils.cxx:28
top::CalcTzqPartonHistory::tZ_values::b_p4
TLorentzVector b_p4
Definition: CalcTzqPartonHistory.h:44
top::CalcTzqPartonHistory::TZHistorySaver
void TZHistorySaver(const xAOD::TruthParticleContainer *truthParticles, xAOD::PartonHistory *TzqPartonHistory)
Definition: CalcTzqPartonHistory.cxx:368
top::PartonHistoryUtils::decorateWithMPtPhi
void decorateWithMPtPhi(xAOD::PartonHistory *pHistory, const std::string &prefix, const TLorentzVector &vec)
Perform decoration M, Pt, Phi of the history from a TLorentzVector.
Definition: PartonHistoryUtils.cxx:187
fitman.k
k
Definition: fitman.py:528