28 const IInterface* p ) :
53 return StatusCode::SUCCESS;
60 return StatusCode::SUCCESS;
68 if(!PV_col.isValid()) {
69 ATH_MSG_ERROR (
"Couldn't retrieve VertexContainer with key PrimaryVertices");
70 return StatusCode::FAILURE;
74 std::vector<bool> mask(PV_col->size(),
false);
87 for(
size_t i = 0; i<s; i++) {
90 for(
size_t i =0; i < 4; i++) {
92 if(origPv==
nullptr)
continue;
93 auto pvit = std::find (PV_col->begin(), PV_col->end(), origPv);
94 if(pvit == PV_col->end()) {
98 size_t x = std::distance(PV_col->begin(), pvit);
105 m_npass += std::accumulate(mask.begin(), mask.end(), 0);
109 std::vector<bool> trackmask(importedTrackParticles->size(),
false);
110 size_t pvnum = mask.size();
111 for(
size_t i =0; i<pvnum;i++){
112 if(mask[i] ==
false)
continue;
113 auto vtx = PV_col->at(i);
114 size_t s = vtx->nTrackParticles();
115 for(
size_t j=0;j<s;j++){
116 auto trackit = std::find(importedTrackParticles->begin(), importedTrackParticles->end(), vtx->trackParticle(j));
117 if(trackit == importedTrackParticles->end()){
121 size_t x = std::distance(importedTrackParticles->begin(), trackit);
122 trackmask.at(
x) =
true;
125 importedTrackParticles.
keep(trackmask);
126 m_tracks_kept += std::accumulate(trackmask.begin(), trackmask.end(), 0);
130 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
: B-physics xAOD helpers.
Handle for requesting thinning for a data object.
storage of the time histories of all the cells
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Handle for requesting thinning for a data object.
const xAOD::Vertex * origPv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
original PV
pv_type
: Enum type of the PV
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Vertex_v1 Vertex
Define the latest version of the vertex class.