Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGLF] added histograms for recentering Vx and Vy and commented out few lines of code #9087

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
27 changes: 24 additions & 3 deletions PWGLF/TableProducer/Common/spvector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,20 @@
Configurable<bool> refsys{"refsys", true, "flag to use own reference system"};
Configurable<bool> followpub{"followpub", true, "flag to use alphaZDC"};
Configurable<bool> useGainCallib{"useGainCallib", false, "use gain calibration"};
Configurable<bool> useCallibvertex{"useCallibvertex", false, "use calibration for vxy"};
Configurable<bool> useRecentereSp{"useRecentereSp", false, "use Recentering with Sparse or THn"};
Configurable<bool> useRecenterefineSp{"useRecenterefineSp", false, "use fine Recentering with Sparse or THn"};
Configurable<bool> useRecenteresqSp{"useRecenteresqSp", false, "use Recenteringsq with Sparse or THn"};
Configurable<bool> recwitherror{"recwitherror", false, "use Recentering with error"};
Configurable<bool> recfinewitherror{"recfinewitherror", false, "use Recentering fine with error"};
Configurable<std::string> ConfGainPath{"ConfGainPath", "Users/p/prottay/My/Object/NewPbPbpass4_10092024/gaincallib", "Path to gain calibration"};
Configurable<std::string> ConfGainPathvxy{"ConfGainPathvxy", "Users/p/prottay/My/Object/swapcoords/PbPbpass4_20112024/recentervert", "Path to gain calibration for vxy"};
Configurable<std::string> ConfRecentereSp{"ConfRecentereSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for recentere"};
Configurable<std::string> ConfRecenterecentSp{"ConfRecenterecentSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for cent recentere"};
/*Configurable<std::string> ConfRecenterecentSp{"ConfRecenterecentSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for cent recentere"};
Configurable<std::string> ConfRecenterevxSp{"ConfRecenterevxSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for vx recentere"};
Configurable<std::string> ConfRecenterevySp{"ConfRecenterevySp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for vy recentere"};
Configurable<std::string> ConfRecenterevzSp{"ConfRecenterevzSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for vz recentere"};
Configurable<std::string> ConfRecenteresqSp{"ConfRecenteresqSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for recenteresq"};
Configurable<std::string> ConfRecenteresqSp{"ConfRecenteresqSp", "Users/p/prottay/My/Object/Testingwithsparse/NewPbPbpass4_17092024/recenter", "Sparse or THn Path for recenteresq"};*/
Configurable<std::string> ConfShiftC{"ConfShiftC", "Users/p/prottay/My/Object/Testinglocaltree/shiftcallib2", "Path to shift C"};
Configurable<std::string> ConfShiftA{"ConfShiftA", "Users/p/prottay/My/Object/Testinglocaltree/shiftcallib2", "Path to shift A"};

Expand Down Expand Up @@ -203,6 +205,7 @@
AxisSpec centfineAxis = {CentfineNbins, lfinebinCent, hfinebinCent, "V0M (%) fine"};
AxisSpec shiftAxis = {10, 0, 10, "shift"};
AxisSpec basisAxis = {2, 0, 2, "basis"};
AxisSpec VxyAxis = {1, 0, 1, "Vxy"};

histos.add("hCentrality", "hCentrality", kTH1F, {{centfineAxis}});
histos.add("hpQxZDCAC", "hpQxZDCAC", kTProfile, {centfineAxis});
Expand Down Expand Up @@ -254,6 +257,8 @@
// histos.add("ZDCAmpCommon", "ZDCAmpCommon", kTProfile3D, {{2,0.0,2.0}, vzfineAxis, centfineAxis});
histos.add("ShiftZDCC", "ShiftZDCC", kTProfile3D, {centfineAxis, basisAxis, shiftAxis});
histos.add("ShiftZDCA", "ShiftZDCA", kTProfile3D, {centfineAxis, basisAxis, shiftAxis});
histos.add("AvgVx", "AvgVx", kTProfile, {VxyAxis});
histos.add("AvgVy", "AvgVy", kTProfile, {VxyAxis});

if (QA) {
histos.add("Vz", "Vz", kTH1F, {vzfineAxis});
Expand Down Expand Up @@ -285,6 +290,7 @@
int lastRunNumber = -999;
// TH3D* gainprofile;
TH2D* gainprofile;
TH1F* gainprofilevxy;
THnF* hrecentereSp;
TH2F* hrecenterecentSp;
TH2F* hrecenterevxSp;
Expand Down Expand Up @@ -359,7 +365,7 @@
return;
}

if (collision.sel8() && centrality > cfgCutCentralityMin && centrality < cfgCutCentralityMax && TMath::Abs(vz) < cfgCutVertex && collision.has_foundFT0() && eventSelected(collision, centrality) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {

Check warning on line 368 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = true;
if (useGainCallib && (currentRunNumber != lastRunNumber)) {
// gainprofile = ccdb->getForTimeStamp<TH3D>(ConfGainPath.value, bc.timestamp());
Expand Down Expand Up @@ -396,7 +402,7 @@
} else {
double ampl = gainequal * znaEnergy[iChA];
if (followpub) {
ampl = TMath::Power(ampl, alphaZDC);

Check warning on line 405 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
}
qxZDCA = qxZDCA - ampl * x[iChA];
qyZDCA = qyZDCA + ampl * y[iChA];
Expand All @@ -412,7 +418,7 @@
} else {
double ampl = gainequal * zncEnergy[iChA - 4];
if (followpub) {
ampl = TMath::Power(ampl, alphaZDC);

Check warning on line 421 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
}
qxZDCC = qxZDCC + ampl * x[iChA - 4];
qyZDCC = qyZDCC + ampl * y[iChA - 4];
Expand Down Expand Up @@ -446,9 +452,22 @@
histos.fill(HIST("hCentrality"), centrality);
histos.fill(HIST("Vz"), vz);

histos.fill(HIST("AvgVx"), 0.5, vx);
histos.fill(HIST("AvgVy"), 0.5, vy);

if (useCallibvertex && (currentRunNumber != lastRunNumber)) {
gainprofilevxy = ccdb->getForTimeStamp<TH1F>(ConfGainPathvxy.value, bc.timestamp());
}

if (useCallibvertex) {
vx = vx - gainprofilevxy->GetBinContent(1);
vy = vy - gainprofilevxy->GetBinContent(2);
}

if (useRecentereSp && (currentRunNumber != lastRunNumber)) {
hrecentereSp = ccdb->getForTimeStamp<THnF>(ConfRecentereSp.value, bc.timestamp());
}
/*
if (useRecenterefineSp && (currentRunNumber != lastRunNumber)) {
hrecenterecentSp = ccdb->getForTimeStamp<TH2F>(ConfRecenterecentSp.value, bc.timestamp());
hrecenterevxSp = ccdb->getForTimeStamp<TH2F>(ConfRecenterevxSp.value, bc.timestamp());
Expand All @@ -457,7 +476,7 @@
}
if (useRecenteresqSp && (currentRunNumber != lastRunNumber)) {
hrecenteresqSp = ccdb->getForTimeStamp<THnF>(ConfRecenteresqSp.value, bc.timestamp());
}
}*/

if (useRecentereSp && hrecentereSp) {

Expand Down Expand Up @@ -499,7 +518,7 @@
double meanyCerror = hrecentereSp->GetBinError(globalBinMeanyC);

if (rejbadevent) {
if ((TMath::Abs(meanxA) > 90000.0 || TMath::Abs(meanxC) > 90000.0 || TMath::Abs(meanyA) > 90000.0 || TMath::Abs(meanyC) > 90000.0) && (TMath::Abs(meanxAerror) > 9000.0 || TMath::Abs(meanxCerror) > 9000.0 || TMath::Abs(meanyAerror) > 9000.0 || TMath::Abs(meanyCerror) > 9000.0)) {

Check warning on line 521 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = false;
spcalibrationtable(triggerevent, currentRunNumber, centrality, vx, vy, vz, znaEnergycommon, zncEnergycommon, znaEnergy[0], znaEnergy[1], znaEnergy[2], znaEnergy[3], zncEnergy[0], zncEnergy[1], zncEnergy[2], zncEnergy[3], qxZDCA, qxZDCC, qyZDCA, qyZDCC, psiZDCC, psiZDCA);
return;
Expand Down Expand Up @@ -527,6 +546,7 @@
}
}

/*
if (useRecenterefineSp && hrecenterecentSp) {

double meanxAcent = hrecenterecentSp->GetBinContent(hrecenterecentSp->FindBin(centrality, 0.5));
Expand All @@ -540,7 +560,7 @@
double meanyCcenterror = hrecenterecentSp->GetBinError(hrecenterecentSp->FindBin(centrality, 3.5));

if (rejbadeventcent) {
if ((TMath::Abs(meanxAcent) > 90000.0 || TMath::Abs(meanxCcent) > 90000.0 || TMath::Abs(meanyAcent) > 90000.0 || TMath::Abs(meanyCcent) > 90000.0) && (TMath::Abs(meanxAcenterror) > 9000.0 || TMath::Abs(meanxCcenterror) > 9000.0 || TMath::Abs(meanyAcenterror) > 9000.0 || TMath::Abs(meanyCcenterror) > 9000.0)) {

Check warning on line 563 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = false;
spcalibrationtable(triggerevent, currentRunNumber, centrality, vx, vy, vz, znaEnergycommon, zncEnergycommon, znaEnergy[0], znaEnergy[1], znaEnergy[2], znaEnergy[3], zncEnergy[0], zncEnergy[1], zncEnergy[2], zncEnergy[3], qxZDCA, qxZDCC, qyZDCA, qyZDCC, psiZDCC, psiZDCA);
return;
Expand Down Expand Up @@ -573,7 +593,7 @@
double meanyCvxerror = hrecenterevxSp->GetBinError(hrecenterevxSp->FindBin(vx, 3.5));

if (rejbadeventvx) {
if ((TMath::Abs(meanxAvx) > 90000.0 || TMath::Abs(meanxCvx) > 90000.0 || TMath::Abs(meanyAvx) > 90000.0 || TMath::Abs(meanyCvx) > 90000.0) && (TMath::Abs(meanxAvxerror) > 9000.0 || TMath::Abs(meanxCvxerror) > 9000.0 || TMath::Abs(meanyAvxerror) > 9000.0 || TMath::Abs(meanyCvxerror) > 9000.0)) {

Check warning on line 596 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = false;
spcalibrationtable(triggerevent, currentRunNumber, centrality, vx, vy, vz, znaEnergycommon, zncEnergycommon, znaEnergy[0], znaEnergy[1], znaEnergy[2], znaEnergy[3], zncEnergy[0], zncEnergy[1], zncEnergy[2], zncEnergy[3], qxZDCA, qxZDCC, qyZDCA, qyZDCC, psiZDCC, psiZDCA);
return;
Expand Down Expand Up @@ -606,7 +626,7 @@
double meanyCvyerror = hrecenterevySp->GetBinError(hrecenterevySp->FindBin(vy, 3.5));

if (rejbadeventvy) {
if ((TMath::Abs(meanxAvy) > 90000.0 || TMath::Abs(meanxCvy) > 90000.0 || TMath::Abs(meanyAvy) > 90000.0 || TMath::Abs(meanyCvy) > 90000.0) && (TMath::Abs(meanxAvyerror) > 9000.0 || TMath::Abs(meanxCvyerror) > 9000.0 || TMath::Abs(meanyAvyerror) > 9000.0 || TMath::Abs(meanyCvyerror) > 9000.0)) {

Check warning on line 629 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = false;
spcalibrationtable(triggerevent, currentRunNumber, centrality, vx, vy, vz, znaEnergycommon, zncEnergycommon, znaEnergy[0], znaEnergy[1], znaEnergy[2], znaEnergy[3], zncEnergy[0], zncEnergy[1], zncEnergy[2], zncEnergy[3], qxZDCA, qxZDCC, qyZDCA, qyZDCC, psiZDCC, psiZDCA);
return;
Expand Down Expand Up @@ -639,7 +659,7 @@
double meanyCvzerror = hrecenterevzSp->GetBinError(hrecenterevzSp->FindBin(vz, 3.5));

if (rejbadeventvz) {
if ((TMath::Abs(meanxAvz) > 90000.0 || TMath::Abs(meanxCvz) > 90000.0 || TMath::Abs(meanyAvz) > 90000.0 || TMath::Abs(meanyCvz) > 90000.0) && (TMath::Abs(meanxAvzerror) > 9000.0 || TMath::Abs(meanxCvzerror) > 9000.0 || TMath::Abs(meanyAvzerror) > 9000.0 || TMath::Abs(meanyCvzerror) > 9000.0)) {

Check warning on line 662 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
triggerevent = false;
spcalibrationtable(triggerevent, currentRunNumber, centrality, vx, vy, vz, znaEnergycommon, zncEnergycommon, znaEnergy[0], znaEnergy[1], znaEnergy[2], znaEnergy[3], zncEnergy[0], zncEnergy[1], zncEnergy[2], zncEnergy[3], qxZDCA, qxZDCC, qyZDCA, qyZDCC, psiZDCC, psiZDCA);
return;
Expand All @@ -658,11 +678,12 @@
qyZDCC = qyZDCC / meanyCvzerror;
}
}
*/

// LOG(info) << "**********qxa values in spvector************" << qxZDCA<<" "<<centrality<<" "<<vx<<" "<<vy<<" "<<vz;

psiZDCC = 1.0 * TMath::ATan2(qyZDCC, qxZDCC);

Check warning on line 685 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
psiZDCA = 1.0 * TMath::ATan2(qyZDCA, qxZDCA);

Check warning on line 686 in PWGLF/TableProducer/Common/spvector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.

if (useShift && (currentRunNumber != lastRunNumber)) {
shiftprofileC = ccdb->getForTimeStamp<TProfile3D>(ConfShiftC.value, bc.timestamp());
Expand Down
Loading