81 return StatusCode::FAILURE;
94 prdmtColl = h_prdmtColl.
cptr();
104 if (not h_sdoCollection.
isValid()) {
108 sdoCollection = h_sdoCollection.
cptr();
115 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>() ) );
120 InDet::TRT_DriftCircleContainer::const_iterator it = h_trtPrds->begin();
121 InDet::TRT_DriftCircleContainer::const_iterator it_end = h_trtPrds->end();
122 unsigned int counter(0);
123 for( ; it!=it_end; ++it ) {
126 if(
m_TRTHelper->straw_layer_hash_max() <= (*it)->identifyHash() )
127 ATH_MSG_ERROR(
"My assumption about the maximum size of the hash was wrong");
128 (*offsets)[ (*it)->identifyHash() ] = counter;
131 if( (*it)->empty() )
continue;
134 for(
const auto prd : **it ){
140 xaod->push_back(xprd);
154 AUXDATA(xprd,
float, strawphi) = element->
center(surfaceID).phi();
167 AUXDATA(xprd,
int, TRTboard) = board ;
168 AUXDATA(xprd,
int, TRTchip) = chip ;
174 float locX = locpos.x();
175 if ( !(std::isinf(locpos.y()) || std::isnan(locpos.y())) ){
176 if (locpos.y()>=1e-07)
186 if(localCov.size() == 1){
188 }
else if(localCov.size() == 2){
196 const Amg::Vector3D gpos = prd->detectorElement()->surface(surfaceID).localToGlobal(prd->localPosition());
201 unsigned int word = prd->getWord();
204 double tot = prd->timeOverThreshold();
206 AUXDATA(xprd,
float, drifttime) = prd->driftTime(isvalid) ;
207 AUXDATA(xprd,
int, status) = isvalid;
208 AUXDATA(xprd,
float, tot) = tot ;
209 AUXDATA(xprd,
char, isHT) = prd->highLevel() ;
214 AUXDATA(xprd,
float, leadingEdge) = prd->rawDriftTime();
218 if(prd->highLevel()) {
222 AUXDATA(xprd,
float, driftTimeHTCorrection) = 0;
227 unsigned int theWord = word & 0x04020100;
228 char highThreshold = 0;
230 if (theWord == 0x04000000)
232 else if (theWord == 0x00020000)
234 else if (theWord == 0x00000100)
236 else if (theWord == 0x04020000)
238 else if (theWord == 0x00020100)
240 else if (theWord == 0x04000100)
242 else if (theWord == 0x04020100)
245 AUXDATA(xprd,
char, highThreshold) = highThreshold;
248 AUXDATA(xprd,
unsigned int, bitPattern) = word;
254 if ( stat==1 || stat==4 ) { gas_type =
kArgon; }
255 else if ( stat==5 ) { gas_type =
kKrypton; }
256 else if ( stat==2 || stat==3 ) { gas_type =
kXenon; }
257 else if ( stat==6 ) gas_type =
kEmAr;
258 else if ( stat==7 ) gas_type =
kEmKr;
260 AUXDATA(xprd,
char, gasType) = gas_type;
265 std::vector<int> uniqueIDs;
266 auto range = prdmtColl->equal_range(surfaceID);
267 for (
auto i = range.first; i != range.second; ++i) {
270 AUXDATA(xprd, std::vector<int> , truth_barcode) = std::move(uniqueIDs);
276 auto pos = sdoCollection->find(surfaceID);
277 int sdo_word = -1000000;
278 if( pos != sdoCollection->end() ) {
279 sdo_word = pos->second.word();
281 AUXDATA(xprd,
int, sdo_word) = sdo_word;
287 ATH_MSG_DEBUG(
" recorded TRT_PrepData obejcts: size " << xaod->size() );
292 StatusCode
sc = StatusCode::SUCCESS;