Skip to content

Commit c88abbd

Browse files
committed
modify process switch
1 parent 5a0026b commit c88abbd

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

PWGUD/Tasks/flowCumulantsUpc.cxx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252

5353
#include <array>
5454
#include <cmath>
55-
#include <iostream>
5655
#include <memory>
5756
#include <string>
5857
#include <unordered_map>
@@ -127,12 +126,12 @@ struct FlowCumulantsUpc {
127126
ConfigurableAxis axisDCAxy{"axisDCAxy", {200, -1, 1}, "DCA_{xy} (cm)"};
128127

129128
// Added UPC Cuts
130-
// SGSelector sgSelector;
131-
// Configurable<float> cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"};
132-
// Configurable<float> cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"};
133-
// Configurable<float> cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"};
134-
// Configurable<float> cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"};
135-
// Configurable<float> cfgGapSideSelection{"cfgGapSideSelection", 2, "gap selection"};
129+
SGSelector sgSelector;
130+
Configurable<float> cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"};
131+
Configurable<float> cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"};
132+
Configurable<float> cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"};
133+
Configurable<float> cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"};
134+
Configurable<float> cfgGapSideSelection{"cfgGapSideSelection", 2, "gap selection"};
136135

137136
// Corrections
138137
TH1D* mEfficiency = nullptr;
@@ -432,7 +431,6 @@ struct FlowCumulantsUpc {
432431
fGFWMC->AddRegion("olN", -0.8, -0.4, 1 + fPtAxis->GetNbins(), 4);
433432
fGFWMC->AddRegion("olN10", -0.8, -0.5, 1 + fPtAxis->GetNbins(), 4);
434433
fGFWMC->AddRegion("olfull", -0.8, 0.8, 1 + fPtAxis->GetNbins(), 4);
435-
fGFWMC->CreateRegions();
436434

437435
corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {2 -2}", "ChFull22", kFALSE));
438436
corrconfigs.push_back(fGFW->GetCorrelatorConfig("full {3 -3}", "ChFull32", kFALSE));
@@ -526,9 +524,11 @@ struct FlowCumulantsUpc {
526524
}
527525
LOGF(info, "%d: %s %s", i, userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str());
528526
corrconfigs.push_back(fGFW->GetCorrelatorConfig(userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str(), kFALSE));
527+
corrconfigsmc.push_back(fGFWMC->GetCorrelatorConfig(userDefineGFWCorr.at(i).c_str(), userDefineGFWName.at(i).c_str(), kFALSE));
529528
}
530529
}
531530
fGFW->CreateRegions();
531+
fGFWMC->CreateRegions();
532532

533533
if (cfgUseAdditionalEventCut) {
534534
fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100);
@@ -644,6 +644,8 @@ struct FlowCumulantsUpc {
644644
return;
645645
}
646646

647+
// ... 其余代码保持不变 ...
648+
647649
void loadCorrections(uint64_t timestamp, int runNumber)
648650
{
649651
if (correctionsLoaded) {
@@ -941,16 +943,16 @@ struct FlowCumulantsUpc {
941943
//-----------------------------------------------------------------------------------------------------------------------
942944
void processSim(aod::UDMcCollisions const& mcCollisions, aod::UDMcParticles const& mcParticles)
943945
{
944-
std::cout << "Processing MC collision======================== " << std::endl;
946+
LOG(info) << "Processing MC collision======================== " << std::endl;
945947

946948
// std::cout << mcParicles::IndexudmcCollisions.is_sorted();
947949

948-
for (auto& mcCollision : mcCollisions) {
950+
for (const auto& mcCollision : mcCollisions) {
949951
auto groupedUDMcParticles = mcParticles.sliceBy(perMcCollision, mcCollision.globalIndex());
950952
registry.fill(HIST("eventCounterMC"), 0.5);
951953

952954
// registry.fill(HIST("hEventCount"), 1.5);
953-
float cent = 100;
955+
float cent = 50;
954956
float vtxz = 0;
955957

956958
vtxz = mcCollision.posZ();
@@ -974,11 +976,11 @@ struct FlowCumulantsUpc {
974976
independent = static_cast<float>(groupedUDMcParticles.size());
975977
}
976978

977-
std::cout << "mcParticles.size() = " << groupedUDMcParticles.size() << std::endl;
979+
LOG(info) << "mcParticles.size() = " << groupedUDMcParticles.size() << std::endl;
978980

979981
for (const auto& mcParticle : groupedUDMcParticles) {
980982

981-
std::cout << "filling mc particle px: " << mcParticle.px() << ", py: " << mcParticle.py() << ", pz: " << mcParticle.pz() << std::endl;
983+
LOG(info) << "filling mc particle px: " << mcParticle.px() << ", py: " << mcParticle.py() << ", pz: " << mcParticle.pz() << std::endl;
982984

983985
// output information from mcparticles
984986
registry.fill(HIST("hPxMc"), mcParticle.px());
@@ -987,16 +989,17 @@ struct FlowCumulantsUpc {
987989
registry.fill(HIST("hweightMc"), mcParticle.weight());
988990

989991
if (!mcParticle.isPhysicalPrimary()) {
990-
std::cout << "mcParticle.isPhysicalPrimary() = " << mcParticle.isPhysicalPrimary() << std::endl;
992+
LOG(info) << "mcParticle.isPhysicalPrimary() = " << mcParticle.isPhysicalPrimary() << std::endl;
991993
continue;
992994
}
995+
993996
std::array<double, 3> momentum = {mcParticle.px(), mcParticle.py(), mcParticle.pz()};
994997
double energy = std::sqrt(momentum[0] * momentum[0] + momentum[1] * momentum[1] + momentum[2] * momentum[2] + massPion * massPion);
995998
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> protoMC(momentum[0], momentum[1], momentum[2], energy);
996999
constexpr double kEtaCut = 0.8;
9971000
constexpr double kPtCut = 0.1;
9981001
if (!(std::fabs(protoMC.Eta()) < kEtaCut && protoMC.Pt() > kPtCut)) {
999-
std::cout << "protoMC.Eta() = " << protoMC.Eta() << ", protoMC.Pt() = " << protoMC.Pt() << std::endl;
1002+
LOG(info) << "protoMC.Eta() = " << protoMC.Eta() << ", protoMC.Pt() = " << protoMC.Pt() << std::endl;
10001003
continue;
10011004
}
10021005
// auto momentum = std::array<double, 3>{mcParticle.px(), mcParticle.py(), mcParticle.pz()};
@@ -1036,11 +1039,12 @@ struct FlowCumulantsUpc {
10361039
if (withinPtPOI && withinPtRef) {
10371040
fGFWMC->Fill(eta, fPtAxis->FindBin(pt) - 1, phi, wacc * weff, 4);
10381041
}
1042+
LOG(info) << "successfully filled" << std::endl;
10391043
}
10401044
registry.fill(HIST("hTrackCorrection2dMC"), mcParticles.size(), nTracksCorrected);
10411045
// Filling Flow Container
10421046
for (uint l_ind = 0; l_ind < corrconfigsmc.size(); l_ind++) {
1043-
std::cout << "filling flow container for MC" << std::endl;
1047+
LOG(info) << "filling flow container for MC" << std::endl;
10441048
fillFCMC(corrconfigsmc.at(l_ind), independent, lRandomMc);
10451049
}
10461050
}

0 commit comments

Comments
 (0)