ATLAS Offline Software
CalcTopPartonHistory.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 // $Id: CalcTopPartonHistory.h 800464 2017-03-13 18:06:24Z tpelzer $
6 #ifndef ANALYSISTOP_TOPPARTONS_CALCTOPPARTONHISTORY_H
7 #define ANALYSISTOP_TOPPARTONS_CALCTOPPARTONHISTORY_H
8 
22 // system include(s):
23 #include <memory>
24 #include <vector>
25 
26 // Framework include(s):
27 #include "AsgTools/AsgTool.h"
32 
33 // forward declaration(s):
34 namespace top {
35  class TopConfig;
36 }
37 
38 namespace top {
40  public:
41  explicit CalcTopPartonHistory(const std::string& name);
42  virtual ~CalcTopPartonHistory() {};
43 
47 
53  bool topAfterFSR_SC(const xAOD::TruthParticleContainer* truthParticles, int start,
54  TLorentzVector& top_afterFSR_SC_p4);
55 
57  bool topWb(const xAOD::TruthParticleContainer* truthParticles, int start, TLorentzVector& t_beforeFSR_p4,
58  TLorentzVector& t_afterFSR_p4, TLorentzVector& W_p4, TLorentzVector& b_p4, TLorentzVector& Wdecay1_p4,
59  int& Wdecay1_pdgId, TLorentzVector& Wdecay2_p4, int& Wdecay2_pdgId);
60  bool topWq(const xAOD::TruthParticleContainer* truthParticles, int start, TLorentzVector& t_beforeFSR_p4,
61  TLorentzVector& t_afterFSR_p4, TLorentzVector& W_p4, TLorentzVector& q_p4, int& q_pdgId,
62  TLorentzVector& Wdecay1_p4, int& Wdecay1_pdgId, TLorentzVector& Wdecay2_p4, int& Wdecay2_pdgId);
63 
65  bool b(const xAOD::TruthParticleContainer* truthParticles, TLorentzVector& b_beforeFSR, TLorentzVector& b_afterFSR);
66 
68  bool Wlv(const xAOD::TruthParticleContainer* truthParticles, TLorentzVector& W_p4, TLorentzVector& Wdecay1_p4,
69  int& Wdecay1_pdgId, TLorentzVector& Wdecay2_p4, int& Wdecay2_pdgId);
70 
72  bool Wt_W(const xAOD::TruthParticleContainer* truthParticles, TLorentzVector& W_p4, int& W_pdgId,
73  TLorentzVector& Wdecay1_p4, int& Wdecay1_pdgId, TLorentzVector& Wdecay2_p4, int& Wdecay2_pdgId);
74 
76  bool Wt_b(const xAOD::TruthParticleContainer* truthParticles, TLorentzVector& b_beforeFSR,
77  TLorentzVector& b_afterFSR, int& b_pdgId);
78 
80  bool topPhWb(const xAOD::TruthParticleContainer* truthParticles, int topId, TLorentzVector& t_beforeFSR_p4,
81  TLorentzVector& t_afterFSR_p4, TLorentzVector& Ph_p4, TLorentzVector& W_p4, TLorentzVector& b_p4,
82  TLorentzVector& Wdecay1_p4, int& Wdecay1_pdgId, TLorentzVector& Wdecay2_p4, int& Wdecay2_pdgId,
83  bool& has_ph, int& BranchType, int& IniPartonType, bool& missingTop);
84 
85  virtual StatusCode execute();
86  protected:
87  std::shared_ptr<top::TopConfig> m_config;
88 
89  void fillEtaBranch(xAOD::PartonHistory* partonHistory, std:: string branchName, TLorentzVector& tlv);
90 
95  StatusCode buildContainerFromMultipleCollections(const std::vector<std::string> &collections, const std::string& out_contName);
96 
103 
105  const xAOD::TruthParticle* getTruthParticleLinkedFromDecoration(const xAOD::TruthParticle* part, const std::string &decorationName);
106 
107  private:
111  StatusCode decorateCollectionWithLinksToAnotherCollection(const std::string &collectionToDecorate, const std::string &collectionToLink, const std::string &nameOfDecoration);
112 
113  };
114 }
115 
116 #endif
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::PartonHistory
Interface class.
Definition: PartonHistory.h:48
top::CalcTopPartonHistory::CalcTopPartonHistory
CalcTopPartonHistory(CalcTopPartonHistory &&rhs)=delete
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
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
top::CalcTopPartonHistory::topPhWb
bool topPhWb(const xAOD::TruthParticleContainer *truthParticles, int topId, TLorentzVector &t_beforeFSR_p4, TLorentzVector &t_afterFSR_p4, TLorentzVector &Ph_p4, TLorentzVector &W_p4, TLorentzVector &b_p4, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId, bool &has_ph, int &BranchType, int &IniPartonType, bool &missingTop)
Store the four-momentum of photon coming from virtual top in ttgamma events.
Definition: CalcTopPartonHistory.cxx:448
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
TruthParticleContainer.h
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
top::CalcTopPartonHistory::getTruthParticleLinkedFromDecoration
const xAOD::TruthParticle * getTruthParticleLinkedFromDecoration(const xAOD::TruthParticle *part, const std::string &decorationName)
helper method to handle retriveing the truth particle linked in the decoration of another particle
Definition: CalcTopPartonHistory.cxx:69
top::CalcTopPartonHistory::Wt_b
bool Wt_b(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &b_beforeFSR, TLorentzVector &b_afterFSR, int &b_pdgId)
Store the four-momentum of b quark that is NOT from top in Wt(b) ST events.
Definition: CalcTopPartonHistory.cxx:403
top::CalcTopPartonHistory::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: CalcTopPartonHistory.h:87
top::CalcTopPartonHistory::Wt_W
bool Wt_W(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &W_p4, int &W_pdgId, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Store the four-momentum of several particles in W decay chain for W that is NOT from top in Wt ST eve...
Definition: CalcTopPartonHistory.cxx:345
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
PartonHistory.h
top::CalcTopPartonHistory::execute
virtual StatusCode execute()
Definition: CalcTopPartonHistory.cxx:650
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::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
top::CalcTopPartonHistory::topWq
bool topWq(const xAOD::TruthParticleContainer *truthParticles, int start, TLorentzVector &t_beforeFSR_p4, TLorentzVector &t_afterFSR_p4, TLorentzVector &W_p4, TLorentzVector &q_p4, int &q_pdgId, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Definition: CalcTopPartonHistory.cxx:246
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
top::CalcTopPartonHistory::~CalcTopPartonHistory
virtual ~CalcTopPartonHistory()
Definition: CalcTopPartonHistory.h:42
top::CalcTopPartonHistory::Wlv
bool Wlv(const xAOD::TruthParticleContainer *truthParticles, TLorentzVector &W_p4, TLorentzVector &Wdecay1_p4, int &Wdecay1_pdgId, TLorentzVector &Wdecay2_p4, int &Wdecay2_pdgId)
Store the four-momentum of several particles in the W decay chain.
Definition: CalcTopPartonHistory.cxx:305
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
top::CalcTopPartonHistory
Definition: CalcTopPartonHistory.h:39
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
top::CalcTopPartonHistory::CalcTopPartonHistory
CalcTopPartonHistory(const std::string &name)
Definition: CalcTopPartonHistory.cxx:15
top::CalcTopPartonHistory::CalcTopPartonHistory
CalcTopPartonHistory(const CalcTopPartonHistory &rhs)=delete
top::CalcTopPartonHistory::decorateCollectionWithLinksToAnotherCollection
StatusCode decorateCollectionWithLinksToAnotherCollection(const std::string &collectionToDecorate, const std::string &collectionToLink, const std::string &nameOfDecoration)
helper method currently used in DAOD_PHYS to link particles from a given collection to the same parti...
Definition: CalcTopPartonHistory.cxx:44
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
top::CalcTopPartonHistory::fillEtaBranch
void fillEtaBranch(xAOD::PartonHistory *partonHistory, std::string branchName, TLorentzVector &tlv)
Definition: CalcTopPartonHistory.cxx:692
AsgTool.h
top::CalcTopPartonHistory::operator=
CalcTopPartonHistory & operator=(const CalcTopPartonHistory &rhs)=delete
AuxElement.h
Base class for elements of a container that can have aux data.