|
ATLAS Offline Software
|
a tool to classify particles based on their type and origin
More...
#include <TruthClassificationTool.h>
|
| TruthClassificationTool (const std::string &type) |
|
virtual StatusCode | classify (const xAOD::IParticle &particle, unsigned int &classification) const override |
| classify and return unsigned int More...
|
|
virtual StatusCode | classify (const xAOD::IParticle &particle, Truth::Type &classification) const override |
| classify and return Truth::Type More...
|
|
virtual void | print () const =0 |
| Print the state of the tool. More...
|
|
virtual StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
StatusCode | classifyElectron (const xAOD::IParticle &electron, Truth::Type &classification) const |
| electron classification helper More...
|
|
StatusCode | classifyMuon (const xAOD::IParticle &muon, Truth::Type &classification) const |
| muon classification helper More...
|
|
bool | isPromptElectron (const xAOD::IParticle &electron, bool isTruthParticle, const xAOD::TruthParticle *truthParticle) const |
| a helper to check if an electron is prompt More...
|
|
bool | isChargeFlipElectron (const xAOD::IParticle &electron, bool isTruthParticle, const xAOD::TruthParticle *truthParticle) const |
| a helper to check if an electron has an incorrectly reconstructed charge More...
|
|
bool | isChargeFlipMuon (const xAOD::IParticle &muon, bool isTruthParticle, const xAOD::TruthParticle *truthParticle) const |
| a helper to check if a muon has an incorrectly reconstructed charge More...
|
|
bool | hasBHadronOrigin (int origin) const |
| a helper to check if the origin is a b-hadron More...
|
|
bool | hasCHadronOrigin (int origin) const |
| a helper to check if the origin is a c-hadron More...
|
|
bool | hasLightHadronOrigin (int origin) const |
| a helper to check if the origin is a light hadron More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
a tool to classify particles based on their type and origin
Definition at line 18 of file TruthClassificationTool.h.
◆ StoreGateSvc_t
◆ TruthClassificationTool()
TruthClassificationTool::TruthClassificationTool |
( |
const std::string & |
type | ) |
|
|
explicit |
◆ classify() [1/2]
◆ classify() [2/2]
StatusCode TruthClassificationTool::classify |
( |
const xAOD::IParticle & |
particle, |
|
|
unsigned int & |
classification |
|
) |
| const |
|
overridevirtual |
◆ classifyElectron()
electron classification helper
Definition at line 65 of file TruthClassificationTool.cxx.
72 bool isTruthParticle{};
73 if (truthParticle ==
nullptr)
80 isTruthParticle =
true;
85 ANA_MSG_ERROR(
"Electron does not have the 'truthPdgId' decoration.");
86 return StatusCode::FAILURE;
93 ANA_MSG_ERROR(
"Electron does not have one or more 'firstEgMother' decorations.");
94 return StatusCode::FAILURE;
114 int fallbackType{-1};
130 return StatusCode::SUCCESS;
138 return StatusCode::SUCCESS;
146 return StatusCode::SUCCESS;
155 return StatusCode::SUCCESS;
162 return StatusCode::SUCCESS;
169 return StatusCode::SUCCESS;
178 return StatusCode::SUCCESS;
184 return StatusCode::SUCCESS;
196 ANA_MSG_WARNING(
"Electron identified as from a PromptPhotonConversion, "
197 "but this type of electron needs further study!");
199 return StatusCode::SUCCESS;
206 && std::abs(firstMotherPdgId) == 11 && std::abs(pdgId) == 11)
212 return StatusCode::SUCCESS;
225 return StatusCode::SUCCESS;
231 return StatusCode::SUCCESS;
236 return StatusCode::SUCCESS;
249 return StatusCode::SUCCESS;
257 return StatusCode::SUCCESS;
268 return StatusCode::SUCCESS;
277 return StatusCode::SUCCESS;
285 return StatusCode::SUCCESS;
289 return StatusCode::SUCCESS;
297 return StatusCode::SUCCESS;
308 return StatusCode::SUCCESS;
318 return StatusCode::SUCCESS;
331 return StatusCode::SUCCESS;
335 return StatusCode::SUCCESS;
359 return StatusCode::SUCCESS;
362 if ((
type == MCTruthPartClassifier::Unknown && firstMotherType == MCTruthPartClassifier::Unknown)
366 return StatusCode::SUCCESS;
372 return StatusCode::SUCCESS;
379 && firstMotherType == 0 && firstMotherOrigin == 0 && firstMotherPdgId == 0)
381 if (lastMotherType == -1 || (lastMotherType == 0 && lastMotherOrigin == 0 && lastMotherPdgId == 0))
384 return StatusCode::SUCCESS;
391 if (truthParticle !=
nullptr)
395 std::string
out =
"\t";
406 return StatusCode::SUCCESS;
◆ classifyMuon()
muon classification helper
Definition at line 410 of file TruthClassificationTool.cxx.
418 bool isTruthParticle{};
419 if (truthParticle ==
nullptr)
426 isTruthParticle =
true;
438 int fallbackType{-1};
451 return StatusCode::SUCCESS;
462 return StatusCode::SUCCESS;
468 return StatusCode::SUCCESS;
479 return StatusCode::SUCCESS;
489 return StatusCode::SUCCESS;
500 static const std::set<int> promptOrigin({
519 return StatusCode::SUCCESS;
522 return StatusCode::SUCCESS;
533 return StatusCode::SUCCESS;
543 return StatusCode::SUCCESS;
545 if (
type == -99999 && origin == -99999)
548 return StatusCode::SUCCESS;
559 return StatusCode::SUCCESS;
571 if( truthParticle !=
nullptr && truthParticle->
nParents() == 1 && truthParticle->
parent(0) !=
nullptr){
573 int parent_pdgid =
parent->pdgId();
576 ATH_MSG_WARNING(
"Muon type taudecaylike: type = " <<
type <<
", origin = " << origin <<
", parent = " << parent_pdgid) ;
577 return StatusCode::SUCCESS;
581 ATH_MSG_WARNING(
"Muon type bhadrondecaylike: type = " <<
type <<
", origin = " << origin <<
", parent = " << parent_pdgid) ;
582 return StatusCode::SUCCESS;
585 if( (parent_pdgid / 1000) % 10 != 0 || (parent_pdgid / 100) % 10 != 4 || (parent_pdgid / 10) % 10 != 4){
587 ATH_MSG_WARNING(
"Muon type chadrondecaylike: type = " <<
type <<
", origin = " << origin <<
", parent = " << parent_pdgid) ;
588 return StatusCode::SUCCESS;
600 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ hasBHadronOrigin()
bool TruthClassificationTool::hasBHadronOrigin |
( |
int |
origin | ) |
const |
|
private |
a helper to check if the origin is a b-hadron
Definition at line 731 of file TruthClassificationTool.cxx.
733 static const std::set<int> b_hadrons({
738 return isInSet(origin, b_hadrons);
◆ hasCHadronOrigin()
bool TruthClassificationTool::hasCHadronOrigin |
( |
int |
origin | ) |
const |
|
private |
a helper to check if the origin is a c-hadron
Definition at line 742 of file TruthClassificationTool.cxx.
743 static const std::set<int> c_hadrons({
748 return isInSet(origin, c_hadrons);
◆ hasLightHadronOrigin()
bool TruthClassificationTool::hasLightHadronOrigin |
( |
int |
origin | ) |
const |
|
private |
a helper to check if the origin is a light hadron
Definition at line 752 of file TruthClassificationTool.cxx.
753 static const std::set<int> light_source({
762 return isInSet(origin, light_source);
◆ initialize()
virtual StatusCode asg::AsgTool::initialize |
( |
| ) |
|
|
inlinevirtualinherited |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented in SimpleMuonTriggerScaleFactors, Trig::TrigMuonMatching, CP::MuonTriggerScaleFactors, IHIEventShapeMapTool, ST::SUSYObjDef_xAOD, InDetSecVtxTruthMatchTool, JetGrooming::RecSoftDrop, met::METMaker, AsgForwardElectronIsEMSelector, JetGrooming::JetTrimming, ORUtils::BaseOverlapTool, PMGTools::PMGSherpa22VJetsWeightTool, AsgElectronEfficiencyCorrectionTool, CP::ElectronChargeEfficiencyCorrectionTool, AsgForwardElectronLikelihoodTool, CorrectPFOTool, CP::IsolationCorrectionTool, TauAnalysisTools::TauTruthMatchingTool, EGammaAmbiguityTool, InDetVertexTruthMatchTool, AthOnnx::OnnxRuntimeSessionToolCPU, AthOnnx::OnnxRuntimeSessionToolCUDA, PuppiWeightTool, CP::EgammaCalibrationAndSmearingTool, CP::FFJetSmearingTool, JetBalancePFlowJvtTool, JetIsolationTool, JetForwardPFlowJvtTool, MCTruthClassifier, InDet::InDetHardScatterSelectionTool, dRMatchingTool, xAOD::BPhysBlindingTool, JetVertexTaggerTool, tauRecTools::TrackRNN, LVL1::L1CaloOfflineTriggerTowerTools, TauAnalysisTools::TauSelectionTool, JetRecTool, met::METAssociationTool, CP::TrackVertexAssociationTool, met::METAssociator, xAOD::TrackIsolationTool, InDet::InDetTrackSelectionTool, egammaMVACalibTool, TrigConf::xAODConfigTool, JetCleaningTool, met::METCaloRegionsTool, ZDC::ZdcLEDAnalysisTool, ZDC::RpdSubtractCentroidTool, CP::MuonCalibTool, LVL1::L1CaloCells2TriggerTowers, IDTPM::TrackAnalysisInfoWriteTool, JetVertexFractionTool, LVL1BS::PpmByteStreamReadV1V2Tool, JetClusterer, JetForwardJvtToolBDT, CP::AsgFlagSelectionTool, TauTrackFinder, TauAnalysisTools::DiTauSelectionTool, JetClustererByVertex, BookkeeperTool, JetBadChanCorrTool, xAOD::BPhysTrackVertexMapTool, JetModifiedMassDrop, xAOD::CaloIsolationTool, EnhancedBiasWeighter, InDet::InDetUsedInFitTrackDecoratorTool, CP::AsgPtEtaSelectionTool, TauAnalysisTools::BuildTruthTaus, tauRecTools::TauTrackRNNClassifier, InDet::InDetSecVtxTrackSelectionTool, AthONNX::JSSMLTool, JetForwardJvtTool, JetPileupTag::JetVertexNNTagger, CP::EgammaIsGoodOQSelectionTool, CP::IsolationCloseByCorrectionTool, ElectronPhotonVariableCorrectionBase, CP::MuonCalibIntScaleSmearTool, JetFinder, AsgElectronIsEMSelector, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, met::METBuilderTool, CP::AsgMaskSelectionTool, ECUtils::EventCleaningTool, TauAnalysisTools::TauTruthTrackMatchingTool, met::METSoftTermsTool, LVL1::L1CaloLArTowerEnergy, HiggsTruthCategoryTool, IDTPM::TrackRoiSelectionTool, TauAnalysisTools::CommonDiTauEfficiencyTool, HIJetConstituentSubtractionTool, JetTrackSumMomentsTool, JetGrooming::SoftDrop, JetTrackMomentsTool, met::METTruthTool, PMGTools::PMGSherpaVjetsSysTool, JetQGTaggerVariableTool, ClusterMatching::CaloClusterMatchingTool, AsgPhotonEfficiencyCorrectionTool, FlavorTagDiscriminants::MultifoldGNNTool, InDet::JetTrackFilterTool, DiTauRecTools::DiTauDiscriminantTool, asg::DataHandleTestTool, xAODMaker::FileMetaDataTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackTruthFilterTool, HIJetClusterSubtractorTool, CP::MVATrackVertexAssociationTool, IDTPM::RoiSelectionTool, IDTPM::VertexRoiSelectionTool, CP::BaseFakeBkgTool, ElectronPhotonVariableCorrectionTool, JetCalibrationTool, JetCaloQualityTool, JetOriginCorrectionTool, IDTPM::TrackObjectSelectionTool, InDet::InDetTrackBiasingTool, HIJetClusterIndexAssociationTool, TauWPDecorator, TrigGlobalEfficiencyCorrectionTool, ZdcRecChannelToolV2, InDetGNNHardScatterSelection::GNNTool, CP::BaseLinearFakeBkgTool, FlavorTagDiscriminants::GNNTool, CP::MuonSelectionTool, TauAnalysisTools::CommonDiTauSmearingTool, JSSTaggerBase, CP::LhoodMM_tools, AsgElectronLikelihoodTool, DiTauRecTools::DiTauIDVarCalculator, CP::JetQGTagger, Pileup1DResidualCalibStep, LVL1::L1CaloFcal23Cells2RxMappingTool, IDTPM::TrackQualitySelectionTool, IDTPM::VertexQualitySelectionTool, ORUtils::OverlapRemovalTool, Ringer::AsgRingerSelectorTool, InDet::InDetTrackSmearingTool, CP::JetJvtEfficiency, JetCopier, JetGrooming::JetGroomer, met::METPhotonAssociator, JetECPSFractionTool, JetPtAssociationTool, met::METElectronAssociator, met::METTauAssociator, PMGTools::PMGDecayProductsSelectionTool, WeightToolBase, HIJetDRAssociationTool, JetClusterMomentsTool, met::METJetAssocTool, TauVertexFinder, IDTPM::JsonPlotsDefReadTool, TauAnalysisTools::DiTauSmearingTool, BJetCorrectionTool, JetDRTrackAssocTool, JetReclusterer, TauDecayModeNNClassifier, BDTVertexWeightCalculator, asg::UnitTestTool1, ZDC::ZdcAnalysisTool, IDTPM::DeltaRMatchingToolBase< T, R >, AsgElectronSelectorTool, GSCCalibStep, EtaMassJESCalibStep, JetReclusteringTool, met::METMuonAssociator, TauPi0CreateROI, TauShotFinder, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, ZdcRecChannelToolLucrod, PMGTools::PMGTruthWeightTool, JetCalibTool, SmearingCalibStep, JetVoronoiMomentsTool, Trig::MatchFromCompositeTool, asg::UnitTestTool3, IDTPM::TruthTrackMatchingTool, CP::ApplyFakeFactor, AsgElectronChargeIDSelectorTool, HIJetMaxOverMeanTool, PanTau::Tool_FeatureExtractor, TauElectronVetoVariables, ZDC::ZdcTrigValidTool, IDTPM::TruthQualitySelectionTool, CP::IsolationSelectionTool, WeightsAgregator, EL::UnitTestTool, FlavorTagDiscriminants::TrackClassifier, JetLArHVTool, IDTPM::EFTrackMatchingTool, IDTPM::OfflineTrackQualitySelectionTool, IDTPM::TrackTruthMatchingTool, HI::HIPileupTool, BTaggingSelectionTool, InDet::InDetTrackTruthOriginTool, JetHelper::VarTool, FlavorTagDiscriminants::DL2Tool, PileupAreaCalibStep, EnergyCorrelatorGeneralizedRatiosTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorRatiosTool, EnergyCorrelatorTool, TauEleOverlapChecker, TauJetRNNEvaluator, asg::UnitTestTool2, JetTruthLabelingTool, ZDC::ZdcRecTool, HIJetConstituentModifierTool, TauCalibrateLC, TauGNNEvaluator, TauPi0ScoreCalculator, TauRecToolBase, Trig::TrigEgammaEmulationPrecisionElectronHypoTool, asg::UnitTestTool1A, PDFWeight, HIEventShapeJetIteration, HIJetSignificanceTool, CP::JetQGTaggerBDT, JetWidthTool, TauVertexVariables, Trig::TrigEgammaEmulationPrecisionPhotonHypoTool, Trig::TrigEgammaMatchingTool, Trig::R3IParticleRetrievalTool, JetPileupLabelingTool, JetFromPseudojet, JetTruthParticleSelectorTool, Trig::TrigEgammaEmulationBaseHypoTool, AthOnnx::OnnxRuntimeInferenceTool, ZDC::RPDAnalysisTool, CP::ApplyE2YFakeRate, ParticleScaleFactorTool, TauAnalysisTools::TauHFVetoTool, InDet::InDetTrackSystematicsTool, JetCaloQualityToolFE, Trig::MatchingTool, Trig::R3MatchingTool, JetParticleAssociation, JetHelper::HistoInput2D, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, xAODtoHepMCTool, HIEventShapeMapTool, HI::HIVertexSelectionTool, TauVertexedClusterDecorator, Trig::IParticleRetrievalTool, HI::HIEventSelectionTool, FlavorTagDiscriminants::HbbTagTool, JetConstituentFrac, JetGroomMRatio, Validator, JetHelper::HistoInput1D, JetHelper::TextInputMCJES, ExtendTrackToLayerTool, Trig::TypedScoringTool, TrackTruthSelectionTool, HIUEModulatorTool, JSSWTopTaggerANN, CP::JvtEfficiencyToolBase, JetEMScaleMomTool, MvaTESVariableDecorator, TauAODMuonRemovalTool, TauCombinedTES, CP::AsymptMatrixTool, ParticleJetDeltaRLabelTool, HIEventShapeSummaryTool, FlavorTagDiscriminants::BTagAugmenterTool, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, JSSTaggerUtils, JetCaloEnergies, ParticleJetGhostLabelTool, FlavorTagDiscriminants::BTagMuonAugmenterTool, BTaggingEfficiencyJsonTool, MBTSTimeFilterTool, JSSWTopTaggerDNN, SmoothedTopTagger, MvaTESEvaluator, BoostedJetTaggerTool, CP::IsolationLowPtPLVTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, BTaggingSelectionJsonTool, SmoothedWZTagger, CP::FJvtEfficiencyTool, CP::JvtSelectionToolBase, CP::NNJvtSelectionTool, AthAsgExUnittestTool, CP::JvtSelectionTool, CP::FJvtSelectionTool, CP::JvtEfficiencyTool, CP::NNJvtEfficiencyTool, BookkeeperDumperTool, TrigFastCalibWithRings, BTaggingEfficiencyTool, BTaggingTruthTaggingTool, MissingCellListTool, JetVoronoiDiagramHelpers::Diagram, FastJetInterfaceTool, CP::PhotonVertexSelectionTool, met::METSystematicsTool, Trig::TrigEgammaEmulationToolMT, JetAttributeRatioSelector, BTaggingEigenVectorRecompositionTool, Trig::TrigDecisionTool, CP::PhotonPointingTool, met::METRecoTool, CP::PileupReweightingTool, LVL1::L1CaloxAODOfflineTriggerTowerTools, LVL1::TrigT1CaloMonErrorToolV1, met::METTrackFilterTool, LVL1::TrigT1CaloMonErrorTool, SoftKillerWeightTool, EventDensityTool, met::METSignificance, JetUncertaintiesTool, CP::JetTileCorrectionTool, xAODMaker::TriggerMenuMetaDataTool, D3PD::D3PDMCTruthClassifier, JetConstituentModSequence, HistoGroupBase, AsgPhotonIsEMSelector, JetAttributeSelector, TrackVertexAssociationTool, met::METRefinerTool, TauAnalysisTools::CommonSmearingTool, PanTau::Tool_DetailsArranger, LVL1::L1CaloMonitoringCaloTool, LVL1::L1CaloTTIdTools, JetInputElRemovalTool, GoodRunsListSelectionTool, TauAnalysisTools::CommonEfficiencyTool, PanTau::PanTauProcessor, xAODMaker::TruthMetaDataTool, EventShapeCopier, met::METJetTool, ZdcByteStreamReadV1V2Tool, FSR::FsrPhotonTool, Trig::StaticBunchCrossingTool, ZMassConstraint::ConstraintFit, TauAnalysisTools::TauEfficiencyCorrectionsTool, PanTau::Tool_DecayModeDeterminator, PanTau::Tool_ModeDiscriminator, CP::ElectronLRTOverlapRemovalTool, HIClusterSubtraction, JetAttributeHisto, JetPseudojetCopier, met::METEgammaAssociator, Trig::xAODBunchCrossingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauTruthMatchingTool, TauAnalysisTools::TauSmearingTool, met::METTruthAssociator, PanTau::Tool_InformationStore, HistoDefinitionTool, PanTau::Tool_InputConverter, DiTauMassTools::MissingMassTool, JetBottomUpSoftDrop, JetRecursiveSoftDrop, PMGTools::PMGCrossSectionTool, JetSoftDrop, TrigEgammaMatchingToolMT, JetConstituentsRetriever, VoronoiWeightTool, JetCaloCellQualityTool, JetContainerHistoFiller, ChargedHadronSubtractionTool, met::METRegionsTool, met::METSoftAssociator, PanTau::Tool_TauConstituentGetter, ConstituentSubtractorTool, JetHistoBase, JetSelectorAttributeRunII, JetSplitter, CaloClusterConstituentsOrigin, CP::MuonLRTOverlapRemovalTool, HistosForJetSelection, JetPruner, JetToolRunner, JetUsedInFitTrackDecoratorTool, JetTrimmer, NSubjettinessRatiosTool, CP::MuonEfficiencyScaleFactors, JetConstitFourMomTool, NSubjettinessTool, ZdcDataAccessV2, JetPseudojetRetriever, LVL1BS::TrigT1CaloDataAccessV2, PanTau::Tool_TauConstituentSelector, CopyTruthParticles, ClusterAtEMScaleTool, CP::IsolationHelper, HIEfficiencyResponseHistos, AsgDeadHVCellRemovalTool, EfficiencyResponseHistos, ConstitTimeCutTool, JetSelectorAttribute, HIJetUEMonitoring, JetSubStructureMomentToolsBase, AsgHelloTool, CopyTruthJetParticles, LeadingJetsRelations, and JetEventSelector.
Definition at line 133 of file AsgTool.h.
133 {
return StatusCode::SUCCESS; }
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isChargeFlipElectron()
a helper to check if an electron has an incorrectly reconstructed charge
Definition at line 652 of file TruthClassificationTool.cxx.
678 && std::abs(pdgId) == 11)
686 && std::abs(pdgId) == 11)
693 if (truthParticle->
charge() != 0)
695 return (firstMotherPdgId * truthParticle->
charge()) > 0;
701 if (xAODElectron.
charge() != 0)
703 return (firstMotherPdgId * xAODElectron.
charge()) > 0;
707 return (firstMotherPdgId * (-pdgId)) > 0;
◆ isChargeFlipMuon()
a helper to check if a muon has an incorrectly reconstructed charge
Definition at line 711 of file TruthClassificationTool.cxx.
723 return (truthParticle->
charge() * xAODMuon.
charge()) < 0;
726 ANA_MSG_DEBUG(
"Cannot find associated truth-particle... assuming muon has correct charge");
◆ isPromptElectron()
a helper to check if an electron is prompt
Definition at line 604 of file TruthClassificationTool.cxx.
619 if (
type == MCTruthPartClassifier::IsoElectron)
642 && std::abs(pdgId) == 11)
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print() [1/2]
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_classifierParticleOrigin
◆ m_classifierParticleType
◆ m_detStore
◆ m_evtStore
◆ m_fallbackDR
◆ m_fallbackTruthOrigin
◆ m_fallbackTruthType
◆ m_firstMotherPdgId
◆ m_firstMotherTruthOrigin
◆ m_firstMotherTruthType
◆ m_lastMotherPdgId
◆ m_lastMotherTruthOrigin
◆ m_lastMotherTruthType
◆ m_separateChargeFlipElectrons
bool TruthClassificationTool::m_separateChargeFlipElectrons = false |
|
private |
◆ m_separateChargeFlipMuons
bool TruthClassificationTool::m_separateChargeFlipMuons = false |
|
private |
◆ m_truthOrigin
◆ m_truthPdgId
◆ m_truthType
◆ m_useTruthParticleDecorations
bool TruthClassificationTool::m_useTruthParticleDecorations {false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
float charge() const
Obtain the charge of the object.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
XAOD_AUXDATA_DEPRECATED bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
size_t nParents() const
Number of parents of this particle.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string to_string(const DetectorType &type)
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
int pdgId() const
PDG ID code.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double charge() const
Physical charge.
Type
truth classification type enum