Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions PWGCF/Flow/TableProducer/zdcQVectors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

struct : ConfigurableGroup {
Configurable<bool> cfgEvtUseRCTFlagChecker{"cfgEvtUseRCTFlagChecker", false, "Evt sel: use RCT flag checker"};
Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label (CBT, CBT_hadronPID)"}; //all Labels can be found in Common/CCDB/RCTSelectionFlags.h
Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label (CBT, CBT_hadronPID)"}; // all Labels can be found in Common/CCDB/RCTSelectionFlags.h
Configurable<bool> cfgEvtRCTFlagCheckerZDCCheck{"cfgEvtRCTFlagCheckerZDCCheck", false, "Evt sel: RCT flag checker ZDC check"};
Configurable<bool> cfgEvtRCTFlagCheckerLimitAcceptAsBad{"cfgEvtRCTFlagCheckerLimitAcceptAsBad", false, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"};
} rctFlags;
Expand Down Expand Up @@ -161,7 +161,7 @@

enum SelectionCriteria {
evSel_FilteredEvent,
evSel_RCTFlagsZDC,
evSel_RCTFlagsZDC,
evSel_Zvtx,
evSel_sel8,
evSel_occupancy,
Expand Down Expand Up @@ -255,8 +255,8 @@
registry.add<TProfile>("QA/ZNA_Energy", "ZNA_Energy", kTProfile, {{8, 0, 8}});
registry.add<TProfile>("QA/ZNC_Energy", "ZNC_Energy", kTProfile, {{8, 0, 8}});

registry.add<TProfile3D>("QA/ShiftZDCC", "ShiftZDCC", kTProfile3D, {{100,0,100}, {2,0,2}, {10,0,10}});
registry.add<TProfile3D>("QA/ShiftZDCA", "ShiftZDCA", kTProfile3D, {{100,0,100}, {2,0,2}, {10,0,10}});
registry.add<TProfile3D>("QA/ShiftZDCC", "ShiftZDCC", kTProfile3D, {{100, 0, 100}, {2, 0, 2}, {10, 0, 10}});
registry.add<TProfile3D>("QA/ShiftZDCA", "ShiftZDCA", kTProfile3D, {{100, 0, 100}, {2, 0, 2}, {10, 0, 10}});
registry.add<TH1>("QA/psiZDCA", "psiZDCA", kTH1D, {{100, -4, 4}});
registry.add<TH1>("QA/psiZDCA_shift", "psiZDCA_shift", kTH1D, {{100, -4, 4}});
registry.add<TH1>("QA/psiZDCC", "psiZDCC", kTH1D, {{100, -4, 4}});
Expand Down Expand Up @@ -854,7 +854,7 @@
spTableZDC(runnumber, centrality, v[0], v[1], v[2], q[0], q[1], q[2], q[3], isSelected, 0, 0);
counter++;
lastRunNumber = runnumber;
return;
return;
} else {
if (cfgFillCommonRegistry)
fillCommonRegistry<kBefore>(q[0], q[1], q[2], q[3], v, centrality);
Expand Down Expand Up @@ -907,69 +907,69 @@
registry.get<TProfile>(HIST("QA/after/ZNC_Qy"))->Fill(Form("%d", runnumber), qRec[3]);
}

// do shift for psi.
double psiZDCA = 1.0 * std::atan2(qRec[1], qRec[0]);
double psiZDCC = 1.0 * std::atan2(qRec[3], qRec[2]);
// do shift for psi.
double psiZDCA = 1.0 * std::atan2(qRec[1], qRec[0]);
double psiZDCC = 1.0 * std::atan2(qRec[3], qRec[2]);

int nshift = 10; // no. of iterations
int nshift = 10; // no. of iterations

if(cfgFillCommonRegistry) {
for (int ishift = 1; ishift <= nshift; ishift++) {
registry.fill(HIST("QA/ShiftZDCC"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 1.0 * psiZDCC));
registry.fill(HIST("QA/ShiftZDCC"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 1.0 * psiZDCC));
registry.fill(HIST("QA/ShiftZDCA"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 1.0 * psiZDCA));
registry.fill(HIST("QA/ShiftZDCA"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 1.0 * psiZDCA));
if (cfgFillCommonRegistry) {
for (int ishift = 1; ishift <= nshift; ishift++) {
registry.fill(HIST("QA/ShiftZDCC"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 1.0 * psiZDCC));

Check failure on line 918 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
registry.fill(HIST("QA/ShiftZDCC"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 1.0 * psiZDCC));

Check failure on line 919 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
registry.fill(HIST("QA/ShiftZDCA"), centrality, 0.5, ishift - 0.5, TMath::Sin(ishift * 1.0 * psiZDCA));

Check failure on line 920 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
registry.fill(HIST("QA/ShiftZDCA"), centrality, 1.5, ishift - 0.5, TMath::Cos(ishift * 1.0 * psiZDCA));

Check failure on line 921 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}
}
}

double psiZDCAshift = psiZDCA;
double psiZDCCshift = psiZDCC;
double psiZDCAshift = psiZDCA;
double psiZDCCshift = psiZDCC;

double deltaPsiZDCA = 0;
double deltaPsiZDCC = 0;

if (cfgUseShift && !cfgCCDBdir_Shift.value.empty()) {
if (lastRunNumber != runnumber) {
TList* hcorrList = ccdb->getForTimeStamp<TList>(cfgCCDBdir_Shift.value, foundBC.timestamp());
shiftprofileC = reinterpret_cast<TProfile3D*>(hcorrList->FindObject("ShiftZDCC"));
shiftprofileA = reinterpret_cast<TProfile3D*>(hcorrList->FindObject("ShiftZDCA"));
}

double deltaPsiZDCA = 0;
double deltaPsiZDCC = 0;
auto deltaPsiZDCC = 0.0;
auto deltaPsiZDCA = 0.0;

if (cfgUseShift && !cfgCCDBdir_Shift.value.empty()) {
if(lastRunNumber != runnumber){
TList* hcorrList = ccdb->getForTimeStamp<TList>(cfgCCDBdir_Shift.value, foundBC.timestamp());
shiftprofileC = reinterpret_cast<TProfile3D*>(hcorrList->FindObject("ShiftZDCC"));
shiftprofileA = reinterpret_cast<TProfile3D*>(hcorrList->FindObject("ShiftZDCA"));
for (int ishift = 1; ishift <= nshift; ishift++) {
auto coeffshiftxZDCC = shiftprofileC->GetBinContent(shiftprofileC->FindBin(centrality, 0.5, ishift - 0.5));
auto coeffshiftyZDCC = shiftprofileC->GetBinContent(shiftprofileC->FindBin(centrality, 1.5, ishift - 0.5));
auto coeffshiftxZDCA = shiftprofileA->GetBinContent(shiftprofileA->FindBin(centrality, 0.5, ishift - 0.5));
auto coeffshiftyZDCA = shiftprofileA->GetBinContent(shiftprofileA->FindBin(centrality, 1.5, ishift - 0.5));
deltaPsiZDCC += deltaPsiZDCC + ((2 / (1.0 * ishift)) * (-coeffshiftxZDCC * TMath::Cos(ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * TMath::Sin(ishift * 1.0 * psiZDCC)));

Check failure on line 946 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
deltaPsiZDCA += deltaPsiZDCA + ((2 / (1.0 * ishift)) * (-coeffshiftxZDCA * TMath::Cos(ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * TMath::Sin(ishift * 1.0 * psiZDCA)));

Check failure on line 947 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}
}

auto deltaPsiZDCC = 0.0;
auto deltaPsiZDCA = 0.0;
psiZDCCshift += deltaPsiZDCC;
psiZDCAshift += deltaPsiZDCA;

for (int ishift = 1; ishift <= nshift; ishift++) {
auto coeffshiftxZDCC = shiftprofileC->GetBinContent(shiftprofileC->FindBin(centrality, 0.5, ishift - 0.5));
auto coeffshiftyZDCC = shiftprofileC->GetBinContent(shiftprofileC->FindBin(centrality, 1.5, ishift - 0.5));
auto coeffshiftxZDCA = shiftprofileA->GetBinContent(shiftprofileA->FindBin(centrality, 0.5, ishift - 0.5));
auto coeffshiftyZDCA = shiftprofileA->GetBinContent(shiftprofileA->FindBin(centrality, 1.5, ishift - 0.5));
deltaPsiZDCC += deltaPsiZDCC + ((2 / (1.0 * ishift)) * (-coeffshiftxZDCC * TMath::Cos(ishift * 1.0 * psiZDCC) + coeffshiftyZDCC * TMath::Sin(ishift * 1.0 * psiZDCC)));
deltaPsiZDCA += deltaPsiZDCA + ((2 / (1.0 * ishift)) * (-coeffshiftxZDCA * TMath::Cos(ishift * 1.0 * psiZDCA) + coeffshiftyZDCA * TMath::Sin(ishift * 1.0 * psiZDCA)));
if (cfgFillCommonRegistry) {
registry.fill(HIST("QA/psiZDCA"), psiZDCAshift);
registry.fill(HIST("QA/psiZDCC"), psiZDCCshift);
registry.fill(HIST("QA/psiZDCA_shift"), psiZDCAshift);
registry.fill(HIST("QA/psiZDCC_shift"), psiZDCCshift);
}
}

psiZDCCshift += deltaPsiZDCC;
psiZDCAshift += deltaPsiZDCA;

if(cfgFillCommonRegistry) {
registry.fill(HIST("QA/psiZDCA"), psiZDCAshift);
registry.fill(HIST("QA/psiZDCC"), psiZDCCshift);
registry.fill(HIST("QA/psiZDCA_shift"), psiZDCAshift);
registry.fill(HIST("QA/psiZDCC_shift"), psiZDCCshift);
}

double qXaShift = std::hypot(qRec[1], qRec[0]) * TMath::Cos(psiZDCAshift);
double qYaShift = std::hypot(qRec[1], qRec[0]) * TMath::Sin(psiZDCAshift);
double qXcShift = std::hypot(qRec[2], qRec[3]) * TMath::Cos(psiZDCCshift);
double qYcShift = std::hypot(qRec[2], qRec[3]) * TMath::Sin(psiZDCCshift);
double qXaShift = std::hypot(qRec[1], qRec[0]) * TMath::Cos(psiZDCAshift);

Check failure on line 961 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
double qYaShift = std::hypot(qRec[1], qRec[0]) * TMath::Sin(psiZDCAshift);

Check failure on line 962 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
double qXcShift = std::hypot(qRec[2], qRec[3]) * TMath::Cos(psiZDCCshift);

Check failure on line 963 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
double qYcShift = std::hypot(qRec[2], qRec[3]) * TMath::Sin(psiZDCCshift);

Check failure on line 964 in PWGCF/Flow/TableProducer/zdcQVectors.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

spTableZDC(runnumber, centrality, v[0], v[1], v[2], qXaShift, qYaShift, qXcShift, qYcShift, isSelected, cal.atIteration, cal.atStep);
spTableZDC(runnumber, centrality, v[0], v[1], v[2], qXaShift, qYaShift, qXcShift, qYcShift, isSelected, cal.atIteration, cal.atStep);

qRec.clear();
qRec.clear();

counter++;
lastRunNumber = runnumber;
return;
counter++;
lastRunNumber = runnumber;
return;
}
LOGF(warning, "We return without saving table... -> THis is a problem");
lastRunNumber = runnumber;
Expand Down
Loading
Loading