44 ,m_sumTool(
"TRT_StrawStatusSummaryTool", this)
45 ,m_TRTStrawNeighbourSvc(
"TRT_StrawNeighbourSvc",
name)
46 ,m_TRTCalDbTool(
"TRT_CalDbTool", this)
47 ,m_drifttool(
"TRT_DriftFunctionTool", this)
48 ,m_pTRTHelper(nullptr)
54 ,m_trackSelTool(
"InDet::InDetTrackSelectionTool/TrackSelectionTool", this)
144 for (
int ibe = 0; ibe < 2; ibe++) {
146 IdentifierHash idHash =
index;
158 idSide = idBarrelEndcap ? 1 : -1;
160 if (
isBarrel && (idBarrelEndcap == -1)) {
164 }
else if (ibe == 1) {
165 idSide = idBarrelEndcap ? 1 : 0;
167 if (!
isBarrel && ((idBarrelEndcap == -2) || (idBarrelEndcap == 2))) {
173 if (sectorflag == 1) {
174 if (!element)
continue;
176 for (
unsigned int istraw = 0; istraw < element->
nStraws(); istraw++) {
177 std::vector<Identifier> neighbourIDs;
184 if (idLayerWheel == 1) i_chip += 21;
186 if (idLayerWheel == 2) i_chip += 54;
188 int tempStrawNumber =
strawNumber(istraw, idStrawLayer, idLayerWheel);
190 if (tempStrawNumber < 0 || tempStrawNumber > (
s_Straw_max[ibe] - 1)) {
191 ATH_MSG_WARNING(
"Found tempStrawNumber = " << tempStrawNumber <<
" out of range.");
193 m_mat_chip_B.at(idPhiModule).at(tempStrawNumber) = i_chip;
194 m_mat_chip_B.at(idPhiModule + 32).at(tempStrawNumber) = i_chip;
196 }
else if (ibe == 1) {
198 int tempStrawNumber =
strawNumberEndCap(istraw, idStrawLayer, idLayerWheel, idPhiModule, idSide);
200 if (tempStrawNumber < 0 || tempStrawNumber > (
s_Straw_max[ibe] - 1)) {
201 ATH_MSG_WARNING(
"Found tempStrawNumber = " << tempStrawNumber <<
" out of range.");
203 m_mat_chip_E.at(idPhiModule).at(tempStrawNumber) = i_chip;
204 m_mat_chip_E.at(idPhiModule + 32).at(tempStrawNumber) = i_chip;
220 return StatusCode::SUCCESS;
227 switch (LayerNumber) {
245 int addToStrawNumber = 0;
246 int addToStrawNumberNext = 0;
248 const int numberOfStraws[75] = {
275 addToStrawNumber += numberOfStraws[
i - 1];
276 addToStrawNumberNext = addToStrawNumber + numberOfStraws[
i];
281 if (strawNumber < 0 || strawNumber >
s_Straw_max[0] - 1) {
296 static const int TripletOrientation[2][32] = {
298 1, 1, 1, 1, 1, 1, 1, 1,
299 0, 0, 0, 0, 0, 0, 0, 0,
300 1, 1, 1, 1, 1, 1, 1, 1,
301 0, 0, 0, 0, 0, 0, 0, 0
304 1, 1, 1, 1, 1, 1, 1, 1,
305 0, 0, 0, 0, 0, 0, 0, 0,
306 1, 1, 1, 1, 1, 1, 1, 1,
307 0, 0, 0, 0, 0, 0, 0, 0
312 if (
side == 2) phi1 = phi_stack,
side = 1;
313 else if (
side == -2) phi1 = 31 - phi_stack,
side = 0;
316 if (TripletOrientation[
side][phi1]) {
342 int strawNumberNew = 0;
344 if (LayerNumber < 6 && strawLayerNumber > 7) {
345 strawNumberNew = strawNumberNew + (384 * LayerNumber);
348 strawNumberNew = strawNumberNew + (384 * LayerNumber);
351 strawNumberNew = strawNumberNew + 2304 + 192 * (LayerNumber - 6);
354 strawNumberNew = strawNumberNew + 2304 + 192 * (LayerNumber - 6);
360 if (strawNumber < 0 || strawNumber >
s_Straw_max[1] - 1) {
371 float degreeValue = radValue /
M_PI * 180;
373 if (degreeValue < 0) degreeValue += 360;
390 for (; RDO_CollectionBegin != RDO_CollectionEnd; ++RDO_CollectionBegin) {
393 if (!TRT_Collection)
continue;
397 for (; p_rdo != TRT_Collection->
end(); ++p_rdo) {
400 if (!p_lolum)
continue;
511 const float timeCor = comTimeObject ? comTimeObject->
getTime() : 0;
513 auto p_trk = trackCollection.
begin();
519 int ntrackstack[2][64];
520 int nTotalTracks = 0;
521 int nTracksB[2] = {0, 0};
522 int nTracksEC[2] = {0, 0};
523 int nTracksEC_B[2] = {0, 0};
524 int nTrksperLB_B = 0;
525 int nTrksperLB_E[2] = {0, 0};
527 for (
int ibe = 0; ibe < 2; ibe++) {
528 std::fill(ntrackstack[ibe], ntrackstack[ibe] + 64, 0);
531 for (; p_trk != trackCollection.
end(); ++p_trk) {
540 AllTrkPar = ((*p_trk)->track())->trackParameters();
546 for (p_trkpariter = AllTrkPar->
begin(); p_trkpariter != AllTrkPar->
end(); ++p_trkpariter) {
548 if ((mPer =
dynamic_cast<const Trk::Perigee *
>(*p_trkpariter)))
break;
560 const Trk::TrackStates *trackStates = ((*p_trk)->track())->trackStateOnSurfaces();
562 if (trackStates ==
nullptr)
continue;
570 int n_trt_hits =
unsigned(tempHitsVariable);
572 bool is_pT_over_20GeV =
false;
575 is_pT_over_20GeV =
true;
577 is_pT_over_20GeV =
false;
580 const bool cnst_is_pT_over_20GeV = is_pT_over_20GeV;
585 if (!passed_track_preselection)
continue;
588 int checkB[2] = {0, 0};
589 int checkEC[2] = {0, 0};
590 int checkEC_B[2] = {0, 0};
592 int nTRTHits_side[2][2];
593 int nTRTHitsW_perwheel[2][18];
594 int hitontrack[2] = {0, 0};
595 int hitontrack_E_side[2] = {0, 0};
597 for (
int ibe = 0; ibe < 2; ibe++) {
598 for (
int iside = 0; iside < 2; iside++) {
599 nTRTHits_side[ibe][iside] = -1;
600 nTRTHitsW[ibe][iside] = 0;
602 std::fill(nTRTHitsW_perwheel[ibe], nTRTHitsW_perwheel[ibe] + 18, 0);
606 int layer_or_wheel = 0;
610 int nearest_straw_layer[2] = {100, 100};
611 int nearest_straw[2] = {0, 0};
612 int testLayer[2] = {100, 100};
613 float phi2D[2] = {-100, -100};
615 for (TSOSItBeginTemp = TSOSItBegin0; TSOSItBeginTemp != TSOSItEnd; ++TSOSItBeginTemp) {
616 if ((*TSOSItBeginTemp) ==
nullptr)
continue;
621 if (!trtCircle)
continue;
624 if (!aTrackParam)
continue;
627 int ibe = std::abs(barrel_ec) - 1;
633 if (layer_or_wheel >= testLayer[ibe])
continue;
634 testLayer[ibe] = layer_or_wheel;
636 if (straw_layer < nearest_straw_layer[ibe]) {
637 nearest_straw_layer[ibe] = straw_layer;
638 nearest_straw[ibe] =
straw;
642 circleElement =
nullptr;
646 if (phi2D[0] == -999) {
647 ATH_MSG_DEBUG(
"Track did not go through inner layer of Barrel.");
650 testLayer[0] <<
" m_straw_layer: " <<
651 nearest_straw_layer[0] <<
" (in the Barrel).");
654 if (phi2D[1] == -999) {
655 ATH_MSG_DEBUG(
"Track did not go through any inner layer of EndCap A or C.");
658 testLayer[1] <<
" m_straw_layer: " <<
659 nearest_straw_layer[1] <<
" (in the EndCaps).");
662 bool trackfound[2][64];
664 for (
int i = 0;
i < 2;
i++) {
665 std::fill(trackfound[
i], trackfound[
i] + 64,
false);
668 for (TSOSItBegin = TSOSItBegin0; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
670 if ((*TSOSItBegin) ==
nullptr)
continue;
676 if (!trtCircle)
continue;
680 if (!aTrackParam)
continue;
688 int ibe = std::abs(barrel_ec) - 1;
689 int iside = barrel_ec > 0 ? 0 : 1;
690 int thisStrawNumber[2] = {-1, -1};
691 int chip[2] = {0, 0};
696 if (thisStrawNumber[ibe] >= 0 && thisStrawNumber[ibe] <
s_Straw_max[ibe]) {
697 chip[ibe] =
m_mat_chip_B.at(phi_module).at(thisStrawNumber[ibe]);
699 }
else if (ibe == 1) {
702 if (thisStrawNumber[ibe] >= 0 && thisStrawNumber[ibe] <
s_Straw_max[ibe]) {
703 chip[ibe] =
m_mat_chip_E.at(phi_module).at(thisStrawNumber[ibe]);
706 thisStrawNumber[ibe] = -1;
709 if (thisStrawNumber[ibe] < 0 || thisStrawNumber[ibe] >=
s_Straw_max[ibe])
continue;
711 if (checkB[iside] == 0 && ibe == 0) {
716 if (checkEC[iside] == 0 && ibe == 1) {
721 if (checkEC_B[iside] == 0 && checkB[iside] == 1 && ibe == 1 ) {
722 nTracksEC_B[iside]++;
723 checkEC_B[iside] = 1;
733 int iphi_module = -9999;
735 if (iside == 0) iphi_module = phi_module;
736 else if (iside == 1) iphi_module = phi_module + 32;
738 if (iphi_module >= 0 && iphi_module < 64) trackfound[ibe][iphi_module] =
true;
749 }
else if (ibe == 1) {
751 hitontrack_E_side[iside]++;
757 if (RawDriftCircle) {
758 nTRTHits_side[ibe][iside]++;
763 if (driftTimeValid) {
764 const float validRawDriftTime = RawDriftCircle->
rawDriftTime();
767 ValidRawDriftTimeonTrkS_x = thisStrawNumber[ibe];
768 ValidRawDriftTimeonTrkS_y = validRawDriftTime;
773 ValidRawDriftTimeonTrkC_x = chip[ibe] - 1;
774 ValidRawDriftTimeonTrkC_y = validRawDriftTime;
782 DriftTimeonTrkDist_B_Ar = RawDriftCircle->
rawDriftTime();
789 }
else if (ibe == 1) {
791 DriftTimeonTrkDist_E_Ar = RawDriftCircle->
rawDriftTime();
801 float locR_err = 0.0;
802 const AmgSymMatrix(5)* b_err = aTrackParam->covariance();
806 ATH_MSG_WARNING(
"Some diagonal element(s) of the covariance matrix is (are) infinite or smaller than / too close to zero or above the covariance cutoff");
812 ATH_MSG_ERROR(
"Track parameters have no covariance attached.");
823 if ((loc *
locR) < 0) loc = -loc;
829 double pull_b = -999.;
830 const double diff_loc_err = (loc_err * loc_err * loc_err * loc_err) - (locR_err * locR_err * locR_err * locR_err);
831 if ( diff_loc_err > 0 ) {
832 pull_b = (loc -
locR) / sqrt(diff_loc_err);
835 else pull_b_fill =
false;
837 const double trkdrifttime = (!rtr) ? 0 : rtr->
drifttime(std::abs(
locR));
838 const double timeresidual = RawDriftCircle->
rawDriftTime() - thist0 - trkdrifttime;
843 Pull_Biased_Barrel = pull_b;
849 Residual_B_Ar = loc -
locR;
851 Residual_noTubeHits_B_Ar = loc -
locR;
852 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), Residual_noTubeHits_B_Ar);
854 if (cnst_is_pT_over_20GeV) {
855 Residual_B_Ar_20GeV = loc -
locR;
857 Residual_noTubeHits_B_Ar_20GeV = loc -
locR;
858 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), Residual_noTubeHits_B_Ar_20GeV);
860 TimeResidual_B_Ar = timeresidual;
862 TimeResidual_noTubeHits_B_Ar = timeresidual;
863 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), TimeResidual_noTubeHits_B_Ar);
865 Residual_B = loc -
locR;
867 Residual_noTubeHits_B = loc -
locR;
868 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), Residual_noTubeHits_B);
869 TimeResidual_B = timeresidual;
871 TimeResidual_noTubeHits_B = timeresidual;
872 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), TimeResidual_noTubeHits_B);
874 if (cnst_is_pT_over_20GeV) {
875 Residual_B_20GeV = loc -
locR;
877 Residual_noTubeHits_B_20GeV = loc -
locR;
878 if (!isTubeHit)
fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), Residual_noTubeHits_B_20GeV);
881 }
else if (ibe == 1) {
884 Pull_Biased_EndCap = pull_b;
890 Residual_E_Ar = loc -
locR;
892 Residual_noTubeHits_E_Ar = loc -
locR;
894 TimeResidual_E_Ar = timeresidual;
896 TimeResidual_noTubeHits_E_Ar = timeresidual;
899 if (cnst_is_pT_over_20GeV) {
900 Residual_E_Ar_20GeV = loc -
locR;
902 Residual_noTubeHits_E_Ar_20GeV = loc -
locR;
906 Residual_E = loc -
locR;
908 Residual_noTubeHits_E = loc -
locR;
910 TimeResidual_E = timeresidual;
912 TimeResidual_noTubeHits_E = timeresidual;
915 if (cnst_is_pT_over_20GeV) {
916 Residual_E_20GeV = loc -
locR;
918 Residual_noTubeHits_E_20GeV = loc -
locR;
928 WireToTrkPosition_B_Ar =
locR;
931 WireToTrkPosition_B =
locR;
934 }
else if (ibe == 1) {
936 WireToTrkPosition_E_Ar =
locR;
939 WireToTrkPosition_E =
locR;
946 const float EP = timeCor;
952 RtRelation_B_Ar_x =
LE - EP - t0;
953 RtRelation_B_Ar_y = std::abs(
locR);
954 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), RtRelation_B_Ar_x, RtRelation_B_Ar_y);
956 RtRelation_B_Ar_x =
LE - t0;
957 RtRelation_B_Ar_y = std::abs(
locR);
958 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), RtRelation_B_Ar_x, RtRelation_B_Ar_y);
962 RtRelation_B_x =
LE - EP - t0;
963 RtRelation_B_y = std::abs(
locR);
966 RtRelation_B_x =
LE - t0;
967 RtRelation_B_y = std::abs(
locR);
971 }
else if (ibe == 1) {
974 RtRelation_E_Ar_x =
LE - EP - t0;
975 RtRelation_E_Ar_y = std::abs(
locR);
978 RtRelation_E_Ar_x =
LE - t0;
979 RtRelation_E_Ar_y = std::abs(
locR);
984 RtRelation_E_x =
LE - EP - t0;
985 RtRelation_E_y = std::abs(
locR);
988 RtRelation_E_x =
LE - t0;
989 RtRelation_E_y = std::abs(
locR);
1009 HitTronTMapC_x = chip[ibe] - 1;
1010 HitTronTMapC_y = trailingEdgeScaled;
1015 HitTronTwEPCMapS_x = thisStrawNumber[ibe];
1016 HitTronTwEPCMapS_y = trailingEdgeScaled - timeCor;
1021 HitTronTwEPCMapC_x = chip[ibe] - 1;
1022 HitTronTwEPCMapC_y = trailingEdgeScaled - timeCor;
1030 TronTDist_B_Ar = trailingEdgeScaled;
1032 AvgTroTDetPhi_B_Ar_x = phi2D[ibe];
1033 AvgTroTDetPhi_B_Ar_y = trailingEdgeScaled;
1034 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), AvgTroTDetPhi_B_Ar_x, AvgTroTDetPhi_B_Ar_y);
1036 TronTDist_B = trailingEdgeScaled;
1038 AvgTroTDetPhi_B_x = phi2D[ibe];
1039 AvgTroTDetPhi_B_y = trailingEdgeScaled;
1040 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), AvgTroTDetPhi_B_x, AvgTroTDetPhi_B_y);
1042 }
else if (ibe == 1) {
1044 TronTDist_E_Ar = trailingEdgeScaled;
1046 AvgTroTDetPhi_E_Ar_x = phi2D[ibe];
1047 AvgTroTDetPhi_E_Ar_y = trailingEdgeScaled;
1050 TronTDist_E = trailingEdgeScaled;
1052 AvgTroTDetPhi_E_x = phi2D[ibe];
1053 AvgTroTDetPhi_E_y = trailingEdgeScaled;
1064 for (
int ibe = 0; ibe < 2; ibe++) {
1065 for (
int i = 0;
i < 64;
i++)
1066 if (trackfound[ibe][
i])
1067 ntrackstack[ibe][
i]++;
1072 NumHoTDetPhi_B_x = phi2D[ibe];
1073 NumHoTDetPhi_B_y = hitontrack[ibe];
1074 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), NumHoTDetPhi_B_x, NumHoTDetPhi_B_y);
1080 NumHoTDetPhi_E_x = phi2D[ibe];
1081 NumHoTDetPhi_E_y = hitontrack_E_side[0];
1082 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe)+
"0", NumHoTDetPhi_E_x, NumHoTDetPhi_E_y);
1086 NumHoTDetPhi_E_x = phi2D[ibe];
1087 NumHoTDetPhi_E_y = hitontrack_E_side[1];
1088 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe)+
"1", NumHoTDetPhi_E_x, NumHoTDetPhi_E_y);
1093 if (phi2D[ibe] < 0)
continue;
1097 if (nTRTHitsW[ibe][0] + nTRTHitsW[ibe][1] > 0) {
1098 NumTrksDetPhi_B = phi2D[ibe];
1101 }
else if (ibe == 1) {
1102 if (nTRTHitsW[ibe][0] > 0) {
1103 NumTrksDetPhi_E = phi2D[ibe];
1107 if (nTRTHitsW[ibe][1] > 0) {
1108 NumTrksDetPhi_E = phi2D[ibe];
1115 if ((nTRTHitsW[ibe][0] + nTRTHitsW[ibe][1]) > 0) {
1118 if (comTimeObject) {
1119 if (
m_doShift && (phi2D[ibe] > 0) && (std::abs(timeCor) > 1
e-8)) {
1120 EvtPhaseDetPhi_B_x = phi2D[ibe];
1121 EvtPhaseDetPhi_B_y = timeCor;
1122 fill(
"ShiftTRTTrackHistograms"+
std::to_string(ibe), EvtPhaseDetPhi_B_x, EvtPhaseDetPhi_B_y);
1125 }
else if (ibe == 1) {
1126 for (
int iside = 0; iside < 2; iside++) {
1127 if (nTRTHitsW[ibe][iside] > 0) nTrksperLB_E[iside]++;
1128 if (comTimeObject) {
1129 if (nTRTHits_side[ibe][iside] > 5 && (std::abs(timeCor)
1132 EvtPhaseDetPhi_E_x = phi2D[ibe];
1133 EvtPhaseDetPhi_E_y = timeCor;
1143 if (comTimeObject) {
1144 if (std::abs(timeCor) > 1
e-8) {
1147 fill(
"ShiftTRTTrackHistograms0", EvtPhase);
1151 std::vector<int> trigid;
1154 std::vector<unsigned int> level1TAV = trigDecision->
tav();
1156 for (
unsigned int j = 0; j < 8 && j < level1TAV.size(); ++j) {
1157 for (
unsigned int i = 0;
i < 32; ++
i) {
1158 if ((level1TAV[j] >>
i) & 0
x1) {
1159 trigid.push_back(
i + (j % 8) * 32);
1164 for (
unsigned int j = 0; j < trigid.size(); ++j) {
1165 EvtPhaseVsTrig_x = timeCor;
1166 EvtPhaseVsTrig_y = trigid[j];
1167 fill(
"ShiftTRTTrackHistograms0", EvtPhaseVsTrig_x, EvtPhaseVsTrig_y);
1180 SummaryWeight = nTotalTracks;
1183 SummaryWeight = nTracksB[0];
1186 SummaryWeight = nTracksB[1];
1189 SummaryWeight = nTracksEC[0];
1192 SummaryWeight = nTracksEC[1];
1195 SummaryWeight = nTracksEC_B[0];
1198 SummaryWeight = nTracksEC_B[1];
1202 const unsigned int lumiBlock = eventInfo.lumiBlock();
1204 int lastLumiBlock = -99;
1208 float evtLumiBlock = 1.;
1209 float lumiBlockScale = (evtLumiBlock > 0) ? (1. / evtLumiBlock) : 0;
1212 NTrksperLB_x = lastLumiBlock;
1213 NTrksperLB_y = (
float)nTrksperLB_B * lumiBlockScale;
1214 fill(
"ShiftTRTTrackHistograms0", NTrksperLB_x, NTrksperLB_y);
1216 for (
int iside = 0; iside < 2; iside++) {
1217 NTrksperLB_x = lastLumiBlock;
1218 NTrksperLB_y = (
float)nTrksperLB_E[iside] * lumiBlockScale;
1224 for (
int iside = 0; iside < 2; iside++) {
1225 nTrksperLB_E[iside] = 0;
1233 return StatusCode::SUCCESS;
1248 int lumiBlockNumber;
1250 lumiBlockNumber = eventInfo.lumiBlock();
1258 IntLumWeight = intLum;
1259 fill(
"SmryHistograms", IntLumWeight, IntLum);
1260 LBvsLum = lumiBlockNumber;
1261 LBvsLumWeight = intLum;
1262 fill(
"SmryHistograms", LBvsLumWeight, LBvsLum);
1263 LBvsTime_x = lumiBlockNumber;
1265 fill(
"SmryHistograms", LBvsTime_x, LBvsTime_y);
1274 auto p_trk = trackCollection.
begin();
1279 for (; p_trk != trackCollection.
end(); ++p_trk) {
1280 AllTrkPar = ((*p_trk)->track())->trackParameters();
1282 for (p_trkpariter = AllTrkPar->
begin(); p_trkpariter != AllTrkPar->
end(); ++p_trkpariter) {
1283 if ((perigee =
dynamic_cast<const Trk::Perigee *
>(*p_trkpariter)))
break;
1290 ATH_MSG_DEBUG(
"No perigee mearsurement found for the track. This entry will not be propogated to aging histograms.");
1294 float track_eta = perigee->eta();
1295 float track_p = (perigee->parameters()[
Trk::qOverP] != 0.) ? std::abs(1. / (perigee->parameters()[
Trk::qOverP])) : 10e7;
1296 const Trk::TrackStates *trackStates = ((*p_trk)->track())->trackStateOnSurfaces();
1298 if (trackStates ==
nullptr)
continue;
1305 int trt_hits =
unsigned(tempHitsVariable);
1309 std::abs(track_p) >= 5000.;
1311 if (!passed_track_preselection)
continue;
1314 const Trk::TrackStates *track_states = ((*p_trk)->track())->trackStateOnSurfaces();
1317 ATH_MSG_DEBUG(
"This track has " << track_states->
size() <<
" track states on surface.");
1319 ATH_MSG_DEBUG(
"This track has null track states on surface.");
1323 int barrel_ec_side = 0;
1324 int layer_or_wheel = 0;
1326 int straw_layer = 0;
1328 for (; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
1329 if ((*TSOSItBegin) ==
nullptr)
continue;
1335 if (!trtCircle)
continue;
1336 if (!aTrackParam)
continue;
1344 int Ba_Ec = abs(barrel_ec_side) - 1;
1345 int Side = barrel_ec_side > 0 ? 0 : 1;
1349 double RPos = sqrt(xPos * xPos + yPos * yPos);
1355 if (!RawDriftCircle) {
1361 int middleHTbit = RawDriftCircle->
getWord() & 0x00020000;
1363 bool is_middleHTbit_high = (middleHTbit != 0);
1365 bool isHighLevel = is_middleHTbit_high;
1366 bool shortStraw =
false;
1369 if (std::abs(track_eta) < 2. && Ba_Ec == 0.) {
1370 if ((layer_or_wheel == 0) && (phi_module < 4 || (phi_module > 7 && phi_module < 12) || (phi_module > 15 && phi_module < 20) || (phi_module > 23 && phi_module < 28))) InputBar = 1;
1371 else if ((
runNumber >= 296939) && (layer_or_wheel == 0) && (phi_module > 27)) InputBar = 1;
1372 else if (layer_or_wheel == 0)
1374 else if ((layer_or_wheel == 1) && ((phi_module > 1 && phi_module < 6) || (phi_module > 9 && phi_module < 14) || (phi_module > 17 && phi_module < 22) || (phi_module > 25 && phi_module < 30)))
1376 else if (layer_or_wheel == 1)
1378 else if (layer_or_wheel == 2 && phi_module % 2 != 0)
1380 else if (layer_or_wheel == 2)
1387 if ((layer_or_wheel == 0) && straw_layer < 9.)
1392 if ((!shortStraw) && (Ba_Ec == 0)) {
1423 if ((Ba_Ec == 1) && (layer_or_wheel < 6) &&
1424 ((straw_layer > 3 && straw_layer < 8) ||
1425 (straw_layer > 11))) {
1428 if ((Ba_Ec == 1) && (layer_or_wheel >= 6) &&
1429 (straw_layer > 3)) {
1432 if ((Ba_Ec == 1) && (layer_or_wheel < 6) &&
1433 ((straw_layer > -1 && straw_layer < 4) ||
1434 (straw_layer > 7 && straw_layer < 12))) {
1437 if ((Ba_Ec == 1) && (layer_or_wheel >= 6) &&
1438 ((straw_layer > -1 && straw_layer < 4))) {
1442 if (WType < 0 && Ba_Ec == 1) {
1458 return StatusCode::SUCCESS;
1464 bool passEventBurst =
true;
1476 if (!xAODEventInfo.
isValid()) {
1479 return StatusCode::FAILURE;
1483 if (!trackCollection.
isValid()) {
1486 return StatusCode::FAILURE;
1491 if (!trigDecision) {
1496 const ComTime *comTimeObject=
nullptr;
1499 if (!tmp_comTimeObject.
isValid()) {
1504 comTimeObject = tmp_comTimeObject.
cptr();
1511 if (!trackCollection.
isValid()) {
1514 return StatusCode::FAILURE;
1518 if (passEventBurst) {
1524 return StatusCode::SUCCESS;