Skip to content

Commit 8dcbc78

Browse files
committed
add configurable mult cut, add b axis for OTF, add configurables for more track cuts
1 parent 32351ce commit 8dcbc78

File tree

1 file changed

+44
-9
lines changed

1 file changed

+44
-9
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ std::vector<double> centbinning(90);
7575
int nBootstrap = 10;
7676
GFWRegions regions;
7777
GFWCorrConfigs configs;
78+
std::vector<double> multGlobalCorrCutPars;
79+
std::vector<double> multPVCorrCutPars;
7880
} // namespace o2::analysis::gfw
7981

8082
struct FlowGenericFramework {
@@ -92,9 +94,12 @@ struct FlowGenericFramework {
9294
O2_DEFINE_CONFIGURABLE(cfgUseGapMethod, bool, false, "Use gap method in vn-pt calculations")
9395
O2_DEFINE_CONFIGURABLE(cfgEfficiency, std::string, "", "CCDB path to efficiency object")
9496
O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object")
95-
O2_DEFINE_CONFIGURABLE(cfgDCAxy, float, 0.2, "Cut on DCA in the transverse direction (cm)");
97+
O2_DEFINE_CONFIGURABLE(cfgDCAxyNSigma, float, 7, "Cut on number of sigma deviations from expected DCA in the transverse direction");
9698
O2_DEFINE_CONFIGURABLE(cfgDCAz, float, 2, "Cut on DCA in the longitudinal direction (cm)");
97-
O2_DEFINE_CONFIGURABLE(cfgNcls, float, 70, "Cut on number of TPC clusters found");
99+
O2_DEFINE_CONFIGURABLE(cfgNTPCCls, float, 70, "Cut on number of TPC clusters found");
100+
O2_DEFINE_CONFIGURABLE(cfgMinNITSCls, float, 5, "Cut on minimum number of ITS clusters found");
101+
O2_DEFINE_CONFIGURABLE(cfgChi2PrITSCls, float, 36, "Cut on chi^2 per ITS clusters found");
102+
O2_DEFINE_CONFIGURABLE(cfgChi2PrTPCCls, float, 2.5, "Cut on chi^2 per TPC clusters found");
98103
O2_DEFINE_CONFIGURABLE(cfgPtmin, float, 0.2, "minimum pt (GeV/c)");
99104
O2_DEFINE_CONFIGURABLE(cfgPtmax, float, 10, "maximum pt (GeV/c)");
100105
O2_DEFINE_CONFIGURABLE(cfgEta, float, 0.8, "eta cut");
@@ -114,6 +119,10 @@ struct FlowGenericFramework {
114119
O2_DEFINE_CONFIGURABLE(cfgUseDensityDependentCorrection, bool, false, "Use density dependent efficiency correction based on Run 2 measurements");
115120
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.7217476707, 0.7384792571, 0.7542625668, 0.7640680200, 0.7701951667, 0.7755299053, 0.7805901710, 0.7849446786, 0.7957356586, 0.8113039262, 0.8211968966, 0.8280558878, 0.8329342135}, "parameter 0 for track density efficiency correction"};
116121
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-2.169488e-05, -2.191913e-05, -2.295484e-05, -2.556538e-05, -2.754463e-05, -2.816832e-05, -2.846502e-05, -2.843857e-05, -2.705974e-05, -2.477018e-05, -2.321730e-05, -2.203315e-05, -2.109474e-05}, "parameter 1 for track density efficiency correction"};
122+
Configurable<std::vector<double>> cfgMultGlobalCutPars{"cfgMultGlobalCutPars", std::vector<double>{2272.16, -76.6932, 1.01204, -0.00631545, 1.59868e-05, 136.336, -4.97006, 0.121199, -0.0015921, 7.66197e-06}, "Global multiplicity cut parameter values"};
123+
Configurable<std::vector<double>> cfgMultPVCutPars{"cfgMultPVCutPars", std::vector<double>{3074.43,-106.192,1.46176,-0.00968364,2.61923e-05,182.128,-7.43492,0.193901,-0.00256715,1.22594e-05}, "PV multiplicity cut parameter values"};
124+
O2_DEFINE_CONFIGURABLE(cfgMultCorrHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
125+
O2_DEFINE_CONFIGURABLE(cfgMultCorrLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
117126

118127
Configurable<GFWBinningCuts> cfgGFWBinning{"cfgGFWBinning", {40, 16, 72, 300, 0, 3000, 0.2, 10.0, 0.2, 3.0, {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90}}, "Configuration for binning"};
119128
Configurable<GFWRegions> cfgRegions{"cfgRegions", {{"refN", "refP", "refFull"}, {-0.8, 0.4, -0.8}, {-0.4, 0.8, 0.8}, {0, 0, 0}, {1, 1, 1}}, "Configurations for GFW regions"};
@@ -161,7 +170,8 @@ struct FlowGenericFramework {
161170
kCentFT0C = 0,
162171
kCentFT0CVariant1,
163172
kCentFT0M,
164-
kCentFV0A
173+
kCentFV0A,
174+
kCentNTPV
165175
};
166176

167177
// Define global variables
@@ -231,6 +241,8 @@ struct FlowGenericFramework {
231241
o2::analysis::gfw::nchup = cfgGFWBinning->GetNchMax();
232242
o2::analysis::gfw::centbinning = cfgGFWBinning->GetCentBinning();
233243
cfgGFWBinning->Print();
244+
o2::analysis::gfw::multGlobalCorrCutPars = cfgMultGlobalCutPars;
245+
o2::analysis::gfw::multPVCorrCutPars = cfgMultPVCutPars;
234246

235247
AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, "#phi"};
236248
AxisSpec etaAxis = {o2::analysis::gfw::etabins, -cfgEta, cfgEta, "#eta"};
@@ -250,6 +262,8 @@ struct FlowGenericFramework {
250262
case kCentFV0A:
251263
sCentralityEstimator = "FV0A";
252264
break;
265+
case kCentNTPV:
266+
sCentralityEstimator = "NTPV";
253267
default:
254268
sCentralityEstimator = "FT0C";
255269
}
@@ -265,7 +279,7 @@ struct FlowGenericFramework {
265279
AxisSpec t0cAxis = {70, 0, 70000, "N_{ch} (T0C)"};
266280
AxisSpec t0aAxis = {200, 0, 200, "N_{ch}"};
267281
AxisSpec multpvAxis = {4000, 0, 4000, "N_{ch} (PV)"};
268-
AxisSpec multAxis = (cfgUseNch) ? nchAxis : centAxis;
282+
AxisSpec multAxis = (doprocessOnTheFly && !cfgUseNch) ? bAxis : (cfgUseNch) ? nchAxis : centAxis;
269283
AxisSpec dcaZAXis = {200, -2, 2, "DCA_{z} (cm)"};
270284
AxisSpec dcaXYAXis = {200, -1, 1, "DCA_{xy} (cm)"};
271285
ccdb->setURL("http://alice-ccdb.cern.ch");
@@ -362,6 +376,15 @@ struct FlowGenericFramework {
362376
fFCpt->initialise(multAxis, cfgMpar, o2::analysis::gfw::configs, cfgNbootstrap);
363377
// Event selection - Alex
364378
if (cfgUseAdditionalEventCut) {
379+
fMultPVCutLow = new TF1("fMultPVCutLow", cfgMultCorrLowCutFunction->c_str(), 0, 100);
380+
fMultPVCutLow->SetParameters(&(o2::analysis::gfw::multPVCorrCutPars[0]));
381+
fMultPVCutHigh = new TF1("fMultPVCutHigh", cfgMultCorrHighCutFunction->c_str(), 0, 100);
382+
fMultPVCutHigh->SetParameters(&(o2::analysis::gfw::multPVCorrCutPars[0]));
383+
fMultCutLow = new TF1("fMultCutLow", cfgMultCorrLowCutFunction->c_str(), 0, 100);
384+
fMultCutLow->SetParameters(&(o2::analysis::gfw::multGlobalCorrCutPars[0]));
385+
fMultCutHigh = new TF1("fMultCutHigh", cfgMultCorrHighCutFunction->c_str(), 0, 100);
386+
fMultCutHigh->SetParameters(&(o2::analysis::gfw::multGlobalCorrCutPars[0]));
387+
/*
365388
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);
366389
fMultPVCutLow->SetParameters(3257.29, -121.848, 1.98492, -0.0172128, 6.47528e-05, 154.756, -1.86072, -0.0274713, 0.000633499, -3.37757e-06);
367390
fMultPVCutHigh = new TF1("fMultPVCutHigh", "[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);
@@ -370,7 +393,7 @@ struct FlowGenericFramework {
370393
fMultCutLow = new TF1("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x - 2.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100);
371394
fMultCutLow->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06);
372395
fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x + 3.*([4]+[5]*x+[6]*x*x+[7]*x*x*x+[8]*x*x*x*x)", 0, 100);
373-
fMultCutHigh->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06);
396+
fMultCutHigh->SetParameters(1654.46, -47.2379, 0.449833, -0.0014125, 150.773, -3.67334, 0.0530503, -0.000614061, 3.15956e-06); */
374397
}
375398
if (cfgUseDensityDependentCorrection) {
376399
std::vector<double> pTEffBins = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.4, 1.8, 2.2, 2.6, 3.0};
@@ -600,6 +623,12 @@ struct FlowGenericFramework {
600623
return 1;
601624
}
602625

626+
template <typename TTrack>
627+
bool trackSelected(TTrack track){
628+
if(cfgDCAxyNSigma && (std::fabs(track.dcaXY()) > cfgDCAxyNSigma/7.*(0.0105f + 0.0035f / track.pt())))
629+
return false;
630+
return ((track.tpcNClsFound() >= cfgNTPCCls) && (track.itsNCls() >= cfgMinNITSCls));
631+
}
603632
enum DataType {
604633
kReco,
605634
kGen
@@ -797,7 +826,10 @@ struct FlowGenericFramework {
797826
if (cfgFillQA)
798827
fillTrackQA<kReco, kBefore>(track, vtxz);
799828

800-
if (mcParticle.eta() < o2::analysis::gfw::etalow || mcParticle.eta() > o2::analysis::gfw::etaup || mcParticle.pt() < o2::analysis::gfw::ptlow || mcParticle.pt() > o2::analysis::gfw::ptup || track.tpcNClsFound() < cfgNcls)
829+
if (mcParticle.eta() < o2::analysis::gfw::etalow || mcParticle.eta() > o2::analysis::gfw::etaup || mcParticle.pt() < o2::analysis::gfw::ptlow || mcParticle.pt() > o2::analysis::gfw::ptup)
830+
return;
831+
832+
if(!trackSelected(track))
801833
return;
802834

803835
int pidIndex = 0;
@@ -852,7 +884,8 @@ struct FlowGenericFramework {
852884
} else {
853885
if (cfgFillQA)
854886
fillTrackQA<kReco, kBefore>(track, vtxz);
855-
if (track.tpcNClsFound() < cfgNcls)
887+
888+
if (!trackSelected(track))
856889
return;
857890

858891
int pidIndex = 0;
@@ -989,11 +1022,11 @@ struct FlowGenericFramework {
9891022
}
9901023

9911024
o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
992-
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
1025+
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::itsChi2NCl < cfgChi2PrITSCls) && (aod::track::tpcChi2NCl < cfgChi2PrTPCCls) && nabs(aod::track::dcaZ) < cfgDCAz;
9931026

9941027
using GFWTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFKa, aod::pidTPCKa, aod::pidTOFPr, aod::pidTPCPr>>;
9951028

996-
void processData(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
1029+
void processData(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::CentNTPVs>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
9971030
{
9981031
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
9991032
int run = bc.runNumber();
@@ -1044,6 +1077,8 @@ struct FlowGenericFramework {
10441077
case kCentFV0A:
10451078
centrality = collision.centFV0A();
10461079
break;
1080+
case kCentNTPV:
1081+
centrality = collision.centNTPV();
10471082
default:
10481083
centrality = collision.centFT0C();
10491084
}

0 commit comments

Comments
 (0)