@@ -1300,45 +1300,45 @@ struct ZdcQVectors {
13001300 cal.lastRunNumber = runnumber;
13011301 return ;
13021302 }
1303- // vector of 4
1304- corrQxA.clear ();
1305- corrQyA.clear ();
1306- corrQxC.clear ();
1307- corrQyC.clear ();
1303+ // vector of 4
1304+ corrQxA.clear ();
1305+ corrQyA.clear ();
1306+ corrQxC.clear ();
1307+ corrQyC.clear ();
13081308
1309- if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1310- fillCommonRegistry<kAfter >(qXaShift, qYaShift, qXcShift, qYcShift, cal.v , cent, rsTimestamp);
1309+ if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1310+ fillCommonRegistry<kAfter >(qXaShift, qYaShift, qXcShift, qYcShift, cal.v , cent, rsTimestamp);
1311+ }
1312+
1313+ for (int it = 1 ; it <= cfgNIterationsAfterShift; it++) {
1314+ corrQxA.push_back (getCorrection<THnSparse, kRecShift >(names[0 ][0 ].Data (), it, 1 ));
1315+ corrQyA.push_back (getCorrection<THnSparse, kRecShift >(names[0 ][1 ].Data (), it, 1 ));
1316+ corrQxC.push_back (getCorrection<THnSparse, kRecShift >(names[0 ][2 ].Data (), it, 1 ));
1317+ corrQyC.push_back (getCorrection<THnSparse, kRecShift >(names[0 ][3 ].Data (), it, 1 ));
1318+
1319+ if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1320+ registry.get <TH2 >(HIST (" recentering/QXA_vs_iteration" ))->Fill (pb + 1 , qXaShift - std::accumulate (corrQxA.begin (), corrQxA.end (), 0.0 ));
1321+ registry.get <TH2 >(HIST (" recentering/QYA_vs_iteration" ))->Fill (pb + 1 , qYaShift - std::accumulate (corrQyA.begin (), corrQyA.end (), 0.0 ));
1322+ registry.get <TH2 >(HIST (" recentering/QXC_vs_iteration" ))->Fill (pb + 1 , qXcShift - std::accumulate (corrQxC.begin (), corrQxC.end (), 0.0 ));
1323+ registry.get <TH2 >(HIST (" recentering/QYC_vs_iteration" ))->Fill (pb + 1 , qYcShift - std::accumulate (corrQyC.begin (), corrQyC.end (), 0.0 ));
13111324 }
1325+ pb++;
13121326
1313- for (int it = 1 ; it <= cfgNIterationsAfterShift; it ++) {
1314- corrQxA.push_back (getCorrection<THnSparse , kRecShift >(names[0 ][0 ].Data (), it, 1 ));
1315- corrQyA.push_back (getCorrection<THnSparse , kRecShift >(names[0 ][1 ].Data (), it, 1 ));
1316- corrQxC.push_back (getCorrection<THnSparse , kRecShift >(names[0 ][2 ].Data (), it, 1 ));
1317- corrQyC.push_back (getCorrection<THnSparse , kRecShift >(names[0 ][3 ].Data (), it, 1 ));
1327+ for (int step = 2 ; step <= nSteps; step ++) {
1328+ corrQxA.push_back (getCorrection<TProfile , kRecShift >(names[step - 1 ][0 ].Data (), it, step ));
1329+ corrQyA.push_back (getCorrection<TProfile , kRecShift >(names[step - 1 ][1 ].Data (), it, step ));
1330+ corrQxC.push_back (getCorrection<TProfile , kRecShift >(names[step - 1 ][2 ].Data (), it, step ));
1331+ corrQyC.push_back (getCorrection<TProfile , kRecShift >(names[step - 1 ][3 ].Data (), it, step ));
13181332
13191333 if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1320- registry.get <TH2 >(HIST (" recentering/QXA_vs_iteration" ))->Fill (pb + 1 , qXaShift - std::accumulate (corrQxA.begin (), corrQxA.end (), 0.0 ));
1321- registry.get <TH2 >(HIST (" recentering/QYA_vs_iteration" ))->Fill (pb + 1 , qYaShift - std::accumulate (corrQyA.begin (), corrQyA.end (), 0.0 ));
1322- registry.get <TH2 >(HIST (" recentering/QXC_vs_iteration" ))->Fill (pb + 1 , qXcShift - std::accumulate (corrQxC.begin (), corrQxC.end (), 0.0 ));
1323- registry.get <TH2 >(HIST (" recentering/QYC_vs_iteration" ))->Fill (pb + 1 , qYcShift - std::accumulate (corrQyC.begin (), corrQyC.end (), 0.0 ));
1334+ registry.get <TH2 >(HIST (" recentering/QXA_vs_iteration" ))->Fill (pb + 1 , q[ 0 ] - std::accumulate (corrQxA.begin (), corrQxA.end (), 0.0 ));
1335+ registry.get <TH2 >(HIST (" recentering/QYA_vs_iteration" ))->Fill (pb + 1 , q[ 1 ] - std::accumulate (corrQyA.begin (), corrQyA.end (), 0.0 ));
1336+ registry.get <TH2 >(HIST (" recentering/QXC_vs_iteration" ))->Fill (pb + 1 , q[ 2 ] - std::accumulate (corrQxC.begin (), corrQxC.end (), 0.0 ));
1337+ registry.get <TH2 >(HIST (" recentering/QYC_vs_iteration" ))->Fill (pb + 1 , q[ 3 ] - std::accumulate (corrQyC.begin (), corrQyC.end (), 0.0 ));
13241338 }
1325- pb++;
1326-
1327- for (int step = 2 ; step <= nSteps; step++) {
1328- corrQxA.push_back (getCorrection<TProfile, kRecShift >(names[step - 1 ][0 ].Data (), it, step));
1329- corrQyA.push_back (getCorrection<TProfile, kRecShift >(names[step - 1 ][1 ].Data (), it, step));
1330- corrQxC.push_back (getCorrection<TProfile, kRecShift >(names[step - 1 ][2 ].Data (), it, step));
1331- corrQyC.push_back (getCorrection<TProfile, kRecShift >(names[step - 1 ][3 ].Data (), it, step));
13321339
1333- if (cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1334- registry.get <TH2 >(HIST (" recentering/QXA_vs_iteration" ))->Fill (pb + 1 , q[0 ] - std::accumulate (corrQxA.begin (), corrQxA.end (), 0.0 ));
1335- registry.get <TH2 >(HIST (" recentering/QYA_vs_iteration" ))->Fill (pb + 1 , q[1 ] - std::accumulate (corrQyA.begin (), corrQyA.end (), 0.0 ));
1336- registry.get <TH2 >(HIST (" recentering/QXC_vs_iteration" ))->Fill (pb + 1 , q[2 ] - std::accumulate (corrQxC.begin (), corrQxC.end (), 0.0 ));
1337- registry.get <TH2 >(HIST (" recentering/QYC_vs_iteration" ))->Fill (pb + 1 , q[3 ] - std::accumulate (corrQyC.begin (), corrQyC.end (), 0.0 ));
1338- }
1339-
1340- pb++;
1341- }
1340+ pb++;
1341+ }
13421342
13431343 double totalCorrectionQxAshift = std::accumulate (corrQxA.begin (), corrQxA.end (), 0.0 );
13441344 double totalCorrectionQyAshift = std::accumulate (corrQyA.begin (), corrQyA.end (), 0.0 );
0 commit comments