Skip to content

Commit 3270f58

Browse files
committed
eventSelectionQa.cxx
1 parent 553e3e7 commit 3270f58

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

DPG/Tasks/AOTEvent/eventSelectionQa.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,17 @@ struct EventSelectionQaTask {
448448
float multV0A = 0;
449449
float multV0C = 0;
450450
if (bc.has_fv0a()) {
451-
for (unsigned int i = 0; i < bc.fv0a().amplitude().size(); ++i) {
451+
auto fv0a = bc.fv0a();
452+
for (unsigned int i = 0; i < fv0a.amplitude().size(); ++i) {
452453
int ring = bc.fv0a().channel()[i] / 8;
453454
multRingV0A[ring] += bc.fv0a().amplitude()[i];
454455
multV0A += bc.fv0a().amplitude()[i];
455456
}
456457
}
457458

458459
if (bc.has_fv0c()) {
459-
for (unsigned int i = 0; i < bc.fv0c().amplitude().size(); ++i) {
460+
auto fv0c = bc.fv0c();
461+
for (unsigned int i = 0; i < fv0c.amplitude().size(); ++i) {
460462
int ring = bc.fv0c().channel()[i] / 8;
461463
multRingV0C[ring] += bc.fv0c().amplitude()[i];
462464
multV0C += bc.fv0c().amplitude()[i];
@@ -847,7 +849,8 @@ struct EventSelectionQaTask {
847849
histos.fill(HIST("hOrbitFV0"), orbit - orbitSOR);
848850
histos.fill(HIST("hBcFV0"), localBC);
849851
float multV0A = 0;
850-
for (const auto& amplitude : bc.fv0a().amplitude()) {
852+
auto fv0a = bc.fv0a();
853+
for (const auto& amplitude : fv0a.amplitude()) {
851854
multV0A += amplitude;
852855
}
853856
histos.fill(HIST("hMultV0Aall"), multV0A);
@@ -1079,7 +1082,8 @@ struct EventSelectionQaTask {
10791082
// FV0
10801083
float multV0A = 0;
10811084
if (foundBC.has_fv0a()) {
1082-
for (const auto& amplitude : foundBC.fv0a().amplitude()) {
1085+
auto fv0a = foundBC.fv0a();
1086+
for (const auto& amplitude : fv0a.amplitude()) {
10831087
multV0A += amplitude;
10841088
}
10851089
}

0 commit comments

Comments
 (0)