Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
5c1c9b5f
Commit
5c1c9b5f
authored
Aug 10, 2020
by
Tomas Dado
Browse files
Made tHq parton history more general
parent
aa3ada56
Changes
5
Hide whitespace changes
Inline
Side-by-side
PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/util/top-xaod.cxx
View file @
5c1c9b5f
...
...
@@ -384,7 +384,7 @@ int main(int argc, char** argv) {
"top::CalcTtbarGammaPartonHistory"
));
top
::
check
(
topPartonHistory
->
setProperty
(
"config"
,
topConfig
),
"Failed to setProperty of top::CalcTtbarGammaPartonHistory"
);
}
else
if
(
settings
->
value
(
"TopPartonHistory"
)
==
"tHq
tautau
"
)
{
}
else
if
(
settings
->
value
(
"TopPartonHistory"
)
==
"tHq"
)
{
topPartonHistory
=
std
::
unique_ptr
<
top
::
CalcTopPartonHistory
>
(
new
top
::
CalcThqPartonHistory
(
"top::CalcThqPartonHistory"
));
top
::
check
(
topPartonHistory
->
setProperty
(
"config"
,
topConfig
),
...
...
PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx
View file @
5c1c9b5f
...
...
@@ -403,7 +403,7 @@ namespace top {
registerParameter
(
"ApplyElectronInJetSubtraction"
,
"Subtract electrons close to jets for boosted analysis : True or False(top default)"
,
"False"
);
registerParameter
(
"TopPartonHistory"
,
"ttbar, tb, Wtb, ttz, ttgamma, tHq
tautau
, False (default)"
,
"False"
);
registerParameter
(
"TopPartonHistory"
,
"ttbar, tb, Wtb, ttz, ttgamma, tHq, False (default)"
,
"False"
);
registerParameter
(
"TopPartonLevel"
,
"Perform parton level analysis (stored in truth tree)? True or False"
,
"True"
);
registerParameter
(
"TopParticleLevel"
,
"Perform particle level selection (stored in particleLevel tree)? True or False"
,
"False"
);
...
...
PhysicsAnalysis/TopPhys/xAOD/TopPartons/Root/CalcThqPartonHistory.cxx
View file @
5c1c9b5f
...
...
@@ -9,112 +9,40 @@
namespace
top
{
CalcThqPartonHistory
::
CalcThqPartonHistory
(
const
std
::
string
&
name
)
:
CalcTopPartonHistory
(
name
)
{}
int
CalcThqPartonHistory
::
sign
(
int
a
)
{
if
(
a
<
0
)
{
return
-
1
;
}
else
return
1
;
}
bool
CalcThqPartonHistory
::
bottom
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
,
int
start
)
{
for
(
const
xAOD
::
TruthParticle
*
particle
:
*
truthParticles
)
{
if
(
particle
->
pdgId
()
!=
start
)
{
continue
;
}
tH
.
b_p4
=
particle
->
p4
();
tH
.
b_pdgId
=
particle
->
pdgId
();
return
true
;
}
return
false
;
}
bool
CalcThqPartonHistory
::
Higgstautau
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
,
int
start
)
{
bool
has_Higgs
=
false
;
bool
has_tau1_neutrino
=
false
;
bool
has_tau2_neutrino
=
false
;
bool
hadr_tau1
=
false
;
bool
hadr_tau2
=
false
;
bool
CalcThqPartonHistory
::
HiggsAndDecay
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
)
{
for
(
const
xAOD
::
TruthParticle
*
particle
:
*
truthParticles
)
{
if
(
particle
->
pdgId
()
!=
start
||
particle
->
nChildren
()
!=
2
)
{
if
(
particle
->
pdgId
()
!=
25
||
particle
->
nChildren
()
!=
2
)
{
continue
;
}
tH
.
Higgs_p4
=
particle
->
p4
();
has_Higgs
=
true
;
for
(
size_t
k
=
0
;
k
<
particle
->
nChildren
();
k
++
)
{
const
xAOD
::
TruthParticle
*
HiggsChildren
=
particle
->
child
(
k
);
if
(
fabs
(
HiggsChildren
->
pdgId
())
==
15
)
{
// demanding tau-leptons as childen
const
xAOD
::
TruthParticle
*
tau
=
PartonHistoryUtils
::
findAfterFSR
(
HiggsChildren
);
if
(
k
==
0
)
{
tH
.
Tau1_from_Higgs_p4
=
tau
->
p4
();
tH
.
Tau1_from_Higgs_pdgId
=
tau
->
pdgId
();
}
else
{
tH
.
Tau2_from_Higgs_p4
=
tau
->
p4
();
tH
.
Tau2_from_Higgs_pdgId
=
tau
->
pdgId
();
}
for
(
size_t
q
=
0
;
q
<
tau
->
nChildren
();
++
q
)
{
const
xAOD
::
TruthParticle
*
tauChildren
=
tau
->
child
(
q
);
if
(
fabs
(
tauChildren
->
pdgId
())
==
16
)
{
// tau neutrino
if
(
k
==
0
)
{
tH
.
nu_from_Tau1_p4
=
tauChildren
->
p4
();
tH
.
nu_from_Tau1_pdgId
=
tauChildren
->
pdgId
();
has_tau1_neutrino
=
true
;
}
else
{
tH
.
nu_from_Tau2_p4
=
tauChildren
->
p4
();
tH
.
nu_from_Tau2_pdgId
=
tauChildren
->
pdgId
();
has_tau2_neutrino
=
true
;
}
}
else
if
(
fabs
(
tauChildren
->
pdgId
())
>=
11
&&
fabs
(
tauChildren
->
pdgId
())
<=
14
)
{
//light leptons
if
(
fabs
(
tauChildren
->
pdgId
())
==
11
||
fabs
(
tauChildren
->
pdgId
())
==
13
)
{
//electron or muon
if
(
k
==
0
)
{
tH
.
W_decay1_from_Tau1_p4
=
tauChildren
->
p4
();
tH
.
W_decay1_from_Tau1_pdgId
=
tauChildren
->
pdgId
();
}
else
{
tH
.
W_decay1_from_Tau2_p4
=
tauChildren
->
p4
();
tH
.
W_decay1_from_Tau2_pdgId
=
tauChildren
->
pdgId
();
}
}
else
if
(
fabs
(
tauChildren
->
pdgId
())
==
12
||
fabs
(
tauChildren
->
pdgId
())
==
14
)
{
// electron or muon
// neutrino
if
(
k
==
0
)
{
tH
.
W_decay2_from_Tau1_p4
=
tauChildren
->
p4
();
tH
.
W_decay2_from_Tau1_pdgId
=
tauChildren
->
pdgId
();
}
else
{
tH
.
W_decay2_from_Tau2_p4
=
tauChildren
->
p4
();
tH
.
W_decay2_from_Tau2_pdgId
=
tauChildren
->
pdgId
();
}
}
}
else
{
// if a particle passes the criteria above, it has to be a hadron.
if
(
k
==
0
)
{
hadr_tau1
=
true
;
}
else
{
hadr_tau2
=
true
;
}
}
// else
}
// for
}
//if
}
//for
}
if
(
has_Higgs
&&
has_tau1_neutrino
&&
has_tau2_neutrino
)
{
if
(
hadr_tau1
)
{
//convention: store hadr. decaying W-Boson as Wdecay1, set all parameters of Wdecay2 to 0.
tH
.
W_decay1_from_Tau1_p4
=
tH
.
Tau1_from_Higgs_p4
-
tH
.
nu_from_Tau1_p4
;
tH
.
W_decay1_from_Tau1_pdgId
=
-
24
*
sign
(
tH
.
nu_from_Tau1_pdgId
);
tH
.
W_decay2_from_Tau1_p4
=
{
0
,
0
,
0
,
0
};
tH
.
W_decay2_from_Tau1_pdgId
=
0
;
tH
.
TauJets1
=
1
;
}
else
if
(
hadr_tau2
)
{
tH
.
W_decay1_from_Tau2_p4
=
tH
.
Tau2_from_Higgs_p4
-
tH
.
nu_from_Tau2_p4
;
tH
.
W_decay1_from_Tau2_pdgId
=
-
24
*
sign
(
tH
.
nu_from_Tau2_pdgId
);
tH
.
W_decay2_from_Tau2_p4
=
{
0
,
0
,
0
,
0
};
tH
.
W_decay2_from_Tau2_pdgId
=
0
;
tH
.
TauJets2
=
1
;
}
const
top
::
PartonHistoryUtils
::
HiggsDecay
&
higgs
=
top
::
PartonHistoryUtils
::
AnalyzeHiggsDecay
(
particle
);
tH
.
decay1_p4
=
higgs
.
decay1_vector
;
tH
.
decay2_p4
=
higgs
.
decay2_vector
;
tH
.
decay1_pdgId
=
higgs
.
decay1_pdgId
;
tH
.
decay2_pdgId
=
higgs
.
decay2_pdgId
;
tH
.
decay1_from_decay1_p4
=
higgs
.
decay1_from_decay1_vector
;
tH
.
decay2_from_decay1_p4
=
higgs
.
decay2_from_decay1_vector
;
tH
.
decay1_from_decay1_pdgId
=
higgs
.
decay1_from_decay1_pdgId
;
tH
.
decay2_from_decay1_pdgId
=
higgs
.
decay2_from_decay1_pdgId
;
tH
.
decay1_from_decay2_p4
=
higgs
.
decay1_from_decay2_vector
;
tH
.
decay2_from_decay2_p4
=
higgs
.
decay2_from_decay2_vector
;
tH
.
decay1_from_decay2_pdgId
=
higgs
.
decay1_from_decay2_pdgId
;
tH
.
decay2_from_decay2_pdgId
=
higgs
.
decay2_from_decay2_pdgId
;
tH
.
decay1_from_W_from_tau1_p4
=
higgs
.
decay1_from_W_from_tau1_vector
;
tH
.
decay2_from_W_from_tau1_p4
=
higgs
.
decay2_from_W_from_tau1_vector
;
tH
.
decay1_from_W_from_tau2_p4
=
higgs
.
decay1_from_W_from_tau2_vector
;
tH
.
decay2_from_W_from_tau2_p4
=
higgs
.
decay2_from_W_from_tau2_vector
;
tH
.
decay1_from_W_from_tau1_pdgId
=
higgs
.
decay1_from_W_from_tau1_pdgId
;
tH
.
decay2_from_W_from_tau1_pdgId
=
higgs
.
decay2_from_W_from_tau1_pdgId
;
tH
.
decay1_from_W_from_tau2_pdgId
=
higgs
.
decay1_from_W_from_tau2_pdgId
;
tH
.
decay2_from_W_from_tau2_pdgId
=
higgs
.
decay2_from_W_from_tau2_pdgId
;
return
true
;
}
tH
.
TauJets1
=
0
;
tH
.
TauJets2
=
0
;
return
false
;
}
...
...
@@ -129,19 +57,18 @@ namespace top {
int
WpDecay1_pdgId
;
int
WpDecay2_pdgId
;
bool
event_top
=
CalcTopPartonHistory
::
topWb
(
truthParticles
,
6
,
t_before
,
t_after
,
Wp
,
b
,
WpDecay1
,
WpDecay1_pdgId
,
WpDecay2
,
WpDecay2_pdgId
);
bool
event_top_SC
=
CalcTopPartonHistory
::
topAfterFSR_SC
(
truthParticles
,
6
,
t_after_SC
);
bool
event_topbar
=
CalcTopPartonHistory
::
topWb
(
truthParticles
,
-
6
,
t_before
,
t_after
,
Wp
,
b
,
WpDecay1
,
WpDecay1_pdgId
,
WpDecay2
,
WpDecay2_pdgId
);
bool
event_topbar_SC
=
CalcTopPartonHistory
::
topAfterFSR_SC
(
truthParticles
,
-
6
,
t_after_SC
);
bool
event_Higgs
=
CalcThqPartonHistory
::
Higgstautau
(
truthParticles
,
25
);
bool
event_bottom
=
CalcThqPartonHistory
::
bottom
(
truthParticles
,
5
);
bool
event_bottombar
=
CalcThqPartonHistory
::
bottom
(
truthParticles
,
-
5
);
const
bool
event_top
=
CalcTopPartonHistory
::
topWb
(
truthParticles
,
6
,
t_before
,
t_after
,
Wp
,
b
,
WpDecay1
,
WpDecay1_pdgId
,
WpDecay2
,
WpDecay2_pdgId
);
const
bool
event_top_SC
=
CalcTopPartonHistory
::
topAfterFSR_SC
(
truthParticles
,
6
,
t_after_SC
);
const
bool
event_topbar
=
CalcTopPartonHistory
::
topWb
(
truthParticles
,
-
6
,
t_before
,
t_after
,
Wp
,
b
,
WpDecay1
,
WpDecay1_pdgId
,
WpDecay2
,
WpDecay2_pdgId
);
const
bool
event_topbar_SC
=
CalcTopPartonHistory
::
topAfterFSR_SC
(
truthParticles
,
-
6
,
t_after_SC
);
const
bool
event_Higgs
=
CalcThqPartonHistory
::
HiggsAndDecay
(
truthParticles
);
if
(
event_Higgs
)
{
if
(
(
event_top
&&
event_bottombar
)
||
(
event_topbar
&&
event_bottom
)
)
{
if
(
event_top
||
event_topbar
)
{
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_t_beforeFSR_m"
)
=
t_before
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_t_beforeFSR_pt"
)
=
t_before
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_t_beforeFSR_phi"
)
=
t_before
.
Phi
();
...
...
@@ -187,72 +114,76 @@ namespace top {
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_phi"
)
=
tH
.
Higgs_p4
.
Phi
();
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_eta"
,
tH
.
Higgs_p4
);
//First Tau (Tau1)
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_m"
)
=
tH
.
Tau1_from_Higgs_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_pt"
)
=
tH
.
Tau1_from_Higgs_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_phi"
)
=
tH
.
Tau1_from_Higgs_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Tau1_from_Higgs_pdgId"
)
=
tH
.
Tau1_from_Higgs_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Tau1_from_Higgs_eta"
,
tH
.
Tau1_from_Higgs_p4
);
//Second Tau (Tau2)
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_m"
)
=
tH
.
Tau2_from_Higgs_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_pt"
)
=
tH
.
Tau2_from_Higgs_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_phi"
)
=
tH
.
Tau2_from_Higgs_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Tau2_from_Higgs_pdgId"
)
=
tH
.
Tau2_from_Higgs_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Tau2_from_Higgs_eta"
,
tH
.
Tau2_from_Higgs_p4
);
//neutrino from first Tau (Tau1)
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_m"
)
=
tH
.
nu_from_Tau1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_pt"
)
=
tH
.
nu_from_Tau1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_phi"
)
=
tH
.
nu_from_Tau1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_nu_from_Tau1_pdgId"
)
=
tH
.
nu_from_Tau1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_nu_from_Tau1_eta"
,
tH
.
nu_from_Tau1_p4
);
//neutrino from second Tau (Tau2)
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_m"
)
=
tH
.
nu_from_Tau2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_pt"
)
=
tH
.
nu_from_Tau2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_phi"
)
=
tH
.
nu_from_Tau2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_nu_from_Tau2_pdgId"
)
=
tH
.
nu_from_Tau2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_nu_from_Tau2_eta"
,
tH
.
nu_from_Tau2_p4
);
//First hadronic decay product from the W-Boson from Tau1
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_m"
)
=
tH
.
W_decay1_from_Tau1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_pt"
)
=
tH
.
W_decay1_from_Tau1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_phi"
)
=
tH
.
W_decay1_from_Tau1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Wdecay1_from_Tau1_pdgId"
)
=
tH
.
W_decay1_from_Tau1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Wdecay1_from_Tau1_eta"
,
tH
.
W_decay1_from_Tau1_p4
);
//Second hadronic decay product from the W-Boson from Tau1
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_m"
)
=
tH
.
W_decay2_from_Tau1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_pt"
)
=
tH
.
W_decay2_from_Tau1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_phi"
)
=
tH
.
W_decay2_from_Tau1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Wdecay2_from_Tau1_pdgId"
)
=
tH
.
W_decay2_from_Tau1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Wdecay2_from_Tau1_eta"
,
tH
.
W_decay2_from_Tau1_p4
);
//First leptonic decay product from the W-Boson from Tau2
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_m"
)
=
tH
.
W_decay1_from_Tau2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_pt"
)
=
tH
.
W_decay1_from_Tau2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_phi"
)
=
tH
.
W_decay1_from_Tau2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Wdecay1_from_Tau2_pdgId"
)
=
tH
.
W_decay1_from_Tau2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Wdecay1_from_Tau2_eta"
,
tH
.
W_decay1_from_Tau2_p4
);
//Second leptonic decay product from the W-Boson from Tau2
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_m"
)
=
tH
.
W_decay2_from_Tau2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_pt"
)
=
tH
.
W_decay2_from_Tau2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_phi"
)
=
tH
.
W_decay2_from_Tau2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Wdecay2_from_Tau2_pdgId"
)
=
tH
.
W_decay2_from_Tau2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Wdecay2_from_Tau2_eta"
,
tH
.
W_decay2_from_Tau2_p4
);
//b quark
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_b_m"
)
=
tH
.
b_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_b_pt"
)
=
tH
.
b_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_b_phi"
)
=
tH
.
b_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_b_pdgId"
)
=
tH
.
b_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_b_eta"
,
tH
.
b_p4
);
//Hadr. Variables
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_hadr_Tau_Jet1"
)
=
tH
.
TauJets1
;
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_hadr_Tau_Jet2"
)
=
tH
.
TauJets2
;
//Higgs-decay1-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_m"
)
=
tH
.
decay1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_pt"
)
=
tH
.
decay1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_phi"
)
=
tH
.
decay1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_pdgId"
)
=
tH
.
decay1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay1_eta"
,
tH
.
decay1_p4
);
//Higgs-decay2-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_m"
)
=
tH
.
decay2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_pt"
)
=
tH
.
decay2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_phi"
)
=
tH
.
decay2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_pdgId"
)
=
tH
.
decay2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay2_eta"
,
tH
.
decay2_p4
);
//Higgs-decay1- from decay1-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_m"
)
=
tH
.
decay1_from_decay1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_pt"
)
=
tH
.
decay1_from_decay1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_phi"
)
=
tH
.
decay1_from_decay1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_decay1_pdgId"
)
=
tH
.
decay1_from_decay1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay1_from_decay1_eta"
,
tH
.
decay1_from_decay1_p4
);
//Higgs-decay2- from decay1-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_m"
)
=
tH
.
decay2_from_decay1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_pt"
)
=
tH
.
decay2_from_decay1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_phi"
)
=
tH
.
decay2_from_decay1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_decay1_pdgId"
)
=
tH
.
decay2_from_decay1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay2_from_decay1_eta"
,
tH
.
decay2_from_decay1_p4
);
//Higgs-decay1- from decay2-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_m"
)
=
tH
.
decay1_from_decay2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_pt"
)
=
tH
.
decay1_from_decay2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_phi"
)
=
tH
.
decay1_from_decay2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_decay2_pdgId"
)
=
tH
.
decay1_from_decay2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay1_from_decay2_eta"
,
tH
.
decay1_from_decay2_p4
);
//Higgs-decay2- from decay2-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_m"
)
=
tH
.
decay2_from_decay2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_pt"
)
=
tH
.
decay2_from_decay2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_phi"
)
=
tH
.
decay2_from_decay2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_decay2_pdgId"
)
=
tH
.
decay2_from_decay2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay2_from_decay2_eta"
,
tH
.
decay2_from_decay2_p4
);
//Higgs-decay1- from W from tau1-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_m"
)
=
tH
.
decay1_from_W_from_tau1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_pt"
)
=
tH
.
decay1_from_W_from_tau1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_phi"
)
=
tH
.
decay1_from_W_from_tau1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_W_from_tau1_pdgId"
)
=
tH
.
decay1_from_W_from_tau1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay1_from_W_from_tau1_eta"
,
tH
.
decay1_from_W_from_tau1_p4
);
//Higgs-decay2- from W from tau1-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_m"
)
=
tH
.
decay2_from_W_from_tau1_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_pt"
)
=
tH
.
decay2_from_W_from_tau1_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_phi"
)
=
tH
.
decay2_from_W_from_tau1_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_W_from_tau1_pdgId"
)
=
tH
.
decay2_from_W_from_tau1_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay2_from_W_from_tau1_eta"
,
tH
.
decay2_from_W_from_tau1_p4
);
//Higgs-decay1- from W from tau2-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_m"
)
=
tH
.
decay1_from_W_from_tau2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_pt"
)
=
tH
.
decay1_from_W_from_tau2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_phi"
)
=
tH
.
decay1_from_W_from_tau2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_W_from_tau2_pdgId"
)
=
tH
.
decay1_from_W_from_tau2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay1_from_W_from_tau2_eta"
,
tH
.
decay1_from_W_from_tau2_p4
);
//Higgs-decay2- from W from tau2-Variables
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_m"
)
=
tH
.
decay2_from_W_from_tau2_p4
.
M
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_pt"
)
=
tH
.
decay2_from_W_from_tau2_p4
.
Pt
();
ThqPartonHistory
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_phi"
)
=
tH
.
decay2_from_W_from_tau2_p4
.
Phi
();
ThqPartonHistory
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_W_from_tau2_pdgId"
)
=
tH
.
decay2_from_W_from_tau2_pdgId
;
fillEtaBranch
(
ThqPartonHistory
,
"MC_Higgs_decay2_from_W_from_tau2_eta"
,
tH
.
decay2_from_W_from_tau2_p4
);
}
}
}
...
...
PhysicsAnalysis/TopPhys/xAOD/TopPartons/Root/PartonHistory.cxx
View file @
5c1c9b5f
...
...
@@ -512,63 +512,66 @@ namespace xAOD {
this
->
auxdecor
<
float
>
(
"MC_Higgs_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau1_from_Higgs_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Tau1_from_Higgs_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Tau2_from_Higgs_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Tau2_from_Higgs_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau1_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_nu_from_Tau1_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_nu_from_Tau2_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_nu_from_Tau2_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau1_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Wdecay1_from_Tau1_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau1_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Wdecay2_from_Tau1_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay1_from_Tau2_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Wdecay1_from_Tau2_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Wdecay2_from_Tau2_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Wdecay2_from_Tau2_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
float
>
(
"MC_b_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_b_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_b_eta"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_b_phi"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_b_pdgId"
)
=
-
9999
;
this
->
auxdecor
<
int
>
(
"MC_hadr_Tau_Jet1"
)
=
0
;
this
->
auxdecor
<
int
>
(
"MC_hadr_Tau_Jet2"
)
=
0
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay1_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_decay1_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay1_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_decay1_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_decay2_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_decay2_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_decay2_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_decay2_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau1_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_W_from_tau1_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau1_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_W_from_tau1_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay1_from_W_from_tau2_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay1_from_W_from_tau2_pdgId"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_m"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_pt"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_phi"
)
=
-
1000
;
this
->
auxdecor
<
float
>
(
"MC_Higgs_decay2_from_W_from_tau2_eta"
)
=
-
1000
;
this
->
auxdecor
<
int
>
(
"MC_Higgs_decay2_from_W_from_tau2_pdgId"
)
=
-
1000
;
}
}
ADD_NS_DV_PROXY
(
xAOD
,
PartonHistoryContainer
);
PhysicsAnalysis/TopPhys/xAOD/TopPartons/TopPartons/CalcThqPartonHistory.h
View file @
5c1c9b5f
...
...
@@ -25,30 +25,26 @@ namespace top {
struct
tH_values
{
//Higgs
TLorentzVector
Higgs_p4
;
TLorentzVector
Tau1_from_Higgs_p4
;
int
Tau1_from_Higgs_pdgId
;
TLorentzVector
Tau2_from_Higgs_p4
;
int
Tau2_from_Higgs_pdgId
;
TLorentzVector
nu_from_Tau1_p4
;
int
nu_from_Tau1_pdgId
;
TLorentzVector
nu_from_Tau2_p4
;
int
nu_from_Tau2_pdgId
;
TLorentzVector
W_decay1_from_Tau1_p4
;
int
W_decay1_from_Tau1_pdgId
;
TLorentzVector
W_decay2_from_Tau1_p4
;
int
W_decay2_from_Tau1_pdgId
;
TLorentzVector
W_decay1_from_Tau2_p4
;
int
W_decay1_from_Tau2_pdgId
;
TLorentzVector
W_decay2_from_Tau2_p4
;
int
W_decay2_from_Tau2_pdgId
;
//Bools
int
TauJets1
;
int
TauJets2
;
//b
TLorentzVector
b_p4
;
int
b_pdgId
;
TLorentzVector
decay1_p4
;
TLorentzVector
decay2_p4
;
int
decay1_pdgId
;
int
decay2_pdgId
;
TLorentzVector
decay1_from_decay1_p4
;
TLorentzVector
decay2_from_decay1_p4
;
int
decay1_from_decay1_pdgId
;
int
decay2_from_decay1_pdgId
;
TLorentzVector
decay1_from_decay2_p4
;
TLorentzVector
decay2_from_decay2_p4
;
int
decay1_from_decay2_pdgId
;
int
decay2_from_decay2_pdgId
;
TLorentzVector
decay1_from_W_from_tau1_p4
;
TLorentzVector
decay2_from_W_from_tau1_p4
;
TLorentzVector
decay1_from_W_from_tau2_p4
;
TLorentzVector
decay2_from_W_from_tau2_p4
;
int
decay1_from_W_from_tau1_pdgId
;
int
decay2_from_W_from_tau1_pdgId
;
int
decay1_from_W_from_tau2_pdgId
;
int
decay2_from_W_from_tau2_pdgId
;
}
tH
;
//Storing parton history for ttbar resonance analysis
CalcThqPartonHistory
(
const
CalcThqPartonHistory
&
rhs
)
=
delete
;
...
...
@@ -58,12 +54,7 @@ namespace top {
void
THHistorySaver
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
,
xAOD
::
PartonHistory
*
ThqPartonHistory
);
///Store the four-momentum of several particles in the Higgs decay chain
bool
Higgstautau
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
,
int
start
);
//Store four-momentum of bottom quark
bool
bottom
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
,
int
start
);
int
sign
(
int
a
);
bool
HiggsAndDecay
(
const
xAOD
::
TruthParticleContainer
*
truthParticles
);
virtual
StatusCode
execute
();
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment