|
ATLAS Offline Software
|
Go to the documentation of this file.
27 unsigned int writeOpts = wOpts::writePileUp | wOpts::writeBeamSpot;
31 auto add_correctionHelper = [
this](std::shared_ptr<IsoCorrectionTestHelper>
helper) {
56 return StatusCode::SUCCESS;
60 return StatusCode::SUCCESS;
62 template <
class TARGET_TYPE,
class CONT_TYPE,
class COPY_TYPE>
65 std::pair<std::unique_ptr<COPY_TYPE>,
66 std::unique_ptr<xAOD::ShallowAuxContainer>>& cont)
const {
68 ATH_MSG_DEBUG(
"No key given. Assume it's no required to load the container");
69 return StatusCode::SUCCESS;
72 if (!readHandle.isValid()) {
74 return StatusCode::FAILURE;
79 std::unique_ptr<COPY_TYPE>& elems = cont.first;
80 for (
auto part : *(elems.get()) ) {
85 return StatusCode::SUCCESS;
103 const EventContext& ctx = Gaudi::Hive::currentContext();
106 std::pair<std::unique_ptr<xAOD::ElectronContainer>, std::unique_ptr<xAOD::ShallowAuxContainer>> ElShallow;
108 Electrons = ElShallow.first.
get();
111 std::pair<std::unique_ptr<xAOD::PhotonContainer>, std::unique_ptr<xAOD::ShallowAuxContainer>> PhShallow;
113 Photons = PhShallow.first.
get();
116 std::pair<std::unique_ptr<xAOD::MuonContainer>, std::unique_ptr<xAOD::ShallowAuxContainer>> MuonsShallow;
118 Muons = MuonsShallow.first.get();
123 return StatusCode::FAILURE;
138 TrackSet selected_trks{}, expected_trks{};
141 if (!closeTrkColl.isValid()) {
143 return StatusCode::FAILURE;
151 expected_trks = std::move(cache.
tracks);
152 muon_clusters = std::move(cache.
clusters);
153 pflows = std::move(cache.
flows);
158 if (!
helper)
return StatusCode::SUCCESS;
159 helper->SetClusters(muon_clusters);
160 helper->SetFlowElements(pflows);
167 return StatusCode::SUCCESS;
virtual Type::ObjectType type() const override=0
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
Electron_v1 Electron
Definition of the current "egamma version".
Gaudi::Property< float > m_ph_min_pt
StatusCode init(OWNER *instance)
Initialize method.
std::set< FlowElementPtr > PflowSet
Gaudi::Property< std::string > m_updatedIsoDeco
std::shared_ptr< IsoCorrectionTestHelper > m_pho_helper
std::shared_ptr< IsoCorrectionTestHelper > m_muo_helper
std::set< TrackPtr > TrackSet
const T * get(size_type n) const
Access an element, as an rvalue.
SelectionDecorator m_selDecorator
Gaudi::Property< std::string > m_backup_prefix
Property holding a SG store/key/clid from which a ReadHandle is made.
SelectionDecorator m_isoDecorator
bool empty() const
Test if the key is blank.
StatusCode finalize() override
StatusCode execute() override
Select isolated Photons, Electrons and Muons.
MuonVal::MuonTesterTree m_tree
Gaudi::Property< bool > m_isMC
@ Error
Some error happened during the object correction.
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
Gaudi::Property< float > m_el_max_eta
StatusCode loadContainer(const EventContext &ctx, const SG::ReadHandleKey< CONT_TYPE > &key, std::pair< std::unique_ptr< COPY_TYPE >, std::unique_ptr< xAOD::ShallowAuxContainer >> &cont) const
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_isoCloseByCorrTool
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_el_min_pt
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_polTrkKey
Optionally the algorithm can test the behaviour of the tracks selected by the IsoCloseByCorrectionTrk...
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::shared_ptr< IsoCorrectionTestHelper > m_ele_helper
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Input containers.
Gaudi::Property< float > m_ph_max_eta
Gaudi::Property< float > m_mu_max_eta
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.
std::set< CaloClusterPtr > ClusterSet
TestIsolationCloseByCorrAlg(const std::string &name, ISvcLocator *svcLoc)
StatusCode initialize() override
bool fill(const EventContext &ctx)
Fills the tree per call.
StatusCode write()
Finally write the TTree objects.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Gaudi::Property< std::string > m_isoDecoration
Class describing a TrackParticle.
bool passSelection(const EventContext &ctx, const xAOD::Muon *muon) const
Handle class for reading from StoreGate.
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Optionally the user can also parse the elec / muon / photon selection tools.
const CP::IsolationCloseByCorrectionTool * correction_tool() const
Gaudi::Property< float > m_mu_min_pt
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
ToolHandle< CP::IIsolationSelectionTool > m_isoSelectorTool
SG::ReadHandleKey< xAOD::EgammaContainer > m_elecKey
bool addBranch(std::shared_ptr< IMuonTesterBranch > branch)
Branch is added to the tree without transferring the ownership.
SG::ReadHandleKey< xAOD::EgammaContainer > m_photKey
Gaudi::Property< std::string > m_selDecoration