#include <Thin_vtxDuplicates.h>
Definition at line 18 of file Thin_vtxDuplicates.h.
◆ Thin_vtxDuplicates()
DerivationFramework::Thin_vtxDuplicates::Thin_vtxDuplicates |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~Thin_vtxDuplicates()
DerivationFramework::Thin_vtxDuplicates::~Thin_vtxDuplicates |
( |
| ) |
|
|
default |
◆ doThinning()
StatusCode DerivationFramework::Thin_vtxDuplicates::doThinning |
( |
| ) |
const |
|
virtual |
Definition at line 73 of file Thin_vtxDuplicates.cxx.
76 const EventContext& ctx = Gaudi::Hive::currentContext();
78 std::vector<bool> vtxMask(vertexContainer->size(),
true);
83 std::vector<SG::ReadDecorHandle<xAOD::VertexContainer, Char_t>> handles;
86 handles.emplace_back(
key, ctx);
87 if(!handles.back().isPresent())
return StatusCode::FAILURE;
89 for(
auto vtxItr = vertexContainer->cbegin(); vtxItr!=vertexContainer->cend(); ++vtxItr, ++
k) {
95 for(
auto &flagAcc : handles) {
96 if(flagAcc(*vtx) != 0) {
105 if(vtxMask[
k] ==
false)
continue;
114 std::vector<const xAOD::TrackParticle*> presentVertex, compareVertex;
117 presentVertex.clear();
121 sort( presentVertex.begin(), presentVertex.end() );
125 for(
auto vtxLoopItr = vtxItr+1; vtxLoopItr!=vertexContainer->cend(); vtxLoopItr++, loop_k++){
135 compareVertex.clear();
140 std::sort( compareVertex.begin(), compareVertex.end());
142 vtxMask[loop_k] =
false;
145 ATH_MSG_DEBUG(std::setw(14)<<compareVertex[0]<<std::setw(14) << compareVertex[1]<<std::setw(14)<<compareVertex[2]);
146 ATH_MSG_DEBUG(std::setw(14)<<presentVertex[0]<<std::setw(14) << presentVertex[1]<<std::setw(14)<<presentVertex[2]);
149 if( compareVertex[j] != presentVertex[j] ){vtxMask[loop_k] =
true;
break;}
151 ATH_MSG_DEBUG(
"Verdict:"<<(vtxMask[loop_k]?
"keep":
"erase") );
160 vertexContainer.keep(vtxMask);
162 m_nVtxTot.fetch_add( vtxTot, std::memory_order_relaxed);
163 m_nVtxPass.fetch_add( nVtxPass, std::memory_order_relaxed);
167 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::Thin_vtxDuplicates::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode DerivationFramework::Thin_vtxDuplicates::initialize |
( |
| ) |
|
|
virtual |
Definition at line 41 of file Thin_vtxDuplicates.cxx.
50 return StatusCode::FAILURE;
53 ATH_MSG_INFO(
"Vertices must pass the \"" << itr->key() <<
"\" selection");
61 return StatusCode::SUCCESS;
◆ m_noFlags
bool DerivationFramework::Thin_vtxDuplicates::m_noFlags |
|
private |
◆ m_nVtxPass
std::atomic<unsigned int> DerivationFramework::Thin_vtxDuplicates::m_nVtxPass |
|
private |
◆ m_nVtxTot
std::atomic<unsigned int> DerivationFramework::Thin_vtxDuplicates::m_nVtxTot |
|
mutableprivate |
◆ m_passFlags
◆ m_streamName
StringProperty DerivationFramework::Thin_vtxDuplicates::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
◆ m_vertexContainerNames
The documentation for this class was generated from the following files:
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.