 |
ATLAS Offline Software
|
#include <GenFilterTool.h>
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this,"EventInfoName" , "EventInfo"} |
|
SG::ReadHandleKey< xAOD::TruthParticleContainer > | m_mcKey {this, "MCCollectionName", "TruthParticles"} |
|
SG::ReadHandleKey< xAOD::JetContainer > | m_truthJetsKey {this, "TruthJetCollectionName", "AntiKt4TruthWZJets"} |
|
SG::ReadHandleKey< xAOD::JetContainer > | m_truthFatJetsKey {this, "TruthFatJetCollectionName", "AntiKt10TruthJets"} |
|
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > | m_mcReadDecor {this, "TruthClassKey",m_mcKey,"classifierParticleOrigin"} |
|
SG::WriteDecorHandleKeyArray< xAOD::EventInfo > | m_decorKeys {this, "DecorationKeys", {} , "Decorations added to the eventinfo"} |
|
SG::WriteDecorHandleKey< xAOD::EventInfo > | m_dec_genFiltHTKey { this, "GenFiltHTKey", m_eventInfoKey, "GenFiltHT", "GenFiltHT EventInfo decoration name" } |
|
SG::WriteDecorHandleKey< xAOD::EventInfo > | m_dec_genFiltHTinclNuKey { this, "GenFiltHTinclNuKey", m_eventInfoKey, "GenFiltHTinclNu", "GenFiltHTinclNu EventInfo decoration name" } |
|
SG::WriteDecorHandleKey< xAOD::EventInfo > | m_dec_genFiltMETKey { this, "GenFiltMET", m_eventInfoKey, "GenFiltMET", "GenFiltMET EventInfo decoration name" } |
|
SG::WriteDecorHandleKey< xAOD::EventInfo > | m_dec_genFiltPTZKey { this, "GenFiltPTZ", m_eventInfoKey, "GenFiltPTZ", "GenFiltPTZ EventInfo decoration name" } |
|
SG::WriteDecorHandleKey< xAOD::EventInfo > | m_dec_genFiltFatJKey { this, "GenFiltFatJ", m_eventInfoKey, "GenFiltFatJ", "GenFiltFatJ EventInfo decoration name" } |
|
Gaudi::Property< float > | m_MinJetPt {this, "MinJetPt", 35.* Gaudi::Units::GeV} |
| Min pT for the truth jets. More...
|
|
Gaudi::Property< float > | m_MaxJetEta {this, "MaxJetEta", 2.5} |
| Max eta for the truth jets. More...
|
|
Gaudi::Property< float > | m_MinLepPt {this,"MinLeptonPt", 25.*Gaudi::Units::GeV} |
| Min pT for the truth leptons. More...
|
|
Gaudi::Property< float > | m_MaxLepEta {this, "MaxLeptonEta", 2.5} |
| Max eta for the truth leptons. More...
|
|
PublicToolHandle< IMCTruthClassifier > | m_classif {this, "TruthClassifier", "MCTruthClassifier/DFCommonTruthClassifier"} |
|
Definition at line 34 of file GenFilterTool.h.
◆ GenFilterTool()
DerivationFramework::GenFilterTool::GenFilterTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~GenFilterTool()
DerivationFramework::GenFilterTool::~GenFilterTool |
( |
| ) |
|
|
default |
◆ addBranches()
StatusCode DerivationFramework::GenFilterTool::addBranches |
( |
| ) |
const |
|
finaloverridevirtual |
Definition at line 86 of file GenFilterTool.cxx.
88 const EventContext& ctx = Gaudi::Hive::currentContext();
92 return StatusCode::FAILURE;
96 float genFiltHT{0.f}, genFiltHTinclNu{0.f}, genFiltMET{0.f}, genFiltPTZ{0.f}, genFiltFatJ{0.f};
99 ATH_MSG_DEBUG(
"Computed generator filter quantities: HT " << genFiltHT/1
e3 <<
", HTinclNu " << genFiltHTinclNu/1
e3 <<
", MET " << genFiltMET/1
e3 <<
", PTZ " << genFiltPTZ/1
e3 <<
", FatJ " << genFiltFatJ/1
e3 );
107 return StatusCode::SUCCESS;
◆ getGenFiltVars()
StatusCode DerivationFramework::GenFilterTool::getGenFiltVars |
( |
const EventContext & |
ctx, |
|
|
float & |
genFiltHT, |
|
|
float & |
genFiltHTinclNu, |
|
|
float & |
genFiltMET, |
|
|
float & |
genFiltPTZ, |
|
|
float & |
genFiltFatJ |
|
) |
| const |
|
private |
Definition at line 110 of file GenFilterTool.cxx.
114 if (!mcParticleOrigin.isValid()) {
116 return StatusCode::FAILURE;
120 if (!truthjets.isValid()){
122 return StatusCode::FAILURE;
127 genFiltHTinclNu = 0.;
128 for (
const auto *
const tj : *truthjets) {
131 <<
", eta " << tj->eta()
132 <<
", phi " << tj->phi()
133 <<
", nconst = " << tj->numConstituents());
134 genFiltHT += tj->pt();
135 genFiltHTinclNu += tj->pt();
140 float MEx(0.), MEy(0.);
141 for (
const auto *
const tp : *mcParticleOrigin){
142 int pdgid =
tp->pdgId();
150 genFiltHT +=
tp->pt();
151 genFiltHTinclNu +=
tp->pt();
158 unsigned int orig = mcParticleOrigin (*
tp);
159 if (
tp->isNeutrino() && isFromWZTau(orig)) {
161 <<
", eta " <<
tp->eta()
162 <<
", phi " <<
tp->phi()
163 <<
", status " <<
tp->status()
164 <<
", pdgId " << pdgid);
165 genFiltHTinclNu +=
tp->pt();
170 <<
", eta " <<
tp->eta()
171 <<
", phi " <<
tp->phi()
172 <<
", status " <<
tp->status()
173 <<
", pdgId " << pdgid);
178 genFiltMET = sqrt(MEx*MEx+MEy*MEy);
182 float MinPt_PTZ(5000.), MaxEta_PTZ(5.0), MinMass_PTZ(20000.), MaxMass_PTZ(14000000.);
183 bool AllowElecMu_PTZ =
false;
184 bool AllowSameCharge_PTZ =
false;
186 const int pdgId1 = pitr1->pdgId();
191 if (pitr1->pt() >= MinPt_PTZ && std::abs(pitr1->eta()) <= MaxEta_PTZ){
193 if (pitr2==pitr1)
continue;
196 const int pdgId2 = pitr2->pdgId();
201 if ( ( AllowSameCharge_PTZ && ( AllowElecMu_PTZ || std::abs(pdgId2) == std::abs(pdgId1) ) ) ||
202 ( !AllowSameCharge_PTZ && ( pdgId2 == -1*pdgId1 || (AllowElecMu_PTZ &&
MC::charge3(pdgId1) ==
MC::charge3(pdgId2) ) ) )
204 if (pitr2->pt() >= MinPt_PTZ && std::abs(pitr2->eta()) <= MaxEta_PTZ){
205 double invMass = (pitr1->p4()+pitr2->p4()).M();
206 double dilepPt = (pitr1->p4()+pitr2->p4()).
Pt();
209 if (dilepPt > PtZ) PtZ = dilepPt;
222 if ( !truthjets10.isValid()){
224 return StatusCode::FAILURE;
227 for (
const auto *
const j : *truthjets10) {
228 if (j->pt()>genFiltFatJ) genFiltFatJ=j->pt();
232 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::GenFilterTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ isPrompt()
◆ m_classif
◆ m_dec_genFiltFatJKey
◆ m_dec_genFiltHTinclNuKey
◆ m_dec_genFiltHTKey
◆ m_dec_genFiltMETKey
◆ m_dec_genFiltPTZKey
◆ m_decorKeys
◆ m_eventInfoKey
◆ m_MaxJetEta
Gaudi::Property<float> DerivationFramework::GenFilterTool::m_MaxJetEta {this, "MaxJetEta", 2.5} |
|
private |
◆ m_MaxLepEta
Gaudi::Property<float> DerivationFramework::GenFilterTool::m_MaxLepEta {this, "MaxLeptonEta", 2.5} |
|
private |
◆ m_mcKey
◆ m_mcReadDecor
◆ m_MinJetPt
Gaudi::Property<float> DerivationFramework::GenFilterTool::m_MinJetPt {this, "MinJetPt", 35.* Gaudi::Units::GeV} |
|
private |
◆ m_MinLepPt
Gaudi::Property<float> DerivationFramework::GenFilterTool::m_MinLepPt {this,"MinLeptonPt", 25.*Gaudi::Units::GeV} |
|
private |
◆ m_truthFatJetsKey
◆ m_truthJetsKey
The documentation for this class was generated from the following files:
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
bool isSpecialNonInteracting(const T &p)
Identify a special non-interacting particles.
#define ATH_MSG_VERBOSE(x)
Handle class for reading a decoration on an object.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isZeroEnergyPhoton(const T &p)
Identify a photon with zero energy. Probably a workaround for a generator bug.