21 return StatusCode::SUCCESS;
30 int pixCLBeforeCuts{};
39 int pixModulesOverThreshold{};
42 ATH_MSG_DEBUG(
"Successfully retrieved pixel SP container of size " << pixelSP->
size());
44 for (
const auto pixSPointColl : *pixelSP) {
45 if (pixSPointColl ==
nullptr) {
49 const Identifier pixid = (pixSPointColl)->identify();
55 int nPixSP{}, nPixCL_1{}, nPixCL_2{}, nPixCLmin3{}, nPixCLnoToT{};
56 for (
const auto pSP : *pixSPointColl) {
61 const int pixclToT = pixClust->
totalToT();
80 ATH_MSG_DEBUG(
" This pixel module : " << pixid <<
" produced " << nPixSP <<
" pix spacepoints. Ignoring these spacepoints as the maximum allowed spacepoints per module is " <<
m_pixModuleThreshold);
81 pixModulesOverThreshold++;
84 pixCLnoToT += nPixCLnoToT;
87 pixCLmin3 += nPixCLmin3;
89 pixCLBarrel += nPixSP;
90 ATH_MSG_VERBOSE(
" Formed " << nPixSP <<
" PIX spacepoints in PIX Barrel after ToT cut.");
91 }
else if (
bec == 2) {
92 pixCLEndcapA += nPixSP;
93 ATH_MSG_VERBOSE(
" Formed " << nPixSP <<
" PIX spacepoints in PIX ECA after ToT cut.");
94 }
else if (
bec == -2) {
95 pixCLEndcapC += nPixSP;
96 ATH_MSG_VERBOSE(
" Formed " << nPixSP <<
" PIX spacepoints in PIX ECC after ToT cut.");
101 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCLBeforeCuts <<
" pixel spacepoints in total before cuts.");
102 ATH_MSG_DEBUG(
"REGTEST : " << pixCL_1 <<
" have cl size == 1 in total.");
103 ATH_MSG_DEBUG(
"REGTEST : " << pixCL_2 <<
" have cl size == 2 in total.");
104 ATH_MSG_DEBUG(
"REGTEST : " << pixCLmin3 <<
" have cl size >= 3 in total.");
105 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCLnoToT <<
" pixel spacepoints without ToT cut in total.");
106 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCL <<
" pixel spacepoints after ToT cut in total.");
107 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCLBarrel <<
" SP in pixel barrel in total.");
108 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCLEndcapA <<
" SP in pixel ECA in total.");
109 ATH_MSG_DEBUG(
"REGTEST : Formed " << pixCLEndcapC <<
" SP in pixel ECC in total.");
115 ATH_MSG_DEBUG(
"Successfully retrieved SCT SP container of size " << SctSP->
size());
123 int sctModulesOverThreshold{};
125 for (
const auto SctSPointColl : *SctSP) {
126 if (SctSPointColl ==
nullptr) {
130 nSctSP = (SctSPointColl)->
size();
131 const Identifier Sctid = (SctSPointColl)->identify();
135 <<
" with sctid module " << Sctid);
140 ATH_MSG_DEBUG(
" This SCT module : " << Sctid <<
" produced " << nSctSP <<
" SCT spacepoints. Ignoring these spacepoints as the number of allowed spacepoints per module is between"
142 sctModulesOverThreshold++;
145 sctSPBarrel += nSctSP;
147 }
else if (
bec == 2) {
148 sctSPEndcapA += nSctSP;
150 }
else if (
bec == -2) {
151 sctSPEndcapC += nSctSP;
157 sctSP = sctSPEndcapC + sctSPBarrel + sctSPEndcapA;
159 ATH_MSG_DEBUG(
"REGTEST : Formed " << sctSP <<
" sct spacepoints in total.");
160 ATH_MSG_DEBUG(
"REGTEST : Formed " << sctSPEndcapC <<
" sct ECC spacepoints in total.");
161 ATH_MSG_DEBUG(
"REGTEST : Formed " << sctSPBarrel <<
" sct Barr spacepoints in total.");
162 ATH_MSG_DEBUG(
"REGTEST : Formed " << sctSPEndcapA <<
" sct ECA spacepoints in total.");
167 auto spacePoints = std::make_unique<xAOD::TrigCompositeContainer>();
168 auto spacePointsAux = std::make_unique<xAOD::TrigCompositeAuxContainer>();
169 spacePoints->setStore(spacePointsAux.get());
172 spacePoints->push_back(spCounts);
174 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> monitoredVariables;
176 #define SAVE_AND_MONITOR(__VARNAME) \
177 spCounts->setDetail(#__VARNAME, __VARNAME); \
178 auto mon_##__VARNAME = Monitored::Scalar(#__VARNAME, __VARNAME); \
179 monitoredVariables.emplace_back(mon_##__VARNAME);
193 #undef SAVE_AND_MONITOR
196 monitoredVariables.emplace_back(mon_pixCLBeforeCuts);
197 auto mon_pixModulesOverThreshold =
Monitored::Scalar<int>(
"pixModulesOverThreshold", pixModulesOverThreshold);
198 monitoredVariables.emplace_back(mon_pixModulesOverThreshold);
199 auto mon_sctModulesOverThreshold =
Monitored::Scalar<int>(
"sctModulesOverThreshold", sctModulesOverThreshold);
200 monitoredVariables.emplace_back(mon_sctModulesOverThreshold);
203 ATH_CHECK(spacePointHandle.
record(std::move(spacePoints), std::move(spacePointsAux)));
205 return StatusCode::SUCCESS;