![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Loading tool which creates a particle level event object.
More...
#include <ParticleLevelLoader.h>
|
| ParticleLevelLoader (const std::shared_ptr< top::TopConfig > &cfg) |
| Constructor of the loader tool. More...
|
|
virtual | ~ParticleLevelLoader () |
| Destructor of the loader tool. More...
|
|
ParticleLevelEvent | load () |
| Loading function. More...
|
|
bool | active () const |
| Function that can be used to test whether the ParticleLevelLoader is active. 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 |
|
Loading tool which creates a particle level event object.
After creation of the loader tool, it will be in of of two states: either it is "active" or not (can be tested using the active() member function). If the tool is not active, then the load function is a no-op, it will return an "empty" ParticleLevelEvent object. The active() member function allows for the enclosing (i.e. calling) program to conditionally branch into computing intensive parts depending on whether particle level data is available or not. The loader tool is configured to be non-"active" if the input data is not monte carlo or any of the required collection names are empty respectively None
Definition at line 53 of file ParticleLevelLoader.h.
◆ StoreGateSvc_t
◆ ParticleLevelLoader()
Constructor of the loader tool.
Definition at line 36 of file ParticleLevelLoader.cxx.
60 m_config->truth_electron_NotFromHadron(),
61 m_config->truth_electron_TauIsHadron()
70 m_config->truth_muon_NotFromHadron(),
114 msgInfo <<
"Particle level reconstruction is enabled; telling you how I am configured:" <<
'\n';
115 msgInfo <<
" " << std::setw(20) <<
"UseElectrons? " << std::setw(5) << std::boolalpha <<
117 if (
m_config->useTruthElectrons()) {
118 msgInfo <<
" [" <<
m_config->sgKeyTruthElectrons() <<
"]" <<
'\n'
119 <<
" --- Pt > " <<
m_config->truth_electron_PtCut() <<
'\n'
120 <<
" --- |eta| < " <<
m_config->truth_electron_EtaCut() <<
'\n'
121 <<
" --- notFromHadron? " << std::boolalpha <<
m_config->truth_electron_NotFromHadron() <<
'\n'
122 <<
" --- tauIsHadron? " << std::boolalpha <<
m_config->truth_electron_TauIsHadron() <<
'\n';
126 msgInfo <<
" " << std::setw(20) <<
"UseMuons? " << std::setw(5) << std::boolalpha <<
129 msgInfo <<
" [" <<
m_config->sgKeyTruthMuons() <<
"]" <<
'\n'
130 <<
" --- Pt > " <<
m_config->truth_muon_PtCut() <<
'\n'
131 <<
" --- |eta| < " <<
m_config->truth_muon_EtaCut() <<
'\n'
132 <<
" --- notFromHadron? " << std::boolalpha <<
m_config->truth_muon_NotFromHadron() <<
'\n'
133 <<
" --- tauIsHadron? " << std::boolalpha <<
m_config->truth_muon_TauIsHadron() <<
'\n';
137 msgInfo <<
" " << std::setw(20) <<
"UsePhotons? " << std::setw(5) << std::boolalpha <<
140 msgInfo <<
" [" <<
m_config->sgKeyTruthPhotons() <<
"]" <<
'\n'
141 <<
" --- Pt > " <<
m_config->truth_photon_PtCut() <<
'\n'
142 <<
" --- |eta| < " <<
m_config->truth_photon_EtaCut() <<
'\n'
143 <<
" --- Origin = " <<
m_config->truth_photon_Origin() <<
'\n'
144 <<
" --- Isolation = " <<
m_config->truth_photon_Isolation() <<
'\n';
148 msgInfo <<
" " << std::setw(20) <<
"UseJets? " << std::setw(5) << std::boolalpha <<
m_config->useTruthJets();
150 msgInfo <<
" [" <<
m_config->sgKeyTruthJets() <<
"]" <<
'\n'
151 <<
" --- Pt > " <<
m_config->truth_jet_PtCut() <<
'\n'
152 <<
" --- |eta| < " <<
m_config->truth_jet_EtaCut() <<
'\n';
156 msgInfo <<
" " << std::setw(20) <<
"UseLargeRJets? " << std::setw(5) << std::boolalpha <<
159 msgInfo <<
" [" <<
m_config->sgKeyTruthLargeRJets() <<
"]" <<
'\n'
160 <<
" --- Pt > " <<
m_config->truth_jet_largeR_PtCut() <<
'\n'
161 <<
" --- |eta| < " <<
m_config->truth_jet_largeR_EtaCut() <<
'\n';
165 msgInfo <<
" " << std::setw(20) <<
"UseTaus? " << std::setw(5) << std::boolalpha <<
m_config->useTruthTaus();
167 msgInfo <<
" [" <<
m_config->sgKeyTruthTaus() <<
"]" <<
'\n'
168 <<
" --- Pt > " <<
m_config->truth_tau_PtCut() <<
'\n'
169 <<
" --- |eta| < " <<
m_config->truth_tau_EtaCut() <<
'\n';
173 msgInfo <<
" " << std::setw(20) <<
"UseMET? " << std::setw(5) << std::boolalpha <<
m_config->useTruthMET();
175 msgInfo <<
" [" <<
m_config->sgKeyTruthMET() <<
"]" <<
'\n';
179 msgInfo <<
" " << std::setw(20) <<
"DoOverlapRemoval Mu-Jet? " << std::setw(5) << std::boolalpha <<
180 m_config->doParticleLevelOverlapRemovalMuJet() <<
'\n';
181 msgInfo <<
" " << std::setw(20) <<
"DoOverlapRemoval El-Jet? " << std::setw(5) << std::boolalpha <<
182 m_config->doParticleLevelOverlapRemovalElJet() <<
'\n';
183 msgInfo <<
" " << std::setw(20) <<
"DoOverlapRemoval Jet-Photon? " << std::setw(5) << std::boolalpha <<
184 m_config->doParticleLevelOverlapRemovalJetPhoton() <<
'\n';
191 "Failed to initialize ParticleLevelRCJetObjectLoader");
194 if (
m_config->useVarRCJets() ==
true) {
201 std::string
name =
rho + mass_scale;
206 "Failed to set VarRCjets property of VarRCJet");
209 "Failed to set VarRCjets rho property of VarRCJet");
212 "Failed to set VarRCjets mass scale property of VarRCJet");
218 msgInfo <<
"Particle level reconstruction is disabled." <<
'\n';
◆ ~ParticleLevelLoader()
top::ParticleLevelLoader::~ParticleLevelLoader |
( |
| ) |
|
|
virtual |
◆ active()
bool top::ParticleLevelLoader::active |
( |
| ) |
const |
|
inline |
Function that can be used to test whether the ParticleLevelLoader is active.
The loader is set to inactive if the names of the truth collections are unavailable. This is determined at construction.
Definition at line 80 of file ParticleLevelLoader.h.
◆ 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);
◆ 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.
◆ 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.
◆ 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
124 return evtStore()->event()->getKey( ptr );
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
111 return evtStore()->event()->getName( ptr );
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.
◆ 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, Trig::TrigTauMatchingTool, 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, JetIsolationTool, JetBalancePFlowJvtTool, CP::FFJetSmearingTool, JetForwardPFlowJvtTool, MCTruthClassifier, InDet::InDetHardScatterSelectionTool, dRMatchingTool, xAOD::BPhysBlindingTool, CP::EgammaCalibrationAndSmearingTool, JetVertexTaggerTool, tauRecTools::TrackRNN, LVL1::L1CaloOfflineTriggerTowerTools, TauAnalysisTools::TauSelectionTool, JetRecTool, met::METAssociationTool, CP::TrackVertexAssociationTool, met::METRebuilder, met::METAssociator, xAOD::TrackIsolationTool, InDet::InDetTrackSelectionTool, egammaMVACalibTool, TrigConf::xAODConfigTool, JetCleaningTool, met::METCaloRegionsTool, ZDC::ZdcLEDAnalysisTool, CP::MuonCalibTool, LVL1::L1CaloCells2TriggerTowers, JetVertexFractionTool, LVL1BS::PpmByteStreamReadV1V2Tool, JetClusterer, JetForwardJvtToolBDT, CP::AsgFlagSelectionTool, TauTrackFinder, TauAnalysisTools::DiTauSelectionTool, JetClustererByVertex, JetBadChanCorrTool, xAOD::BPhysTrackVertexMapTool, JetModifiedMassDrop, xAOD::CaloIsolationTool, EnhancedBiasWeighter, BookkeeperTool, ZDC::RpdSubtractCentroidTool, InDet::InDetUsedInFitTrackDecoratorTool, CP::AsgPtEtaSelectionTool, TauAnalysisTools::BuildTruthTaus, top::EventSaverFlatNtuple, tauRecTools::TauTrackRNNClassifier, InDet::InDetSecVtxTrackSelectionTool, JetForwardJvtTool, JetPileupTag::JetVertexNNTagger, CP::EgammaIsGoodOQSelectionTool, CP::IsolationCloseByCorrectionTool, CP::MuonCalibIntScaleSmearTool, DiTauRecTools::DiTauIDVarCalculator, JetFinder, AsgElectronIsEMSelector, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, DiTauRecTools::DiTauDiscriminantTool, met::METBuilderTool, CP::AsgMaskSelectionTool, ElectronPhotonVariableCorrectionBase, ECUtils::EventCleaningTool, TauAnalysisTools::TauTruthTrackMatchingTool, met::METSoftTermsTool, LVL1::L1CaloLArTowerEnergy, HiggsTruthCategoryTool, IDTPM::TrackRoiSelectionTool, TauAnalysisTools::CommonDiTauEfficiencyTool, HIJetConstituentSubtractionTool, JetTrackSumMomentsTool, JetGrooming::SoftDrop, JetQGTaggerVariableTool, JetTrackMomentsTool, met::METTruthTool, CP::BaseLinearFakeBkgTool, PMGTools::PMGSherpaVjetsSysTool, ClusterMatching::CaloClusterMatchingTool, AsgPhotonEfficiencyCorrectionTool, InDet::JetTrackFilterTool, asg::DataHandleTestTool, xAODMaker::FileMetaDataTool, CP::BaseFakeBkgTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackTruthFilterTool, HIJetClusterSubtractorTool, CP::MVATrackVertexAssociationTool, IDTPM::RoiSelectionTool, ElectronPhotonVariableCorrectionTool, JetCalibrationTool, JetCaloQualityTool, JetOriginCorrectionTool, InDet::InDetTrackBiasingTool, HIJetClusterIndexAssociationTool, TauWPDecorator, TrigGlobalEfficiencyCorrectionTool, ZdcRecChannelToolV2, IDTPM::TrackObjectSelectionTool, CP::LhoodMM_tools, FlavorTagDiscriminants::GNNTool, FlavorTagDiscriminants::MultifoldGNNTool, CP::MuonSelectionTool, TauAnalysisTools::CommonDiTauSmearingTool, JSSTaggerBase, ZDC::ZdcAnalysisTool, IDTPM::TrackQualitySelectionTool, AsgElectronLikelihoodTool, CP::JetQGTagger, CP::JetJvtEfficiency, LVL1::L1CaloFcal23Cells2RxMappingTool, ORUtils::OverlapRemovalTool, Analysis::JetQuarkLabel, Ringer::AsgRingerSelectorTool, InDet::InDetTrackSmearingTool, JetCopier, JetGrooming::JetGroomer, met::METPhotonAssociator, JetECPSFractionTool, JetPtAssociationTool, met::METElectronAssociator, met::METTauAssociator, PMGTools::PMGDecayProductsSelectionTool, WeightToolBase, HIJetDRAssociationTool, JetClusterMomentsTool, met::METJetAssocTool, TauVertexFinder, IDTPM::JsonPlotsDefReadTool, TauAnalysisTools::DiTauSmearingTool, JetDRTrackAssocTool, JetReclusterer, TauDecayModeNNClassifier, BDTVertexWeightCalculator, asg::UnitTestTool1, IDTPM::DeltaRMatchingToolBase< T, R >, AsgElectronSelectorTool, JetReclusteringTool, met::METMuonAssociator, TauPi0CreateROI, TauShotFinder, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, ZdcRecChannelToolLucrod, PMGTools::PMGTruthWeightTool, JetVoronoiMomentsTool, Trig::MatchFromCompositeTool, asg::UnitTestTool3, IDTPM::TruthTrackMatchingTool, CP::ApplyFakeFactor, AsgElectronChargeIDSelectorTool, HIJetMaxOverMeanTool, PanTau::Tool_FeatureExtractor, TauElectronVetoVariables, CP::IsolationSelectionTool, WeightsAgregator, EL::UnitTestTool, FlavorTagDiscriminants::TrackClassifier, JetLArHVTool, ZDC::ZdcTrigValidTool, IDTPM::TrackTruthMatchingTool, HI::HIPileupTool, InDet::InDetTrackTruthOriginTool, JetHelper::VarTool, FlavorTagDiscriminants::DL2Tool, BTaggingSelectionTool, 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, IDTPM::TruthTrackQualitySelectionTool, JetPileupLabelingTool, JetFromPseudojet, JetTruthParticleSelectorTool, Trig::TrigEgammaEmulationBaseHypoTool, CP::ApplyE2YFakeRate, ParticleScaleFactorTool, InDet::InDetTrackSystematicsTool, JetCaloQualityToolFE, Trig::MatchingTool, Trig::R3MatchingTool, IDTPM::OfflineTrackQualitySelectionTool, JetParticleAssociation, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, AthOnnx::OnnxRuntimeInferenceTool, xAODtoHepMCTool, HIEventShapeMapTool, HI::HIVertexSelectionTool, JetHelper::HistoInput2D, TauVertexedClusterDecorator, Trig::IParticleRetrievalTool, CP::AsymptMatrixTool, HI::HIEventSelectionTool, FlavorTagDiscriminants::HbbTagTool, JetConstituentFrac, JetGroomMRatio, JetHelper::HistoInput1D, JetHelper::TextInputMCJES, ExtendTrackToLayerTool, Trig::TypedScoringTool, TrackTruthSelectionTool, HIUEModulatorTool, JSSWTopTaggerANN, CP::JvtEfficiencyToolBase, JetEMScaleMomTool, MvaTESVariableDecorator, TauAODLeptonRemovalTool, TauCombinedTES, ParticleJetDeltaRLabelTool, HIEventShapeSummaryTool, FlavorTagDiscriminants::BTagAugmenterTool, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, JetCaloEnergies, ParticleJetGhostLabelTool, FlavorTagDiscriminants::BTagMuonAugmenterTool, MBTSTimeFilterTool, JSSWTopTaggerDNN, SmoothedTopTagger, MvaTESEvaluator, CP::IsolationLowPtPLVTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, SmoothedWZTagger, CP::FJvtEfficiencyTool, CP::JvtSelectionToolBase, CP::NNJvtSelectionTool, AthAsgExUnittestTool, CP::JvtSelectionTool, BTaggingSelectionJsonTool, CP::FJvtSelectionTool, CP::JvtEfficiencyTool, CP::NNJvtEfficiencyTool, BookkeeperDumperTool, TrigFastCalibWithRings, top::ScaleFactorRetriever, BTaggingEfficiencyTool, BTaggingTruthTaggingTool, MissingCellListTool, JetVoronoiDiagramHelpers::Diagram, FastJetInterfaceTool, met::METSystematicsTool, Trig::TrigEgammaEmulationToolMT, JetAttributeRatioSelector, top::GhostTrackSystematicsMaker, top::TopObjectSelection, BTaggingEigenVectorRecompositionTool, LVL1::TrigT1CaloLWHistogramToolV1, LVL1::TrigT1CaloLWHistogramTool, Trig::TrigDecisionTool, CP::PhotonPointingTool, met::METRecoTool, CP::PhotonVertexSelectionTool, top::KLFitterTool, ZdcByteStreamReadV1V2Tool, CP::PileupReweightingTool, top::JetObjectCollectionMaker, LVL1::L1CaloxAODOfflineTriggerTowerTools, RCJet, LVL1::TrigT1CaloMonErrorToolV1, met::METTrackFilterTool, LVL1::TrigT1CaloMonErrorTool, SoftKillerWeightTool, EventDensityTool, met::METSignificance, ParticleLevelRCJetObjectLoader, JetUncertaintiesTool, top::TopToolStore, CP::JetTileCorrectionTool, xAODMaker::TriggerMenuMetaDataTool, D3PD::D3PDMCTruthClassifier, top::ElectronInJetSubtractionCollectionMaker, top::MuonObjectCollectionMaker, JetConstituentModSequence, top::EgammaObjectCollectionMaker, HistoGroupBase, AsgPhotonIsEMSelector, JetAttributeSelector, top::ObjectCollectionMaker, TrackVertexAssociationTool, met::METRefinerTool, TauAnalysisTools::CommonSmearingTool, top::GlobalLeptonTriggerCalculator, top::ScaleFactorCalculator, top::TrackSystematicsMaker, top::ElectronScaleFactorCalculator, top::JetScaleFactorCalculator, top::MuonScaleFactorCalculator, PanTau::Tool_DetailsArranger, LVL1::L1CaloMonitoringCaloTool, top::EventSaverxAOD, LVL1::L1CaloTTIdTools, top::SoftMuonObjectCollectionMaker, top::TauObjectCollectionMaker, JetInputElRemovalTool, TauAnalysisTools::CommonEfficiencyTool, top::BTagScaleFactorCalculator, top::MissingETObjectCollectionMaker, PanTau::PanTauProcessor, xAODMaker::TruthMetaDataTool, top::PDFScaleFactorCalculator, top::PhotonScaleFactorCalculator, top::PseudoTopReco, EventShapeCopier, met::METJetTool, GoodRunsListSelectionTool, top::EventSaverxAODNext, top::FwdElectronScaleFactorCalculator, 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, top::JetMETCPTools, met::METTruthAssociator, PanTau::Tool_InformationStore, HistoDefinitionTool, PanTau::Tool_InputConverter, JetBottomUpSoftDrop, JetRecursiveSoftDrop, PMGTools::PMGCrossSectionTool, JetSoftDrop, TrigEgammaMatchingToolMT, DiTauMassTools::MissingMassToolV2, top::TauScaleFactorCalculator, top::TriggerCPTools, JetConstituentsRetriever, VoronoiWeightTool, top::GhostTrackCPTools, JetCaloCellQualityTool, JetContainerHistoFiller, ChargedHadronSubtractionTool, JetTrackSelectionTool, met::METRegionsTool, met::METSoftAssociator, PanTau::Tool_TauConstituentGetter, top::EventCleaningSelection, ConstituentSubtractorTool, top::EgammaCPTools, top::OtherCPTools, top::TopEventMaker, JetHistoBase, JetSelectorAttributeRunII, JetSplitter, CaloClusterConstituentsOrigin, JetTrackSelectionTool2, SimpleJetTrackSelectionTool, CP::MuonLRTOverlapRemovalTool, top::FlavorTaggingCPTools, top::TauCPTools, HistosForJetSelection, JetPruner, JetToolRunner, JetUsedInFitTrackDecoratorTool, top::TrackCPTools, JetTrimmer, NSubjettinessRatiosTool, CP::MuonEfficiencyScaleFactors, top::PileupScaleFactorCalculator, top::MuonCPTools, JetConstitFourMomTool, NSubjettinessTool, ZdcDataAccessV2, JetPseudojetRetriever, LVL1BS::TrigT1CaloDataAccessV2, PanTau::Tool_TauConstituentSelector, CopyTruthParticles, top::IsolationCPTools, top::OverlapRemovalCPTools, ClusterAtEMScaleTool, CP::IsolationHelper, top::BoostedTaggingCPTools, AsgDeadHVCellRemovalTool, ConstitTimeCutTool, Analysis::JetConeLabeling, JetSelectorAttribute, HIJetUEMonitoring, HIEfficiencyResponseHistos, JetSubStructureMomentToolsBase, AsgHelloTool, CopyTruthJetParticles, LeadingJetsRelations, EfficiencyResponseHistos, 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.
◆ isDressingPhoton()
Definition at line 826 of file ParticleLevelLoader.cxx.
832 static const std::string decoName {
833 "originalTruthParticle"
837 bool useRapidityInDeltaRCalculation =
m_config->useParticleLevelOverlapRemovalWithRapidity();
839 for (
const auto *
particle : dressedParticles) {
840 bool tp_isValid =
false;
844 tp_isValid = truthProxy.
isValid();
850 if (not tp_isValid) {
◆ load()
Loading function.
Does the actual work. This function will load the truth information from the #xaodEvent and return this data transformed into a truth level event. The data stored in the ParticleLevel is owned by the truth event loader.
- Parameters
-
xaodEvent | The input data event object. |
- Returns
- ParticleLevelEvent object.
Definition at line 225 of file ParticleLevelLoader.cxx.
232 ParticleLevelEvent plEvent;
236 "xAOD::TEvent::retrieve failed for EventInfo");
262 if (
m_config->useTruthElectrons()) {
264 "xAOD::TEvent::retrieve failed for Truth Electrons");
269 "xAOD::TEvent::retrieve failed for Truth Muons");
274 "xAOD::TEvent::retrieve failed for Truth Photons");
279 "xAOD::TEvent::retrieve failed for Truth Jets");
282 if (
m_config->useTruthLargeRJets()) {
284 "xAOD::TEvent::retrieve failed for Truth Jets Large R");
289 "xAOD::TEvent::retrieve failed for Truth Taus");
294 "xAOD::TEvent::retrieve failed for Truth Missing ET");
307 if (
m_config->useTruthElectrons()) {
311 "Failure to load dressed electrons.");
319 "Failure to load dressed muons.");
326 std::list<std::size_t> idx_electrons;
327 std::list<std::size_t> idx_muons;
328 std::list<std::size_t> idx_photons;
329 std::list<std::size_t> idx_jets;
330 std::list<std::size_t> idx_largeRJets;
331 std::list<std::size_t> idx_taus;
334 if (
m_config->useTruthElectrons()) {
349 idx_electrons.push_back(
i);
356 for (std::size_t
i = 0;
i < muons->size(); ++
i) {
357 const auto*
muon = muons->at(
i);
360 if (
muon->absPdgId() != 13) {
370 idx_muons.push_back(
i);
377 for (std::size_t
i = 0;
i < photons->size(); ++
i) {
378 const auto*
photon = photons->at(
i);
381 if (
photon->absPdgId() != 22) {
395 if (
m_config->useTruthElectrons()) {
407 idx_photons.push_back(
i);
413 for (std::size_t
i = 0;
i <
jets->size(); ++
i) {
415 idx_jets.push_back(
i);
421 if (
m_config->useTruthLargeRJets()) {
422 for (std::size_t
i = 0;
i < largeRJets->size(); ++
i) {
424 idx_largeRJets.push_back(
i);
431 for (std::size_t
i = 0;
i < taus->size(); ++
i) {
433 idx_taus.push_back(
i);
449 bool useRapidityInDeltaRCalculation =
m_config->useParticleLevelOverlapRemovalWithRapidity();
453 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
454 const std::size_t nMuonsPreOR {
459 idx_muons.remove_if([&idx_jets, &
jets, &useRapidityInDeltaRCalculation,
this](std::size_t
m) {
460 for (
auto j : idx_jets) {
468 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
469 ATH_MSG_INFO(
"[top::ParticleLevelLoader] Muon-In-Jet OR: "
470 << nMuonsPreOR <<
" -> " << idx_muons.size());
476 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
477 const std::size_t nElectronsPreOR {
482 idx_electrons.remove_if([&idx_jets, &
jets, &useRapidityInDeltaRCalculation,
this](std::size_t
e) {
483 for (
auto j : idx_jets) {
491 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
492 ATH_MSG_INFO(
"[top::ParticleLevelLoader] Electron-In-Jet OR: "
493 << nElectronsPreOR <<
" -> " << idx_electrons.size());
498 if (
m_config->useTruthPhotons() &&
m_config->useTruthJets() &&
m_config->doParticleLevelOverlapRemovalJetPhoton()) {
499 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
500 const std::size_t nJetPreOR {
505 idx_jets.remove_if([&idx_photons, &photons, &useRapidityInDeltaRCalculation, &
jets](std::size_t j) {
506 for (
auto ph : idx_photons) {
514 #ifdef TOP_PARTICLE_LEVEL_DEBUG_OVERLAP_REMOVAL
515 ATH_MSG_INFO(
"[top::ParticleLevelLoader] Jet-In-Photon OR: "
516 << nJetsPreOR <<
" -> " << idx_jets.size());
531 if (
m_config->useTruthElectrons()) {
534 goodElectrons->setStore(goodElectronsAux);
539 for (
auto e : idx_electrons) {
553 goodMuons->setStore(goodMuonsAux);
558 for (
auto m : idx_muons) {
561 muon->makePrivateStore(*muPtr);
572 goodPhotons->setStore(goodPhotonsAux);
577 for (
auto ph : idx_photons) {
578 const auto& phPtr = photons->at(ph);
580 photon->makePrivateStore(*phPtr);
588 goodJets->setStore(goodJetsAux);
593 for (
auto j : idx_jets) {
594 const auto& jetPtr =
jets->at(j);
596 jet->makePrivateStore(*jetPtr);
601 if (
m_config->useTruthLargeRJets()) {
604 goodLargeRJets->setStore(goodLargeRJetsAux);
609 for (
auto j : idx_largeRJets) {
610 const auto& jetPtr = largeRJets->at(j);
612 jet->makePrivateStore(*jetPtr);
620 goodTaus->setStore(goodTausAux);
625 for (
auto t : idx_taus) {
626 const auto& tauPtr = taus->at(
t);
636 goodSoftMuons->setStore(goodSoftMuonsAux);
643 std::vector<const xAOD::TruthParticle*> truth_particles_vec;
645 if (
m_config->useTruthParticles() &&
m_config->softmuonAdditionalTruthInfo()) {
647 "xAOD::TEvent::retrieve failed for Truth Particles");
657 for (std::size_t
i = 0;
i < muons->size(); ++
i) {
658 if(
std::find(idx_muons.begin(), idx_muons.end(),
i)!=idx_muons.end())
continue;
659 const auto& muPtr = muons->at(
i);
662 if(muPtr->absPdgId()!=13)
continue;
663 if(muPtr->pt()<
m_config->truth_softmuon_PtCut())
continue;
664 if(fabs(muPtr->eta())>
m_config->truth_softmuon_EtaCut())
continue;
673 if(dR<m_config->softmuonDRJetcut())
679 if(!isInJet)
continue;
683 if(
m_config->softmuonAdditionalTruthInfo() && (!muPtr->isAvailable<
bool>(
"hasTruthMuonHistoryInfo") || !muPtr->auxdecor<
bool>(
"hasTruthMuonHistoryInfo")))
685 bool doPartonHistory=
m_config->softmuonAdditionalTruthInfoCheckPartonOrigin();
689 if (
m_config->getDerivationStream() ==
"PHYS")
720 muon->makePrivateStore(*muPtr);
741 plEvent.m_met =
m_config->useTruthMET() ? (*mets)[
"NonInt" ] :
nullptr;
746 plEvent),
"Failed to execute ParticleLevelRCJetObjectLoader container");
754 for (
auto rcjet : *rc_jets) {
757 " Can't find reclustered jet decoration \"PassedSelection\" - we need it to decide if we should keep the reclustered jet in the top::Event instance or not!");
758 if (rcjet->auxdataConst<
bool>(
"PassedSelection")) plEvent.m_RCJets.push_back((
xAOD::Jet*) rcjet);
766 std::string
name =
rho + mass_scale;
768 plEvent),
"Failed to execute RCJet container");
778 for (
auto vrcjet : *vrc_jets) {
781 " Can't find jet decoration \"PassedSelection\" - we need it to decide if we should keep the variable-R reclustered jet in the top::Event instance or not!");
782 if (vrcjet->auxdataConst<
bool>(
"PassedSelection")) plEvent.m_VarRCJets[
name]->push_back((
xAOD::Jet*) vrcjet);
◆ loadDressedLeptons()
Definition at line 794 of file ParticleLevelLoader.cxx.
799 store.reset(dressed.first);
800 storeAux.reset(dressed.second);
802 for (
auto pl : *
store.get()) {
803 TLorentzVector fvDressed;
804 fvDressed.SetPtEtaPhiE(pl->auxdata<
float>(
"pt_dressed"),
805 pl->auxdata<
float>(
"eta_dressed"),
806 pl->auxdata<
float>(
"phi_dressed"),
807 pl->auxdata<
float>(
"e_dressed"));
812 pl->auxdata<
float>(
"pt_bare") = pl->pt();
813 pl->auxdata<
float>(
"eta_bare") = pl->eta();
814 pl->auxdata<
float>(
"phi_bare") = pl->phi();
815 pl->auxdata<
float>(
"e_bare") = pl->e();
817 pl->setPx(fvDressed.Px());
818 pl->setPy(fvDressed.Py());
819 pl->setPz(fvDressed.Pz());
820 pl->setE(fvDressed.E());
◆ 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()
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, top::TopObjectSelection, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ 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_active
const bool top::ParticleLevelLoader::m_active |
|
private |
◆ m_config
◆ m_detStore
◆ m_electronsDressed
◆ m_electronsDressedAux
◆ m_evtStore
◆ m_goodElectrons
◆ m_goodElectronsAux
◆ m_goodJets
◆ m_goodJetsAux
◆ m_goodLargeRJets
◆ m_goodLargeRJetsAux
◆ m_goodMuons
◆ m_goodMuonsAux
◆ m_goodPhotons
◆ m_goodPhotonsAux
◆ m_goodSoftMuons
◆ m_goodSoftMuonsAux
◆ m_goodTaus
◆ m_goodTausAux
◆ m_muonsDressed
◆ m_muonsDressedAux
◆ m_objectSelector_Electron
◆ m_objectSelector_Jet
◆ m_objectSelector_LargeRJet
◆ m_objectSelector_Muon
◆ m_objectSelector_Photon
◆ m_objectSelector_Tau
◆ m_particleLevelRCJetObjectLoader
◆ m_particleLevelVarRCJetObjectLoader
◆ m_varHandleArraysDeclared
◆ m_VarRCJetMassScale
std::vector<std::string> top::ParticleLevelLoader::m_VarRCJetMassScale |
|
private |
◆ m_VarRCJetRho
std::vector<std::string> top::ParticleLevelLoader::m_VarRCJetRho |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::unique_ptr< xAOD::TruthParticleContainer > m_goodPhotons
std::string replace(std::string s, const std::string &s2, const std::string &s3)
std::unique_ptr< xAOD::TruthParticleContainer > m_goodSoftMuons
std::unique_ptr< xAOD::JetContainer > m_goodLargeRJets
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
std::unique_ptr< ObjectSelectorBase< xAOD::TruthParticle > > m_objectSelector_Photon
std::string find(const std::string &s)
return a remapped string
JetAuxContainer_v1 JetAuxContainer
Definition of the current jet auxiliary container.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::unique_ptr< xAOD::TruthParticleAuxContainer > m_goodMuonsAux
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool loadDressedLeptons(const xAOD::TruthParticleContainer &input, std::unique_ptr< xAOD::TruthParticleContainer > &store, std::unique_ptr< xAOD::ShallowAuxContainer > &storeAux) const
std::unique_ptr< xAOD::TruthParticleContainer > m_goodTaus
bool isValid() const
Test to see if the link can be dereferenced.
Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name) const
Fetch an aux decoration, as a non-const reference.
virtual void setOwner(IDataHandleHolder *o)=0
std::unique_ptr< xAOD::TruthParticleAuxContainer > m_goodSoftMuonsAux
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Auxiliary store for the truth vertices.
std::unique_ptr< ParticleLevelRCJetObjectLoader > m_particleLevelRCJetObjectLoader
Temporary container used until we have I/O for AuxStoreInternal.
TruthParticleAuxContainer_v1 TruthParticleAuxContainer
Declare the latest version of the truth particle auxiliary container.
std::map< std::string, std::unique_ptr< ParticleLevelRCJetObjectLoader > > m_particleLevelVarRCJetObjectLoader
void initTruthMuonHistoryInfo(const xAOD::TruthParticle *truthmu, bool doPartonHistory)
Exception — Attempt to retrieve nonexistent aux data item.
std::unique_ptr< xAOD::ShallowAuxContainer > m_electronsDressedAux
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...
std::unique_ptr< xAOD::ShallowAuxContainer > m_muonsDressedAux
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
std::unique_ptr< ObjectSelectorBase< xAOD::Jet > > m_objectSelector_Jet
Class describing a truth particle in the MC record.
std::unique_ptr< xAOD::TruthParticleContainer > m_goodMuons
TruthParticle_v1 TruthParticle
Typedef to implementation.
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
void getTruthMuonHistory(const xAOD::TruthParticle *truthmu, bool doPartonHistory, SampleXsection::showering shAlgo, bool verbose)
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)
std::unique_ptr< ObjectSelectorBase< xAOD::TruthParticle > > m_objectSelector_Tau
std::unique_ptr< ObjectSelectorBase< xAOD::Jet > > m_objectSelector_LargeRJet
std::unique_ptr< xAOD::TruthParticleContainer > m_muonsDressed
std::unique_ptr< xAOD::TruthParticleAuxContainer > m_goodPhotonsAux
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
Container for xAOD::MissingET_v1 objects.
std::unique_ptr< xAOD::TruthParticleContainer > m_electronsDressed
void makePrivateStore()
Create a new (empty) private store for this object.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
std::unique_ptr< xAOD::TruthParticleContainer > m_goodElectrons
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
std::unique_ptr< xAOD::JetContainer > m_goodJets
std::vector< std::string > m_VarRCJetRho
std::unique_ptr< xAOD::JetAuxContainer > m_goodLargeRJetsAux
bool isStable(const T &p)
std::unique_ptr< ObjectSelectorBase< xAOD::TruthParticle > > m_objectSelector_Muon
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
std::vector< std::string > m_VarRCJetMassScale
std::unique_ptr< xAOD::JetAuxContainer > m_goodJetsAux
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::unique_ptr< xAOD::TruthParticleAuxContainer > m_goodElectronsAux
JetContainer_v1 JetContainer
Definition of the current "jet container version".
std::unique_ptr< xAOD::TruthParticleAuxContainer > m_goodTausAux
bool descendingPtSorter(const xAOD::IParticle *p1, const xAOD::IParticle *p2)
Used when sorting the e, mu, jet, tau containers after CP corrections.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Jet_v1 Jet
Definition of the current "jet version".
void copyTruthMuonHistoryInfo(const xAOD::TruthParticle *tm_origin, const xAOD::TruthParticle *tm_target)
std::unique_ptr< ObjectSelectorBase< xAOD::TruthParticle > > m_objectSelector_Electron
bool isDressingPhoton(const xAOD::TruthParticle &photon, const xAOD::TruthParticleContainer &dressedParticles, const float dressingCone=0.1) const
const std::shared_ptr< top::TopConfig > & m_config