90 return StatusCode::FAILURE;
101 ATH_MSG_WARNING(
"PRD MultiTruth collection not available (" <<
m_multiTruth.key() <<
"). Skipping this info although requested.");}
103 prdmtColl = h_prdmtColl.
cptr();
113 if (not h_sdoCollection.
isValid()) {
117 sdoCollection = h_sdoCollection.
cptr();
124 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>() ) );
129 InDet::TRT_DriftCircleContainer::const_iterator it = h_trtPrds->begin();
130 InDet::TRT_DriftCircleContainer::const_iterator it_end = h_trtPrds->end();
131 unsigned int counter(0);
132 for( ; it!=it_end; ++it ) {
135 if(
m_TRTHelper->straw_layer_hash_max() <= (*it)->identifyHash() )
136 ATH_MSG_ERROR(
"My assumption about the maximum size of the hash was wrong");
137 (*offsets)[ (*it)->identifyHash() ] = counter;
140 if( (*it)->empty() )
continue;
143 for(
const auto prd : **it ){
149 xaod->push_back(xprd);
163 AUXDATA(xprd,
float, strawphi) = element->
center(surfaceID).phi();
176 AUXDATA(xprd,
int, TRTboard) = board ;
177 AUXDATA(xprd,
int, TRTchip) = chip ;
183 float locX = locpos.x();
184 if ( !(std::isinf(locpos.y()) || std::isnan(locpos.y())) ){
185 if (locpos.y()>=1e-07)
195 if(localCov.size() == 1){
197 }
else if(localCov.size() == 2){
205 const Amg::Vector3D gpos = prd->detectorElement()->surface(surfaceID).localToGlobal(prd->localPosition());
210 unsigned int word = prd->getWord();
213 double tot = prd->timeOverThreshold();
215 AUXDATA(xprd,
float, drifttime) = prd->driftTime(isvalid) ;
216 AUXDATA(xprd,
int, status) = isvalid;
217 AUXDATA(xprd,
float, tot) = tot ;
218 AUXDATA(xprd,
char, isHT) = prd->highLevel() ;
223 AUXDATA(xprd,
float, leadingEdge) = prd->rawDriftTime();
227 if(prd->highLevel()) {
231 AUXDATA(xprd,
float, driftTimeHTCorrection) = 0;
236 unsigned int theWord = word & 0x04020100;
237 char highThreshold = 0;
239 if (theWord == 0x04000000)
241 else if (theWord == 0x00020000)
243 else if (theWord == 0x00000100)
245 else if (theWord == 0x04020000)
247 else if (theWord == 0x00020100)
249 else if (theWord == 0x04000100)
251 else if (theWord == 0x04020100)
254 AUXDATA(xprd,
char, highThreshold) = highThreshold;
257 AUXDATA(xprd,
unsigned int, bitPattern) = word;
263 if ( stat==1 || stat==4 ) { gas_type =
kArgon; }
264 else if ( stat==5 ) { gas_type =
kKrypton; }
265 else if ( stat==2 || stat==3 ) { gas_type =
kXenon; }
266 else if ( stat==6 ) gas_type =
kEmAr;
267 else if ( stat==7 ) gas_type =
kEmKr;
269 AUXDATA(xprd,
char, gasType) = gas_type;
274 std::vector<int> uniqueIDs;
275 auto range = prdmtColl->equal_range(surfaceID);
276 for (
auto i = range.first; i != range.second; ++i) {
279 AUXDATA(xprd, std::vector<int> , truth_barcode) = uniqueIDs;
285 auto pos = sdoCollection->find(surfaceID);
286 int sdo_word = -1000000;
287 if( pos != sdoCollection->end() ) {
288 sdo_word = pos->second.word();
290 AUXDATA(xprd,
int, sdo_word) = sdo_word;
296 ATH_MSG_DEBUG(
" recorded TRT_PrepData obejcts: size " << xaod->size() );
301 StatusCode
sc = StatusCode::SUCCESS;