47 if ( eventInfo.isValid() ) {
56 std::vector<int> bitVec = {};
57 std::vector<int> filledVec = {};
58 std::vector<int> emptyVec = {};
59 std::vector<int> unpairIsoVec = {};
60 std::vector<int> unpairNonIsoVec = {};
65 if ( !(bgWord & 1<<bkg) ) {
69 bitVec.push_back(bkg);
71 filledVec.push_back(bkg);
73 emptyVec.push_back(bkg);
74 }
else if (unpairIso) {
75 unpairIsoVec.push_back(bkg);
76 }
else if (unpairNonIso) {
77 unpairNonIsoVec.push_back(bkg);
82 auto bitSetFilled =
Collection(
"bitSetFilled",filledVec);
83 auto bitSetEmpty =
Collection(
"bitSetEmpty",emptyVec);
84 auto bitSetUnpairIso =
Collection(
"bitSetUnpairIso",unpairIsoVec);
85 auto bitSetUnpairNonIso =
Collection(
"bitSetUnpairNonIso",unpairNonIsoVec);
86 fill(
group,bitSet,bitSetFilled,bitSetEmpty,bitSetUnpairIso,bitSetUnpairNonIso);
88 ATH_MSG_WARNING(
"Event data invalid. Background word histograms are being skipped.");
93 if (sctSP.isValid() and pixSP.isValid()) {
95 std::for_each(sctSP->begin(),sctSP->end(),[&nSctSPs](
const auto coll){if (coll) nSctSPs+=coll->size();});
98 std::for_each(pixSP->begin(),pixSP->end(),[&nPixSPs](
const auto coll){if (coll) nPixSPs+=coll->size();});
100 fill(
group,nPixSPs,nSctSPs,unpairIso,unpairNonIso);
102 fill(
"lowMultiplicityPixGroup",nPixSPs,unpairIso,unpairNonIso);
105 fill(
"lowMultiplicitySctGroup",nSctSPs,unpairIso,unpairNonIso);
108 ATH_MSG_WARNING(
"Pixe/SCT Spacepoint data invalid. nPix/nSct is being skipped.");
126 ATH_MSG_WARNING(
"MBTSCollisionTime data invalid. MBTStimeDiff is being skipped.");
129 if ( tileCellContainer.
isValid() ) {
131 for (
auto tileCell : *tileCellContainer ) {
139 ATH_MSG_WARNING(
"TileCell data invalid. MBTSvetoHits is being skipped.");
153 if (beamBackgroundData.
isValid() ) {
155 std::vector<double> muSegXVec = {};
156 std::vector<double> muSegYVec = {};
157 for (
int iSeg=0; iSeg<beamBackgroundData->
GetNumSegment(); iSeg++) {
161 muSegXVec.push_back(muonSeg->
x()*1
e-3);
162 muSegYVec.push_back(muonSeg->
y()*1
e-3);
165 auto muSegXCollection =
Collection(
"muonSegmentX",muSegXVec);
166 auto muSegYCollection =
Collection(
"muonSegmentY",muSegYVec);
168 std::vector<double> clusterEnergyVec = {};
169 std::vector<double> clusterEtaVec = {};
170 std::vector<double> clusterPhiVec = {};
171 std::vector<double> clusterTimeVec = {};
174 clusterEnergyVec.push_back(cluster->
e()*1
e-3);
175 clusterEtaVec.push_back(cluster->
eta());
176 clusterPhiVec.push_back(cluster->
phi());
177 clusterTimeVec.push_back(cluster->
time());
179 auto clusterEnergyCollection =
Collection(
"clusterEnergy",clusterEnergyVec);
180 auto clusterEtaCollection =
Collection(
"clusterEta",clusterEtaVec);
181 auto clusterPhiCollection =
Collection(
"clusterPhi",clusterPhiVec);
182 auto clusterTimeCollection =
Collection(
"clusterTime",clusterTimeVec);
184 fill(
group,muSegXCollection,muSegYCollection,clusterEnergyCollection,
185 clusterEtaCollection,clusterPhiCollection,clusterTimeCollection);
189 std::vector<int> jetIndexVec = {};
193 jetIndexVec.push_back(jetIndex);
205 std::vector<float> sumPt_v;
207 bool hasSumPt =
jet->getAttribute<std::vector<float>>(trkPtAttr, sumPt_v);
208 double sumPtTrk = hasSumPt ? sumPt_v[0] : 0.;
214 auto jetIndexCollection =
Collection(
"jetIndex",jetIndexVec);
220 auto isACOneSided =
Scalar<bool>(
"isACOneSided", isAC && isOneSided );
221 auto isCAOneSided =
Scalar<bool>(
"isCAOneSided", isCA && isOneSided );
222 fill(
group,jetIndexCollection,
bcid,isAC,isCA,isACOneSided,isCAOneSided);
225 ATH_MSG_WARNING(
"BeamBackgroundData data invalid. Muons are being skipped.");
229 if (vertexContainer.
isValid()) {
232 fill(
group,nVertex,unpairIso,unpairNonIso);
234 ATH_MSG_DEBUG(
"Primary vertex data invalid. Primary vertex counts are being skipped.");
236 return StatusCode::SUCCESS;