Skip to content

Commit 0f9e952

Browse files
committed
Change shifted vertex to cal.v
1 parent 4be1934 commit 0f9e952

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

PWGCF/Flow/TableProducer/zdcQVectors.cxx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ struct ZdcQVectors {
186186
kEnergyCal,
187187
kMeanv,
188188
kRec,
189-
kTimestamp
189+
kTimestamp,
190+
nCalibModes
190191
};
191192

192193
// Define output
@@ -843,7 +844,7 @@ struct ZdcQVectors {
843844

844845
if (!foundBC.has_zdc()) {
845846
cal.isSelected = false;
846-
spTableZDC(runnumber, cents, v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, 0);
847+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, 0);
847848
cal.lastRunNumber = runnumber;
848849
return;
849850
}
@@ -882,7 +883,7 @@ struct ZdcQVectors {
882883
// if ZNA or ZNC not hit correctly.. do not use event in q-vector calculation
883884
if (!isZNAhit || !isZNChit) {
884885
cal.isSelected = false;
885-
spTableZDC(runnumber, cents, v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, 0);
886+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, 0);
886887
cal.lastRunNumber = runnumber;
887888
return;
888889
}
@@ -898,25 +899,25 @@ struct ZdcQVectors {
898899
if (cent < EvSel.cfgCentMin || cent > EvSel.cfgCentMax || std::abs(collision.posZ()) > cfgVtxZ || !collision.sel8()) {
899900
// event not selected
900901
cal.isSelected = false;
901-
spTableZDC(runnumber, cents, v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, eventSelectionFlags);
902+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), 0, 0, 0, 0, cal.isSelected, eventSelectionFlags);
902903
cal.lastRunNumber = runnumber;
903904
return;
904905
}
905906
registry.fill(HIST("hEventCount"), evSel_CentCuts);
906907

907908
// load new calibrations for new runs only
908909
if (runnumber != cal.lastRunNumber) {
909-
cal.calibfilesLoaded[0] = false;
910-
cal.calibList[0] = nullptr;
910+
cal.calibfilesLoaded[kEnergyCal] = false;
911+
cal.calibList[kEnergyCal] = nullptr;
911912

912-
cal.calibfilesLoaded[1] = false;
913-
cal.calibList[1] = nullptr;
913+
cal.calibfilesLoaded[kMeanv] = false;
914+
cal.calibList[kMeanv] = nullptr;
914915

915-
cal.calibfilesLoaded[2] = false;
916-
cal.calibList[2] = nullptr;
916+
cal.calibfilesLoaded[kRec] = false;
917+
cal.calibList[kRec] = nullptr;
917918

918-
cal.calibfilesLoaded[3] = false;
919-
cal.calibList[3] = nullptr;
919+
cal.calibfilesLoaded[kTimestamp] = false;
920+
cal.calibList[kTimestamp] = nullptr;
920921

921922
cal.isShiftProfileFound = false;
922923
cal.shiftprofileC = nullptr;
@@ -1043,8 +1044,8 @@ struct ZdcQVectors {
10431044
}
10441045

10451046
if (cal.calibfilesLoaded[1]) {
1046-
v[0] = v[0] - getCorrection<TProfile, kMeanv>(vnames[0].Data());
1047-
v[1] = v[1] - getCorrection<TProfile, kMeanv>(vnames[1].Data());
1047+
cal.v[0] = v[0] - getCorrection<TProfile, kMeanv>(vnames[0].Data());
1048+
cal.v[1] = v[1] - getCorrection<TProfile, kMeanv>(vnames[1].Data());
10481049
} else {
10491050
LOGF(warning, " --> No mean V found.. -> THis wil lead to wrong axis for vx, vy (will be created in vmean/)");
10501051
return;
@@ -1060,14 +1061,14 @@ struct ZdcQVectors {
10601061

10611062
if (cal.atIteration == 0) {
10621063
if (cal.isSelected && cfgFillHistRegistry && isEventSelected)
1063-
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], v, cent, rsTimestamp);
1064+
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], cal.v, cent, rsTimestamp);
10641065

1065-
spTableZDC(runnumber, cents, v, foundBC.timestamp(), q[0], q[1], q[2], q[3], cal.isSelected, eventSelectionFlags);
1066+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), q[0], q[1], q[2], q[3], cal.isSelected, eventSelectionFlags);
10661067
cal.lastRunNumber = runnumber;
10671068
return;
10681069
} else {
10691070
if (cfgFillHistRegistry && isEventSelected)
1070-
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], v, cent, rsTimestamp);
1071+
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], cal.v, cent, rsTimestamp);
10711072

10721073
// vector of 4
10731074
std::vector<double> corrQxA;
@@ -1222,15 +1223,15 @@ struct ZdcQVectors {
12221223
double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift);
12231224

12241225
if (cal.isSelected && cfgFillHistRegistry && !cfgFillNothing && isEventSelected) {
1225-
fillCommonRegistry<kAfter>(qXaShift, qYaShift, qXcShift, qYcShift, v, cent, rsTimestamp);
1226+
fillCommonRegistry<kAfter>(qXaShift, qYaShift, qXcShift, qYcShift, cal.v, cent, rsTimestamp);
12261227
registry.fill(HIST("QA/centrality_after"), cent);
12271228
registry.get<TProfile>(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift);
12281229
registry.get<TProfile>(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift);
12291230
registry.get<TProfile>(HIST("QA/after/ZNC_Qx"))->Fill(Form("%d", runnumber), qXcShift);
12301231
registry.get<TProfile>(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qYcShift);
12311232
}
12321233

1233-
spTableZDC(runnumber, cents, v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags);
1234+
spTableZDC(runnumber, cents, cal.v, foundBC.timestamp(), qXaShift, qYaShift, qXcShift, qYcShift, cal.isSelected, eventSelectionFlags);
12341235
qRec = {0, 0, 0, 0};
12351236

12361237
cal.lastRunNumber = runnumber;

0 commit comments

Comments
 (0)