Skip to content

Commit

Permalink
added vz axis for rec (AliceO2Group#7672)
Browse files Browse the repository at this point in the history
  • Loading branch information
prottayCMT authored Sep 12, 2024
1 parent 8a283f0 commit 694c5d1
Showing 1 changed file with 31 additions and 18 deletions.
49 changes: 31 additions & 18 deletions PWGLF/TableProducer/Common/spvector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct spvector {
AxisSpec channelZDCAxis = {8, 0.0, 8.0, "ZDC tower"};
AxisSpec qxZDCAxis = {QxyNbins, lbinQxy, hbinQxy, "Qx"};
AxisSpec qyZDCAxis = {QxyNbins, lbinQxy, hbinQxy, "Qy"};
AxisSpec phiAxis = {50, -6.28, 6.28, "phi"};
AxisSpec phiAxis = {100, -6.28, 6.28, "phi"};
AxisSpec vzAxis = {20, -10, 10, "vz"};

histos.add("hCentrality", "hCentrality", kTH1F, {{8, 0, 80.0}});
Expand All @@ -162,10 +162,10 @@ struct spvector {
histos.add("hpQyZDCAC", "hpQyZDCAC", kTProfile, {centAxis});
histos.add("hpQxZDCAQyZDCC", "hpQxZDCAQyZDCC", kTProfile, {centAxis});
histos.add("hpQxZDCCQyZDCA", "hpQxZDCCQyZDCA", kTProfile, {centAxis});
histos.add("QxZDCC", "QxZDCC", kTH2F, {centAxis, qxZDCAxis});
histos.add("QyZDCC", "QyZDCC", kTH2F, {centAxis, qyZDCAxis});
histos.add("QxZDCA", "QxZDCA", kTH2F, {centAxis, qxZDCAxis});
histos.add("QyZDCA", "QyZDCA", kTH2F, {centAxis, qyZDCAxis});
histos.add("QxZDCC", "QxZDCC", kTH3F, {centAxis, vzAxis, qxZDCAxis});
histos.add("QyZDCC", "QyZDCC", kTH3F, {centAxis, vzAxis, qyZDCAxis});
histos.add("QxZDCA", "QxZDCA", kTH3F, {centAxis, vzAxis, qxZDCAxis});
histos.add("QyZDCA", "QyZDCA", kTH3F, {centAxis, vzAxis, qyZDCAxis});
histos.add("PsiZDCC", "PsiZDCC", kTH2F, {centAxis, phiAxis});
histos.add("PsiZDCA", "PsiZDCA", kTH2F, {centAxis, phiAxis});
histos.add("ZDCAmp", "ZDCAmp", kTProfile2D, {channelZDCAxis, vzAxis});
Expand Down Expand Up @@ -193,7 +193,7 @@ struct spvector {
int currentRunNumber = -999;
int lastRunNumber = -999;
TH2D* gainprofile;
TH2D* hrecentere;
TH3D* hrecentere;

// Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
// Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
Expand Down Expand Up @@ -258,7 +258,10 @@ struct spvector {
for (std::size_t iChA = 0; iChA < 8; iChA++) {
auto chanelid = iChA;
if (useGainCallib && gainprofile) {
gainequal = gainprofile->GetBinContent(gainprofile->FindBin(chanelid, vz));
gainequal = gainprofile->GetBinContent(gainprofile->FindBin(vz, chanelid + 0.5));
// if (chanelid==0)
// LOG(info) <<"###################Accesed#####################"<<" "<<currentRunNumber<<" "<<gainequal<<" "<<(chanelid+1)<<" "<<vz;
// LOG(info) <<"###################Accesed#####################"<<" "<<currentRunNumber<<" "<<gainequal<<" "<<(chanelid+1)<<" "<<vz;
}

if (iChA < 4) {
Expand Down Expand Up @@ -306,15 +309,25 @@ struct spvector {
}

if (useRecentere && (currentRunNumber != lastRunNumber)) {
hrecentere = ccdb->getForTimeStamp<TH2D>(ConfRecentere.value, bc.timestamp());
hrecentere = ccdb->getForTimeStamp<TH3D>(ConfRecentere.value, bc.timestamp());
}

if (useRecentere) {

qxZDCA = (qxZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, 0.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, 0.5));
qyZDCA = (qyZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, 1.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, 1.5));
qxZDCC = (qxZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, 2.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, 2.5));
qyZDCC = (qyZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, 3.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, 3.5));
if (useRecentere && hrecentere) {
/*
qxZDCA = (qxZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 0.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, vz, 0.5));
qyZDCA = (qyZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 1.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, vz, 1.5));
qxZDCC = (qxZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 2.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, vz, 2.5));
qyZDCC = (qyZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 3.5))) / hrecentere->GetBinError(hrecentere->FindBin(centrality, vz, 3.5));
*/

qxZDCA = (qxZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 0.5)));
qyZDCA = (qyZDCA - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 1.5)));
qxZDCC = (qxZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 2.5)));
qyZDCC = (qyZDCC - hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 3.5)));
/*
if (vz>0.0)
LOG(info) <<"###################Accesed#####################"<<" "<<currentRunNumber<<" "<<vz<<" "<<centrality<<" "<<hrecentere->GetBinContent(hrecentere->FindBin(centrality, vz, 0.5));
*/
}

psiZDCC = 1.0 * TMath::ATan2(qyZDCC, qxZDCC);
Expand All @@ -324,10 +337,10 @@ struct spvector {
histos.fill(HIST("hpQyZDCAC"), centrality, (qyZDCA * qyZDCC));
histos.fill(HIST("hpQxZDCAQyZDCC"), centrality, (qxZDCA * qyZDCC));
histos.fill(HIST("hpQxZDCCQyZDCA"), centrality, (qxZDCC * qyZDCA));
histos.fill(HIST("QxZDCC"), centrality, qxZDCC);
histos.fill(HIST("QyZDCC"), centrality, qyZDCC);
histos.fill(HIST("QxZDCA"), centrality, qxZDCA);
histos.fill(HIST("QyZDCA"), centrality, qyZDCA);
histos.fill(HIST("QxZDCC"), centrality, vz, qxZDCC);
histos.fill(HIST("QyZDCC"), centrality, vz, qyZDCC);
histos.fill(HIST("QxZDCA"), centrality, vz, qxZDCA);
histos.fill(HIST("QyZDCA"), centrality, vz, qyZDCA);
histos.fill(HIST("PsiZDCA"), centrality, psiZDCA);
histos.fill(HIST("PsiZDCC"), centrality, psiZDCC);

Expand Down

0 comments on commit 694c5d1

Please sign in to comment.