|
ATLAS Offline Software
|
Go to the documentation of this file.
42 return StatusCode::SUCCESS;
48 return StatusCode::SUCCESS;
59 return StatusCode::SUCCESS;
66 std::vector<bool> keptTrackParticles;
71 keptTrackParticles.resize( trackPC->size(),
false );
77 std::vector<bool> keptVertices;
82 keptVertices.resize( vertices->size(),
false );
99 for( ; el_itr != el_end; ++el_itr ) {
103 if( ! link.isValid() ){
106 ATH_MSG_DEBUG(
"Electrons : Keeping GSF Track Particle with index : "<< link.index() );
107 keptTrackParticles[link.index() ] =
true;
119 auto ph_itr = photons->
begin();
120 auto ph_end = photons->
end();
121 for( ; ph_itr != ph_end; ++ph_itr ) {
123 auto vertexLinks= (*ph_itr) ->vertexLinks();
124 for (
const auto& vxlink : vertexLinks){
125 if( ! vxlink.isValid() ){
128 ATH_MSG_DEBUG(
"Photons : Keeping GSF Vertex with index : "<< vxlink.index() );
129 keptVertices[vxlink.index()]=
true;
137 if( ! link.isValid() ){
140 ATH_MSG_DEBUG(
"Photons : Keeping GSF Track Particle with index : "<< link.index() );
141 keptTrackParticles[link.index() ] =
true;
153 for (
const auto *
el : *fwdelectrons) {
157 if (!link.isValid()) {
161 "Keeping GSF Track Particle with index : "
163 keptTrackParticles[link.index()] =
true;
170 trackPC.
keep (keptTrackParticles);
171 vertices.
keep (keptVertices);
175 return StatusCode::SUCCESS;
StringProperty m_streamName
Name of the stream being thinned.
Handle for requesting thinning for a data object.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
StatusCode finalize() override final
finalize method
SG::ThinningHandleKey< xAOD::VertexContainer > m_VertexKey
GSF vertex container to thin.
SG::ReadHandleKey< xAOD::PhotonContainer > m_InputPhotonContainerKey
photon collection input name
StatusCode execute(const EventContext &ctx) const override final
execute method
bool empty() const
Test if the key is blank.
Handle for requesting thinning for a data object.
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Gaudi::Property< bool > m_doThinning
Bool to decide if we actually do the Thinning.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< ElementLink< xAOD::TrackParticleContainer > > trackParticleLinks(const xAOD::TauJet *tau, xAOD::TauJetParameters::TauTrackFlag flag=xAOD::TauJetParameters::TauTrackFlag::classifiedCharged)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< xAOD::ElectronContainer > m_InputForwardElectronContainerKey
forward electron collection input name
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class describing a Vertex.
SG::ReadHandleKey< xAOD::ElectronContainer > m_InputElectronContainerKey
electron collection input name
Handle class for reading from StoreGate.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_TrackParticlesKey
GSF Track Particle container to thin.
StatusCode initialize() override final
initialize method