24 PRD_MultiTruthBuilder::PRD_MultiTruthBuilder(
const std::string&
type,
const std::string&
name,
const IInterface*
parent)
26 , m_idHelperPixel(nullptr)
28 declareInterface<IPRD_MultiTruthBuilder>(
this);
35 if (!
sc.isSuccess()) {
50 if(!prdTruth || !prd || !simDataMap) {
56 bool gotValidParticle =
false;
59 std::vector<Identifier>::const_iterator nextRDO = prd->
rdoList().begin();
60 std::vector<Identifier>::const_iterator lastRDO = prd->
rdoList().end();
61 for (; nextRDO!=lastRDO; ++nextRDO) {
62 InDetSimDataCollection::const_iterator iter(simDataMap->find(*nextRDO));
64 if ( pixels && iter == simDataMap->end() ) {
71 if(iter != simDataMap->end() ) {
75 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
76 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
77 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
78 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
95 gotValidParticle =
true;
100 std::pair<truthiter, truthiter>
r = prdTruth->equal_range(prd->
identify());
101 if(
r.second == std::find_if(
r.first,
r.second,
102 [ particleLink ](
const PRD_MultiTruthCollection::value_type &prd_to_truth) {
103 return prd_to_truth.second == particleLink;
106 prdTruth->insert(std::make_pair(prd->
identify(), particleLink));
113 if(gotSDO && !gotValidParticle) {