24 m_typeName(
"Segment"){
27 declareInterface<IDataRetriever>(
this);
45 if (
msgLvl(MSG::ERROR))
msg(MSG::ERROR) <<
"Unable to retrieve iterator for Segment collection" <<
endmsg;
46 return StatusCode::RECOVERABLE;
50 for (; CollectionItr!=CollectionsEnd; ++CollectionItr) {
60 DataVect theta; theta.reserve(NSegs);
61 DataVect numHits; numHits.reserve(NSegs);
66 for (SegmentItr=(*CollectionItr).begin(); SegmentItr!=(*CollectionItr).end(); ++SegmentItr) {
69 x.emplace_back((*SegmentItr)->globalPosition().x()/10.);
70 y.emplace_back((*SegmentItr)->globalPosition().y()/10.);
71 z.emplace_back((*SegmentItr)->globalPosition().z()/10.);
72 phi.emplace_back((*SegmentItr)->localParameters()[
Trk::phi]);
73 theta.emplace_back((*SegmentItr)->localParameters()[
Trk::theta]);
78 hits.reserve(
hits.size()+(*SegmentItr)->containedMeasurements().size());
81 std::vector< const Trk::MeasurementBase * >::const_iterator measItr, measEnd;
82 measItr=(*SegmentItr)->containedMeasurements().begin();
83 measEnd=(*SegmentItr)->containedMeasurements().end();
86 for (; measItr!=measEnd; ++measItr) {
101 numHits.emplace_back(NRoTs);
115 std::string multiple =
"hits multiple=\"" +
DataType(
hits.size()*1./numHits.size()).toString() +
"\"";
121 return StatusCode::RECOVERABLE;
132 return StatusCode::SUCCESS;