|
ATLAS Offline Software
|
Go to the documentation of this file.
18 return l->p4().Et() >
r->p4().Et();
55 ATH_MSG_ERROR(
"This algorithm is initialized to save NO (0) Photons, so it shouldn't be running at all!");
56 return StatusCode::FAILURE;
60 return StatusCode::SUCCESS;
82 std::vector<const xAOD::Photon*> originalPhotons(inputPhotons->
begin(), inputPhotons->
end());
88 int sizeOfOriginalPhotonContainer =
static_cast<int>(originalPhotons.size());
91 if (
m_maxNPhotons > 0) it_maxPhotonBound = maxNPhotons < sizeOfOriginalPhotonContainer ? originalPhotons.begin() + maxNPhotons : originalPhotons.end();
92 else it_maxPhotonBound = originalPhotons.end();
96 std::partial_sort (originalPhotons.begin(), it_maxPhotonBound, originalPhotons.end(),
DescendingEt());
103 ATH_CHECK(h_TLAPhotons.
record (std::make_unique<xAOD::PhotonContainer>(),
104 std::make_unique<PhotonAuxContainer>()) );
111 for(
auto it_ph=originalPhotons.begin(); it_ph!=it_ptThresholdBound; ++it_ph ) {
123 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
HasPtAboveThreshold(double thresholdPt)
SG::WriteHandleKey< xAOD::PhotonContainer > m_TLAOutPhotonsKey
virtual FourMom_t p4() const override final
The full 4-momentum of the particle as a TLoretzVector.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Gaudi::Property< float > m_photonPtThreshold
An algorithm that can be simultaneously executed in multiple threads.
TrigEgammaTLAPhotonReAlgo(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
Gaudi::Property< int > m_maxNPhotons
SG::ReadHandleKey< xAOD::PhotonContainer > m_inputPhotonsKeys
bool operator()(const xAOD::Photon *l, const xAOD::Photon *r) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Photon_v1 Photon
Definition of the current "egamma version".
virtual StatusCode execute(const EventContext &ctx) const override
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
virtual StatusCode initialize() override
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool operator()(const xAOD::Photon *myphoton) const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.