10 #include "Identifier/Identifier.h"
42 m_nEvents(0), m_runNumber(0),
43 m_accumulateHits(nullptr),
75 return StatusCode::SUCCESS;
85 return StatusCode::SUCCESS;
96 return StatusCode::FAILURE;
106 if (not rdoContainer.
isValid()) {
108 return StatusCode::FAILURE;
111 if (not trkCollection.
isValid()) {
113 return StatusCode::FAILURE;
120 ATH_MSG_DEBUG (
"Couldn't retrieve VertexContainer with key: PrimaryVertices");
121 return StatusCode::SUCCESS;
124 int countVertices(0);
127 if ( vx-> nTrackParticles() >= 3) countVertices++;
130 if (countVertices < 1) {
131 ATH_MSG_INFO(
"no vertices with at least 3 tracks found" );
132 return StatusCode::SUCCESS;
136 int countRDOhitsInEvent(0);
139 if (not TRTCollection)
continue;
141 countRDOhitsInEvent++;
144 if (countRDOhitsInEvent>100000) {
145 ATH_MSG_INFO(
"N RDO hits in event greater than 100000: " << countRDOhitsInEvent <<
", exiting" );
149 if (trkCollection->size() > 10) {
150 ATH_MSG_INFO(
"N tracks greater than 10: " << trkCollection->size() <<
", exiting" );
159 std::vector<Identifier> holeIdentifiers;
160 std::vector<Identifier> holeIdentifiersWithHits;
164 const Trk::Perigee* perigee = (*trackIt)->perigeeParameters();
165 if ( not perigee ) {
ATH_MSG_ERROR(
"Trk::Perigee missing" );
continue; }
166 if ( std::abs(perigee->pT())/
CLHEP::GeV < 1. )
continue;
169 if ( not trackStates ) {
ATH_MSG_ERROR(
"Trk::TrackStateOnSurface empty" );
continue; }
171 int n_pixel_hits(0), n_sct_hits(0), n_trt_hits(0);
173 if ( *trackStatesIt ==
nullptr ) {
ATH_MSG_ERROR(
"*trackStatesIt == 0" );
continue; }
181 if (n_pixel_hits<2 || n_sct_hits < 6 || n_trt_hits<15)
continue;
189 if ( *trackStatesIt ==
nullptr ) {
ATH_MSG_ERROR(
"*trackStatesIt == 0" );
continue; }
194 if ( not driftCircleOnTrack )
continue;
202 double unbiased_locR = unbiased_track_parameters->parameters()[
Trk::locR];
203 if ( std::abs(unbiased_locR) >
m_locR_cut )
continue;
218 if (
holes==
nullptr )
continue;
224 if (!track_parameters) {
ATH_MSG_WARNING(
"m_trt_hole_finder track_parameters missing" );
continue; }
232 holeIdentifiers.push_back(
id );
243 if (TRTCollection==
nullptr)
continue;
250 if (
std::find(holeIdentifiers.begin(), holeIdentifiers.end(),
id) != holeIdentifiers.end())
251 holeIdentifiersWithHits.push_back(
id );
259 for (
unsigned int i=0;
i<holeIdentifiers.size();
i++) {
267 if (
std::find(holeIdentifiersWithHits.begin(), holeIdentifiersWithHits.end(),
id) != holeIdentifiersWithHits.end())
292 fprintf(
f,
"%d %d %d %d %d %d %d %d %d \n", 0, 0, 0, 0, 0, 0, 0, 0,
m_nEvents);
293 for (
size_t i=0;
i<2;
i++)
for (
size_t j=0; j<32; j++)
for (
size_t k=0;
k<
nAllStraws;
k++) {
294 int side = (
i>0)?-1:1;
295 if (
k>=1642)
side *= 2;
296 fprintf(
f,
"%d %zu %zu",
side, j,
k);
305 ATH_MSG_INFO(
"InDet::TRT_StrawStatus::printDetailedInformation() " );
318 ATH_MSG_INFO(
"if the code crashes on the next line, there is a problem with m_TRTStrawStatusSummarySvc not being loaded " );
319 ATH_MSG_INFO(
"in that case, running with reco turned on normally solves the problem, know of no better solution at the moment" );
320 ATH_MSG_INFO(
"if you do not need the detailed print information, you can also just set printDetailedInformation to 0 to avoid this crash" );
326 for (
int j=0; j<6; j++) fprintf(
f,
"%d ",
index[j]);
327 fprintf(
f,
"%d %d %d %d %d\n", chip, HVpad,
status, statusTemporary, statusPermanent);
341 const int numberOfStraws[74] = { 0, 15, 31, 47, 63, 79, 96, 113, 130, 147, 164, 182, 200, 218, 236, 254, 273, 292, 311, 329,
342 348, 368, 388, 408, 428, 448, 469, 490, 511, 532, 553, 575, 597, 619, 641, 663, 686, 709, 732, 755, 778, 802, 826, 849,
343 872, 896, 920, 944, 968, 993, 1018, 1043, 1068, 1093, 1119, 1145, 1171, 1197, 1223, 1250, 1277, 1304, 1331, 1358, 1386, 1414, 1442, 1470, 1498, 1527, 1556, 1585, 1614, 1642 };
346 if (layerNumber==1) strawLayerNumber+= 19;
347 else if (layerNumber==2) strawLayerNumber+= 43;
348 straw = ( numberOfStraws[strawLayerNumber+1] - strawNumber -1 );
350 int board = layerNumber;
351 if (board<6) { board *= 2;
if (strawLayerNumber>7) board++; }
353 straw = board * 192 + strawNumber * 8 + strawLayerNumber % 8 ;
357 index[1] = layerNumber;
359 index[3] = strawLayerNumber;
360 index[4] = strawNumber;