Skip to content

Commit 7d398ed

Browse files
authored
Merge branch 'master' into zorro_dict
2 parents 3b3acd6 + 9cbe9f3 commit 7d398ed

File tree

12 files changed

+128
-66
lines changed

12 files changed

+128
-66
lines changed

Common/TableProducer/qVectorsTable.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ struct qVectorsTable {
193193
for (DeviceSpec const& device : workflows.devices) {
194194
for (auto const& input : device.inputs) {
195195
if (input.matcher.binding == "Qvectors") {
196-
for (auto det : useDetector) {
196+
for (auto const& det : useDetector) {
197197
useDetector[det.first.data()] = true;
198198
}
199199
LOGF(info, "Using all detectors.");
200200
goto allDetectorsInUse; // Added to break from nested loop if all detectors are in use.
201201
}
202-
for (auto det : useDetector) {
202+
for (auto const& det : useDetector) {
203203
std::string table_name_with_vector = det.first; // for replacing s with Vecs at the end.
204204
if (input.matcher.binding == det.first || input.matcher.binding == table_name_with_vector.replace(table_name_with_vector.size() - 1, 1, "Vecs")) {
205205
useDetector[det.first.data()] = true;
@@ -470,7 +470,7 @@ struct qVectorsTable {
470470
int nTrkTPCneg = 0;
471471
int nTrkTPCall = 0;
472472

473-
for (auto& trk : track) {
473+
for (auto const& trk : track) {
474474
if (!SelTrack(trk)) {
475475
continue;
476476
}
@@ -674,13 +674,13 @@ struct qVectorsTable {
674674
auto coeffshiftxTPCall = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCall, ishift - 0.5));
675675
auto coeffshiftyTPCall = shiftprofile.at(nmode - 2)->GetBinContent(shiftprofile.at(nmode - 2)->FindBin(cent, 2 * kTPCall + 1, ishift - 0.5));
676676

677-
deltapsiFT0C += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0C * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0C) + coeffshiftyFT0C * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0C)));
678-
deltapsiFT0A += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0A) + coeffshiftyFT0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0A)));
679-
deltapsiFT0M += ((1 / (1.0 * ishift)) * (-coeffshiftxFT0M * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0M) + coeffshiftyFT0M * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0M)));
680-
deltapsiFV0A += ((1 / (1.0 * ishift)) * (-coeffshiftxFV0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFV0A) + coeffshiftyFV0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFV0A)));
681-
deltapsiTPCpos += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCpos * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCpos) + coeffshiftyTPCpos * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCpos)));
682-
deltapsiTPCneg += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCneg * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCneg) + coeffshiftyTPCneg * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCneg)));
683-
deltapsiTPCall += ((1 / (1.0 * ishift)) * (-coeffshiftxTPCall * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCall) + coeffshiftyTPCall * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCall)));
677+
deltapsiFT0C += ((2. / (1.0 * ishift)) * (-coeffshiftxFT0C * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0C) + coeffshiftyFT0C * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0C))) / static_cast<float>(nmode);
678+
deltapsiFT0A += ((2. / (1.0 * ishift)) * (-coeffshiftxFT0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0A) + coeffshiftyFT0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0A))) / static_cast<float>(nmode);
679+
deltapsiFT0M += ((2. / (1.0 * ishift)) * (-coeffshiftxFT0M * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFT0M) + coeffshiftyFT0M * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFT0M))) / static_cast<float>(nmode);
680+
deltapsiFV0A += ((2. / (1.0 * ishift)) * (-coeffshiftxFV0A * TMath::Cos(ishift * static_cast<float>(nmode) * psidefFV0A) + coeffshiftyFV0A * TMath::Sin(ishift * static_cast<float>(nmode) * psidefFV0A))) / static_cast<float>(nmode);
681+
deltapsiTPCpos += ((2. / (1.0 * ishift)) * (-coeffshiftxTPCpos * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCpos) + coeffshiftyTPCpos * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCpos))) / static_cast<float>(nmode);
682+
deltapsiTPCneg += ((2. / (1.0 * ishift)) * (-coeffshiftxTPCneg * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCneg) + coeffshiftyTPCneg * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCneg))) / static_cast<float>(nmode);
683+
deltapsiTPCall += ((2. / (1.0 * ishift)) * (-coeffshiftxTPCall * TMath::Cos(ishift * static_cast<float>(nmode) * psidefTPCall) + coeffshiftyTPCall * TMath::Sin(ishift * static_cast<float>(nmode) * psidefTPCall))) / static_cast<float>(nmode);
684684
}
685685

686686
qvecReShiftedFT0C.push_back(qvecRe[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Cos(deltapsiFT0C) - qvecIm[(kTPCall + 1) * 4 * id + kFT0C * 4 + 3] * TMath::Sin(deltapsiFT0C));

Common/Tasks/qVectorsCorrection.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,8 @@ struct qVectorsCorrection {
713713
{
714714
histosQA.fill(HIST("histCentFull"), qVec.cent());
715715
if (cfgAddEvtSel) {
716+
if (std::abs(qVec.posZ()) > 10.)
717+
return;
716718
switch (cfgEvtSel) {
717719
case 0: // Sel8
718720
if (!qVec.sel8())

Common/Tasks/qaMuon.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,14 +2706,13 @@ struct muonQa {
27062706
//
27072707
registryDimuon.get<TH3>(HIST("dimuon/same-event/single-muon-dimuon-correlations/invariantMass_pT_MuPosPhi_MuonKine_MuonCuts"))->Fill(mass, pT, muPosPhi);
27082708
registryDimuon.get<TH3>(HIST("dimuon/same-event/single-muon-dimuon-correlations/invariantMass_pT_MuNegPhi_MuonKine_MuonCuts"))->Fill(mass, pT, muNegPhi);
2709-
// dimuons
2710-
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts"))->Fill(mass);
2711-
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts"))->Fill(mass);
2712-
registryDimuon.get<TH2>(HIST("dimuon/same-event/invariantMass_pT_MuonKine_MuonCuts"))->Fill(mass, pT);
2713-
registryDimuon.get<TH1>(HIST("dimuon/same-event/rapPair_MuonKine_MuonCuts"))->Fill(yPair);
2714-
registryDimuon.get<TH2>(HIST("dimuon/same-event/invariantMass_rapPair_MuonKine_MuonCuts"))->Fill(mass, yPair);
2715-
registryDimuon.get<TH2>(HIST("dimuon/same-event/pT_rapPair_MuonKine_MuonCuts"))->Fill(pT, yPair);
27162709
}
2710+
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts"))->Fill(mass);
2711+
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts"))->Fill(mass);
2712+
registryDimuon.get<TH2>(HIST("dimuon/same-event/invariantMass_pT_MuonKine_MuonCuts"))->Fill(mass, pT);
2713+
registryDimuon.get<TH1>(HIST("dimuon/same-event/rapPair_MuonKine_MuonCuts"))->Fill(yPair);
2714+
registryDimuon.get<TH2>(HIST("dimuon/same-event/invariantMass_rapPair_MuonKine_MuonCuts"))->Fill(mass, yPair);
2715+
registryDimuon.get<TH2>(HIST("dimuon/same-event/pT_rapPair_MuonKine_MuonCuts"))->Fill(pT, yPair);
27172716

27182717
// dimuon DCA
27192718
if (mass >= fDimuonDCAMassLow && mass <= fDimuonDCAMassHigh) {

PWGCF/Flow/Tasks/flowGfwTask.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,13 @@ struct FlowGfwTask {
841841

842842
// Apply process filters GlobalTracks
843843
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex && (aod::cent::centFT0C > cfgMinCentFT0C) && (aod::cent::centFT0C < cfgMaxCentFT0C);
844-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
844+
Filter trackFilter = ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) &&
845+
ncheckbit(aod::track::trackCutFlag, TrackSelectionITS) &&
846+
ifnode(ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::TPC),
847+
ncheckbit(aod::track::trackCutFlag, TrackSelectionTPC), true) &&
848+
ifnode(dcaZ > 0.f, nabs(aod::track::dcaZ) <= dcaZ && ncheckbit(aod::track::trackCutFlag, TrackSelectionDCAXYonly),
849+
ncheckbit(aod::track::trackCutFlag, TrackSelectionDCA)) &&
850+
(nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
845851

846852
void processData(Colls::iterator const& collision, aod::BCsWithTimestamps const&, AodTracks const& tracks, aod::FT0s const&, aod::Zdcs const&, BCsRun3 const&)
847853
{

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ o2physics_add_dpl_workflow(mc-pid-tof
3737

3838
o2physics_add_dpl_workflow(candidate-creator-2prong
3939
SOURCES candidateCreator2Prong.cxx
40-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
40+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
4141
COMPONENT_NAME Analysis)
4242

4343
o2physics_add_dpl_workflow(candidate-creator-3prong
4444
SOURCES candidateCreator3Prong.cxx
45-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
45+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
4646
COMPONENT_NAME Analysis)
4747

4848
o2physics_add_dpl_workflow(candidate-creator-b0
@@ -62,12 +62,11 @@ o2physics_add_dpl_workflow(candidate-creator-bs
6262

6363
o2physics_add_dpl_workflow(candidate-creator-cascade
6464
SOURCES candidateCreatorCascade.cxx
65-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
66-
COMPONENT_NAME Analysis)
65+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
6766

6867
o2physics_add_dpl_workflow(candidate-creator-dstar
6968
SOURCES candidateCreatorDstar.cxx
70-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
69+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
7170
COMPONENT_NAME Analysis)
7271

7372
o2physics_add_dpl_workflow(candidate-creator-lb
@@ -87,12 +86,12 @@ o2physics_add_dpl_workflow(candidate-creator-sigmac0plusplus-cascade
8786

8887
o2physics_add_dpl_workflow(candidate-creator-xic0-omegac0
8988
SOURCES candidateCreatorXic0Omegac0.cxx
90-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils
89+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
9190
COMPONENT_NAME Analysis)
9291

9392
o2physics_add_dpl_workflow(candidate-creator-xic-to-xi-pi-pi
9493
SOURCES candidateCreatorXicToXiPiPi.cxx
95-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils
94+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
9695
COMPONENT_NAME Analysis)
9796

9897
o2physics_add_dpl_workflow(candidate-creator-xicc

PWGHF/TableProducer/candidateCreator2Prong.cxx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "PWGHF/Utils/utilsTrkCandHf.h"
3434
#include "PWGLF/DataModel/mcCentrality.h"
3535

36+
#include "Common/CCDB/ctpRateFetcher.h"
3637
#include "Common/Core/RecoDecay.h"
3738
#include "Common/Core/trackUtilities.h"
3839
#include "Common/DataModel/Centrality.h"
@@ -112,10 +113,12 @@ struct HfCandidateCreator2Prong {
112113
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
113114
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
114115
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
116+
Configurable<std::string> irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"};
115117

116118
HfEventSelection hfEvSel; // event selection and monitoring
117119
o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter
118120
Service<o2::ccdb::BasicCCDBManager> ccdb;
121+
ctpRateFetcher mRateFetcher;
119122

120123
int runNumber{0};
121124
double bz{0.};
@@ -742,9 +745,10 @@ struct HfCandidateCreator2Prong {
742745
float centrality{-1.f};
743746
const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator);
744747
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
745-
748+
const auto bc = collision.template foundBC_as<aod::BCsWithTimestamps>();
749+
const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz
746750
/// monitor the satisfied event selections
747-
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy);
751+
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir);
748752

749753
} /// end loop over collisions
750754
}
@@ -760,9 +764,10 @@ struct HfCandidateCreator2Prong {
760764
float centrality{-1.f};
761765
const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator);
762766
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0C, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
763-
767+
const auto bc = collision.template foundBC_as<aod::BCsWithTimestamps>();
768+
const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz
764769
/// monitor the satisfied event selections
765-
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy);
770+
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir);
766771

767772
} /// end loop over collisions
768773
}
@@ -778,9 +783,10 @@ struct HfCandidateCreator2Prong {
778783
float centrality{-1.f};
779784
const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator);
780785
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::FT0M, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
781-
786+
const auto bc = collision.template foundBC_as<aod::BCsWithTimestamps>();
787+
const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz
782788
/// monitor the satisfied event selections
783-
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy);
789+
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir);
784790

785791
} /// end loop over collisions
786792
}
@@ -801,9 +807,10 @@ struct HfCandidateCreator2Prong {
801807
float centrality{-1.f};
802808
const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator);
803809
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc<true, CentralityEstimator::None, aod::BcFullInfos>(collision, centrality, ccdb, registry, bcs);
804-
810+
const auto bc = collision.template foundBC_as<aod::BcFullInfos>();
811+
const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz
805812
/// monitor the satisfied event selections
806-
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy);
813+
hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir);
807814

808815
} /// end loop over collisions
809816
}

0 commit comments

Comments
 (0)