![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
44 declareInterface<DerivationFramework::IAugmentationTool>(
this);
87 dec_genFiltHT, dec_genFiltHTinclNu, dec_genFiltMET, dec_genFiltPTZ, dec_genFiltFatJ
94 return StatusCode::SUCCESS;
98 const EventContext& ctx = Gaudi::Hive::currentContext();
100 if (!eventInfo.isValid()) {
102 return StatusCode::FAILURE;
106 float genFiltHT{0.f}, genFiltHTinclNu{0.f}, genFiltMET{0.f}, genFiltPTZ{0.f}, genFiltFatJ{0.f};
109 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 );
111 dec_genFiltHT(*eventInfo) = genFiltHT;
112 dec_genFiltHTinclNu(*eventInfo) = genFiltHTinclNu;
113 dec_genFiltMET(*eventInfo) = genFiltMET;
114 dec_genFiltPTZ(*eventInfo) = genFiltPTZ;
115 dec_genFiltFatJ(*eventInfo) = genFiltFatJ;
117 return StatusCode::SUCCESS;
124 if (!tpc.isValid()) {
126 return StatusCode::FAILURE;
130 if (!truthjets.isValid()){
132 return StatusCode::FAILURE;
137 genFiltHTinclNu = 0.;
138 for (
const auto *
const tj : *truthjets) {
141 <<
", eta " << tj->eta()
142 <<
", phi " << tj->phi()
143 <<
", nconst = " << tj->numConstituents());
144 genFiltHT += tj->pt();
145 genFiltHTinclNu += tj->pt();
150 float MEx(0.), MEy(0.);
151 for (
const auto *
const tp : *tpc){
152 int pdgid =
tp->pdgId();
160 <<
", eta " <<
tp->eta()
161 <<
", phi " <<
tp->phi()
162 <<
", status " <<
tp->status()
163 <<
", pdgId " << pdgid);
164 genFiltHT +=
tp->pt();
165 genFiltHTinclNu +=
tp->pt();
172 if (
tp->isNeutrino() && isFromWZTau(
tp)) {
174 <<
", eta " <<
tp->eta()
175 <<
", phi " <<
tp->phi()
176 <<
", status " <<
tp->status()
177 <<
", pdgId " << pdgid);
178 genFiltHTinclNu +=
tp->pt();
183 <<
", eta " <<
tp->eta()
184 <<
", phi " <<
tp->phi()
185 <<
", status " <<
tp->status()
186 <<
", pdgId " << pdgid);
191 genFiltMET = sqrt(MEx*MEx+MEy*MEy);
195 float MinPt_PTZ(5000.), MaxEta_PTZ(5.0), MinMass_PTZ(20000.), MaxMass_PTZ(14000000.);
196 bool AllowElecMu_PTZ =
false;
197 bool AllowSameCharge_PTZ =
false;
199 int pdgId1 = pitr1->pdgId();
203 if (std::abs(pdgId1) == 11 || std::abs(pdgId1) == 13) {
204 if (pitr1->pt() >= MinPt_PTZ && std::abs(pitr1->eta()) <= MaxEta_PTZ){
206 if (pitr2==pitr1)
continue;
209 int pdgId2 = pitr2->pdgId();
213 if ((AllowSameCharge_PTZ && (std::abs(pdgId2) == std::abs(pdgId1) || (AllowElecMu_PTZ && (std::abs(pdgId2) == 11 || std::abs(pdgId2) == 13) ) ) ) ||
214 (!AllowSameCharge_PTZ && (pdgId2 == -1*pdgId1 || (AllowElecMu_PTZ && (pdgId2 == (pdgId1 < 0 ? 1 : -1) * 11 || (pdgId1 < 0 ? 1 : -1) * pdgId2 == 13) ) ) ) ) {
215 if (pitr2->pt() >= MinPt_PTZ && std::abs(pitr2->eta()) <= MaxEta_PTZ){
216 double invMass = (pitr1->p4()+pitr2->p4()).M();
217 double dilepPt = (pitr1->p4()+pitr2->p4()).
Pt();
220 if (dilepPt > PtZ) PtZ = dilepPt;
233 if ( !truthjets10.isValid()){
235 return StatusCode::FAILURE;
238 for (
const auto *
const j : *truthjets10) {
239 if (j->pt()>genFiltFatJ) genFiltFatJ=j->pt();
243 return StatusCode::SUCCESS;
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
static AuxTypeRegistry & instance()
Return the singleton registry instance.
bool isSpecialNonInteracting(const T &p)
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Helper class to provide type-safe access to aux data.
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.
::StatusCode StatusCode
StatusCode definition for legacy code.
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)
bool isZeroEnergyPhoton(const T &p)
Identify a photon with zero energy. Probably a workaround for a generator bug.