diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 30a9c944aff..9859158521c 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -66,7 +66,7 @@ using namespace o2::framework; using namespace o2::framework::expressions; using std::array; -//use parameters + cov mat non-propagated, aux info + (extension propagated) +// use parameters + cov mat non-propagated, aux info + (extension propagated) using FullTracksExt = soa::Join; using FullTracksExtMC = soa::Join; using FullTracksExtIU = soa::Join; @@ -98,8 +98,8 @@ struct lambdakzeroBuilder { int mRunNumber; float d_bz; - float maxSnp; //max sine phi for propagation - float maxStep; //max step size (cm) for propagation + float maxSnp; // max sine phi for propagation + float maxStep; // max step size (cm) for propagation // for debugging #ifdef MY_DEBUG @@ -141,8 +141,8 @@ struct lambdakzeroBuilder { // using namespace analysis::lambdakzerobuilder; mRunNumber = 0; d_bz = 0; - maxSnp = 0.85f; //could be changed later - maxStep = 2.00f; //could be changed later + maxSnp = 0.85f; // could be changed later + maxStep = 2.00f; // could be changed later ccdb->setURL("http://alice-ccdb.cern.ch"); ccdb->setCaching(true); @@ -160,6 +160,13 @@ struct lambdakzeroBuilder { o2::base::Propagator::initFieldFromGRP(grpo); o2::base::Propagator::Instance()->setMatLUT(lut); } + + if (doprocessRun3 && doprocessRun2) { + LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); + } + if (!doprocessRun3 && !doprocessRun2) { + LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); + } } float getMagneticField(uint64_t timestamp) @@ -226,7 +233,7 @@ struct lambdakzeroBuilder { #endif MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "V0 builder: found K0S from Lc, posTrack --> " << labelPos << ", negTrack --> " << labelNeg); - //value 0.5: any considered V0 + // value 0.5: any considered V0 registry.fill(HIST("hV0Criteria"), 0.5); if (isRun2) { if (!(V0.posTrack_as().trackType() & o2::aod::track::TPCrefit)) { @@ -240,7 +247,7 @@ struct lambdakzeroBuilder { continue; // TPC refit } } - //Passes TPC refit + // Passes TPC refit registry.fill(HIST("hV0Criteria"), 1.5); if (V0.posTrack_as().tpcNClsCrossedRows() < mincrossedrows) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has " << V0.posTrack_as().tpcNClsCrossedRows() << " crossed rows, cut at " << mincrossedrows); @@ -252,7 +259,7 @@ struct lambdakzeroBuilder { v0dataLink(-1); continue; } - //passes crossed rows + // passes crossed rows registry.fill(HIST("hV0Criteria"), 2.5); if (fabs(V0.posTrack_as().dcaXY()) < dcapostopv) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has dcaXY " << V0.posTrack_as().dcaXY() << " , cut at " << dcanegtopv); @@ -265,7 +272,7 @@ struct lambdakzeroBuilder { continue; } MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "Filling good indices: posTrack --> " << labelPos << ", negTrack --> " << labelNeg); - //passes DCAxy + // passes DCAxy registry.fill(HIST("hV0Criteria"), 3.5); // Candidate building part @@ -290,7 +297,7 @@ struct lambdakzeroBuilder { continue; } - //passes diff coll check + // passes diff coll check registry.fill(HIST("hV0Criteria"), 4.5); // Act on copies for minimization @@ -305,7 +312,7 @@ struct lambdakzeroBuilder { continue; } - //passes V0 fitter minimization successfully + // passes V0 fitter minimization successfully registry.fill(HIST("hV0Criteria"), 5.5); double finalXpos = fitter.getTrack(0).getX(); @@ -331,7 +338,7 @@ struct lambdakzeroBuilder { continue; } - //Passes step 2 of V0 fitter + // Passes step 2 of V0 fitter registry.fill(HIST("hV0Criteria"), 6.5); pTrack.getPxPyPzGlo(pvec0); @@ -351,7 +358,7 @@ struct lambdakzeroBuilder { continue; } - //Passes DCA between daughters check + // Passes DCA between daughters check registry.fill(HIST("hV0Criteria"), 7.5); auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); @@ -361,7 +368,7 @@ struct lambdakzeroBuilder { continue; } - //Passes CosPA check + // Passes CosPA check registry.fill(HIST("hV0Criteria"), 8.5); auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); // probably find better name to differentiate the cut from the variable @@ -371,7 +378,7 @@ struct lambdakzeroBuilder { continue; } - //Passes radius check + // Passes radius check registry.fill(HIST("hV0Criteria"), 9.5); MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "in builder 1, keeping K0S candidate: posTrack --> " << labelPos << ", negTrack --> " << labelNeg); @@ -428,7 +435,7 @@ struct lambdakzeroBuilder { #endif MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "V0 builder: found K0S from Lc, posTrack --> " << labelPos << ", negTrack --> " << labelNeg); - //value 0.5: any considered V0 + // value 0.5: any considered V0 registry.fill(HIST("hV0Criteria"), 0.5); if (isRun2) { if (!(V0.posTrack_as().trackType() & o2::aod::track::TPCrefit)) { @@ -442,7 +449,7 @@ struct lambdakzeroBuilder { continue; // TPC refit } } - //Passes TPC refit + // Passes TPC refit registry.fill(HIST("hV0Criteria"), 1.5); if (V0.posTrack_as().tpcNClsCrossedRows() < mincrossedrows) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has " << V0.posTrack_as().tpcNClsCrossedRows() << " crossed rows, cut at " << mincrossedrows); @@ -454,7 +461,7 @@ struct lambdakzeroBuilder { v0dataLink(-1); continue; } - //passes crossed rows + // passes crossed rows registry.fill(HIST("hV0Criteria"), 2.5); if (fabs(V0.posTrack_as().dcaXY()) < dcapostopv) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has dcaXY " << V0.posTrack_as().dcaXY() << " , cut at " << dcanegtopv); @@ -467,7 +474,7 @@ struct lambdakzeroBuilder { continue; } MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "Filling good indices: posTrack --> " << labelPos << ", negTrack --> " << labelNeg); - //passes DCAxy + // passes DCAxy registry.fill(HIST("hV0Criteria"), 3.5); // Candidate building part @@ -492,7 +499,7 @@ struct lambdakzeroBuilder { continue; } - //passes diff coll check + // passes diff coll check registry.fill(HIST("hV0Criteria"), 4.5); // Act on copies for minimization @@ -507,7 +514,7 @@ struct lambdakzeroBuilder { continue; } - //passes V0 fitter minimization successfully + // passes V0 fitter minimization successfully registry.fill(HIST("hV0Criteria"), 5.5); double finalXpos = fitter.getTrack(0).getX(); @@ -533,7 +540,7 @@ struct lambdakzeroBuilder { continue; } - //Passes step 2 of V0 fitter + // Passes step 2 of V0 fitter registry.fill(HIST("hV0Criteria"), 6.5); pTrack.getPxPyPzGlo(pvec0); @@ -553,7 +560,7 @@ struct lambdakzeroBuilder { continue; } - //Passes DCA between daughters check + // Passes DCA between daughters check registry.fill(HIST("hV0Criteria"), 7.5); auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); @@ -563,7 +570,7 @@ struct lambdakzeroBuilder { continue; } - //Passes CosPA check + // Passes CosPA check registry.fill(HIST("hV0Criteria"), 8.5); auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); // probably find better name to differentiate the cut from the variable @@ -573,7 +580,7 @@ struct lambdakzeroBuilder { continue; } - //Passes radius check + // Passes radius check registry.fill(HIST("hV0Criteria"), 9.5); MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "in builder 1, keeping K0S candidate: posTrack --> " << labelPos << ", negTrack --> " << labelNeg); diff --git a/PWGLF/TableProducer/lambdakzerofinder.cxx b/PWGLF/TableProducer/lambdakzerofinder.cxx index 784dcfc9724..64b3eac95ac 100644 --- a/PWGLF/TableProducer/lambdakzerofinder.cxx +++ b/PWGLF/TableProducer/lambdakzerofinder.cxx @@ -251,7 +251,7 @@ struct lambdakzerofinder { } }; -struct lambdakzerofinderQA { +struct lambdakzerofinderQa { // Basic checks // Selection criteria Configurable v0cospa{"v0cospa", 0.998, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) @@ -277,11 +277,51 @@ struct lambdakzerofinderQA { }, }; + void init(InitContext const&) + { + if (doprocessRun3 && doprocessRun2) { + LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); + } + if (!doprocessRun3 && !doprocessRun2) { + LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); + } + } + Filter preFilterV0 = nabs(aod::v0data::dcapostopv) > dcapostopv&& nabs(aod::v0data::dcanegtopv) > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau; /// Connect to V0Data: newly indexed, note: V0Datas table incompatible with standard V0 table! - void process(soa::Join::iterator const& collision, - soa::Filtered const& fullV0s) + void processRun3(soa::Join::iterator const& collision, + soa::Filtered const& fullV0s) + { + if (!collision.sel8()) { + return; + } + + Long_t lNCand = 0; + for (auto& v0 : fullV0s) { + if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + registry.fill(HIST("hV0Radius"), v0.v0radius()); + registry.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); + registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); + registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); + + if (TMath::Abs(v0.yLambda()) < 0.5) { + registry.fill(HIST("h3dMassLambda"), collision.centFV0A(), v0.pt(), v0.mLambda()); + registry.fill(HIST("h3dMassAntiLambda"), collision.centFV0A(), v0.pt(), v0.mAntiLambda()); + } + if (TMath::Abs(v0.yK0Short()) < 0.5) { + registry.fill(HIST("h3dMassK0Short"), collision.centFV0A(), v0.pt(), v0.mK0Short()); + } + lNCand++; + } + } + registry.fill(HIST("hCandPerEvent"), lNCand); + } + PROCESS_SWITCH(lambdakzerofinderQa, processRun3, "Process Run 3 data", true); + + void processRun2(soa::Join::iterator const& collision, + soa::Filtered const& fullV0s) { if (!collision.alias()[kINT7]) { return; @@ -311,6 +351,7 @@ struct lambdakzerofinderQA { } registry.fill(HIST("hCandPerEvent"), lNCand); } + PROCESS_SWITCH(lambdakzerofinderQa, processRun2, "Process Run 2 data", false); }; /// Extends the v0data table with expression columns @@ -324,6 +365,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) return WorkflowSpec{ adaptAnalysisTask(cfgc, TaskName{"lf-lambdakzeroprefilter"}), adaptAnalysisTask(cfgc, TaskName{"lf-lambdakzerofinder"}), - adaptAnalysisTask(cfgc, TaskName{"lf-lambdakzerofinderQA"}), + adaptAnalysisTask(cfgc, TaskName{"lf-lambdakzerofinderQA"}), adaptAnalysisTask(cfgc, TaskName{"lf-lambdakzeroinitializer"})}; } diff --git a/PWGLF/Tasks/cascadeanalysis.cxx b/PWGLF/Tasks/cascadeanalysis.cxx index 38d1972dcaf..f3f74e9694f 100644 --- a/PWGLF/Tasks/cascadeanalysis.cxx +++ b/PWGLF/Tasks/cascadeanalysis.cxx @@ -53,7 +53,7 @@ using namespace o2::framework::expressions; using std::array; struct cascadeQa { - //Basic checks + // Basic checks HistogramRegistry registry{ "registry", { @@ -79,14 +79,14 @@ struct cascadeQa { void process(aod::Collision const& collision, aod::CascDataExt const& Cascades) { for (auto& casc : Cascades) { - if (casc.sign() < 0) { //FIXME: could be done better... + if (casc.sign() < 0) { // FIXME: could be done better... registry.fill(HIST("hMassXiMinus"), casc.mXi()); registry.fill(HIST("hMassOmegaMinus"), casc.mOmega()); } else { registry.fill(HIST("hMassXiPlus"), casc.mXi()); registry.fill(HIST("hMassOmegaPlus"), casc.mOmega()); } - //The basic eleven! + // The basic eleven! registry.fill(HIST("hV0Radius"), casc.v0radius()); registry.fill(HIST("hCascRadius"), casc.cascradius()); registry.fill(HIST("hV0CosPA"), casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); @@ -119,11 +119,18 @@ struct cascadeAnalysis { registry.add("h3dMassXiPlus", "h3dMassXiPlus", {HistType::kTH3F, {centAxis, ptAxis, massAxisXi}}); registry.add("h3dMassOmegaMinus", "h3dMassOmegaMinus", {HistType::kTH3F, {centAxis, ptAxis, massAxisOmega}}); registry.add("h3dMassOmegaPlus", "h3dMassOmegaPlus", {HistType::kTH3F, {centAxis, ptAxis, massAxisOmega}}); + + if (doprocessRun3 && doprocessRun2) { + LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); + } + if (!doprocessRun3 && !doprocessRun2) { + LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); + } } - //Selection criteria - Configurable v0cospa{"v0cospa", 0.999, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0) - Configurable casccospa{"casccospa", 0.999, "Casc CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0) + // Selection criteria + Configurable v0cospa{"v0cospa", 0.999, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) + Configurable casccospa{"casccospa", 0.999, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) Configurable dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"}; Configurable dcacascdau{"dcacascdau", .3, "DCA Casc Daughters"}; Configurable dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"}; @@ -145,13 +152,13 @@ struct cascadeAnalysis { return; } for (auto& casc : Cascades) { - //FIXME: dynamic columns cannot be filtered on? + // FIXME: dynamic columns cannot be filtered on? if (casc.v0radius() > v0radius && casc.cascradius() > cascradius && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()) > casccospa && casc.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv) { - if (casc.sign() < 0) { //FIXME: could be done better... + if (casc.sign() < 0) { // FIXME: could be done better... if (TMath::Abs(casc.yXi()) < 0.5) { registry.fill(HIST("h3dMassXiMinus"), 0., casc.pt(), casc.mXi()); } @@ -180,13 +187,13 @@ struct cascadeAnalysis { return; } for (auto& casc : Cascades) { - //FIXME: dynamic columns cannot be filtered on? + // FIXME: dynamic columns cannot be filtered on? if (casc.v0radius() > v0radius && casc.cascradius() > cascradius && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()) > casccospa && casc.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv) { - if (casc.sign() < 0) { //FIXME: could be done better... + if (casc.sign() < 0) { // FIXME: could be done better... if (TMath::Abs(casc.yXi()) < 0.5) { registry.fill(HIST("h3dMassXiMinus"), collision.centRun2V0M(), casc.pt(), casc.mXi()); } diff --git a/PWGLF/Tasks/lambdakzeroanalysis.cxx b/PWGLF/Tasks/lambdakzeroanalysis.cxx index 3c97d6e9841..3323a117d09 100644 --- a/PWGLF/Tasks/lambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/lambdakzeroanalysis.cxx @@ -55,7 +55,7 @@ using std::array; using MyTracks = soa::Join; struct lambdakzeroQa { - //Basic checks + // Basic checks HistogramRegistry registry{ "registry", { @@ -120,10 +120,17 @@ struct lambdakzeroAnalysis { registry.add("h3dMassK0ShortDca", "h3dMassK0ShortDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisK0Short}}); registry.add("h3dMassLambdaDca", "h3dMassLambdaDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisLambda}}); registry.add("h3dMassAntiLambdaDca", "h3dMassAntiLambdaDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisLambda}}); + + if (doprocessRun3 && doprocessRun2) { + LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); + } + if (!doprocessRun3 && !doprocessRun2) { + LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); + } } - //Selection criteria - Configurable v0cospa{"v0cospa", 0.995, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0) + // Selection criteria + Configurable v0cospa{"v0cospa", 0.995, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) Configurable dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"}; Configurable dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"}; Configurable dcapostopv{"dcapostopv", .1, "DCA Pos To PV"}; @@ -149,14 +156,14 @@ struct lambdakzeroAnalysis { registry.fill(HIST("hSelectedEventCounter"), 0.5); for (auto& v0 : fullV0s) { - //FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) + // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { if (TMath::Abs(v0.yLambda()) < rapidity) { if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kLambda0) < lifetimecut->get("lifetimecutLambda")) { // Lambda - if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S - registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); //collision.centV0M() instead of 0. once available + if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S + registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); // collision.centV0M() instead of 0. once available registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); if (saveDcaHist == 1) { registry.fill(HIST("h3dMassLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mLambda()); @@ -164,7 +171,7 @@ struct lambdakzeroAnalysis { } // AntiLambda - if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S + if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S registry.fill(HIST("h3dMassAntiLambda"), 0., v0.pt(), v0.mAntiLambda()); registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); if (saveDcaHist == 1) { @@ -174,7 +181,7 @@ struct lambdakzeroAnalysis { } } - //K0Short + // K0Short if (TMath::Abs(v0.yK0Short()) < rapidity) { if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kK0Short) < lifetimecut->get("lifetimecutK0S")) { if ((v0.qtarm() > paramArmenterosCut * TMath::Abs(v0.alpha())) || !boolArmenterosCut) { @@ -202,13 +209,13 @@ struct lambdakzeroAnalysis { registry.fill(HIST("hSelectedEventCounter"), 0.5); for (auto& v0 : fullV0s) { - //FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) + // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { if (TMath::Abs(v0.yLambda()) < rapidity) { if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kLambda0) < lifetimecut->get("lifetimecutLambda")) { // Lambda - if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S + if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S registry.fill(HIST("h3dMassLambda"), collision.centRun2V0M(), v0.pt(), v0.mLambda()); registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); if (saveDcaHist == 1) { @@ -217,7 +224,7 @@ struct lambdakzeroAnalysis { } // AntiLambda - if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S + if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S registry.fill(HIST("h3dMassAntiLambda"), collision.centRun2V0M(), v0.pt(), v0.mAntiLambda()); registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); if (saveDcaHist == 1) { @@ -227,7 +234,7 @@ struct lambdakzeroAnalysis { } } - //K0Short + // K0Short if (TMath::Abs(v0.yK0Short()) < rapidity) { if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kK0Short) < lifetimecut->get("lifetimecutK0S")) { if ((v0.qtarm() > paramArmenterosCut * v0.alpha()) || !boolArmenterosCut) { diff --git a/PWGLF/Tasks/lambdakzeroanalysisMC.cxx b/PWGLF/Tasks/lambdakzeroanalysisMC.cxx index 0c558e21097..a52c7e7870a 100644 --- a/PWGLF/Tasks/lambdakzeroanalysisMC.cxx +++ b/PWGLF/Tasks/lambdakzeroanalysisMC.cxx @@ -56,7 +56,7 @@ using std::array; using MyTracks = soa::Join; struct lambdakzeroQa { - //Basic checks + // Basic checks HistogramRegistry registry{ "registry", { @@ -69,6 +69,8 @@ struct lambdakzeroQa { {"hDCANegToPV", "hDCANegToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}}, {"hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {{1000, 0.0f, 10.0f, "cm^{2}"}}}}, {"hArmenterosPreAnalyserCuts", "hArmenterosPreAnalyserCuts", {HistType::kTH2F, {{1000, -1.0f, 1.0f, "#alpha"}, {1000, 0.0f, 0.30f, "#it{Q}_{T}"}}}}, + + {"hCollisionZ", "hCollisionZ", {HistType::kTH1F, {{3000, -30.0f, 30.0f, "cm"}}}}, }, }; @@ -84,6 +86,7 @@ struct lambdakzeroQa { void process(aod::Collision const& collision, aod::V0Datas const& fullV0s, aod::McParticles const& mcParticles, MyTracks const& tracks) { + registry.fill(HIST("hCollisionZ"), collision.posZ()); for (auto& v0 : fullV0s) { registry.fill(HIST("hMassK0Short"), v0.mK0Short()); registry.fill(HIST("hMassLambda"), v0.mLambda()); @@ -125,10 +128,10 @@ struct lambdakzeroAnalysisMc { HistogramRegistry registry{ "registry", { - {"h3dMassK0Short", "h3dMassK0Short", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 0.450f, 0.550f, "Inv. Mass (GeV/c^{2})"}}}}, + {"h3dMassK0Short", "h3dMassK0Short", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {400, 0.400f, 0.600f, "Inv. Mass (GeV/c^{2})"}}}}, {"h3dMassLambda", "h3dMassLambda", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, {"h3dMassAntiLambda", "h3dMassAntiLambda", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, - {"h3dMassK0Short_MC_truePt", "h3dMassK0Short_MC_truePt", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 0.450f, 0.550f, "Inv. Mass (GeV/c^{2})"}}}}, + {"h3dMassK0Short_MC_truePt", "h3dMassK0Short_MC_truePt", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {400, 0.400f, 0.600f, "Inv. Mass (GeV/c^{2})"}}}}, {"h3dMassLambda_MC_truePt", "h3dMassLambda_MC_truePt", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, {"h3dMassAntiLambda_MC_truePt", "h3dMassAntiLambda_MC_truePt", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, {"MCmomID_Lambda", "MCmomID_Lambda", {HistType::kTH1I, {{4000000, 0, 4000000}}}}, @@ -139,6 +142,7 @@ struct lambdakzeroAnalysisMc { {"hLambdaFeedDownMatrix", "hLambdaFeedDownMatrix", {HistType::kTH2F, {{200, 0.0f, 10.0f, "#it{p}_{T}^{#Lambda} (GeV/c)"}, {200, 0.0f, 10.0f, "#it{p}_{T}^{#Omega-} (GeV/c)"}}}}, {"hAntiLambdaFeedDownMatrix", "hAntiLambdaFeedDownMatrix", {HistType::kTH2F, {{200, 0.0f, 10.0f, "#it{p}_{T}^{#bar{#Lambda}} (GeV/c)"}, {200, 0.0f, 10.0f, "#it{p}_{T}^{#Omega+} (GeV/c)"}}}}, + {"hSel8Counter", "hSel8Counter", {HistType::kTH1F, {{1, 0.0f, 1.0f}}}}, {"hSelectedEventCounter", "hSelectedEventCounter", {HistType::kTH1F, {{1, 0.0f, 1.0f}}}}, {"hArmenterosPostAnalyserCuts", "hArmenterosPostAnalyserCuts", {HistType::kTH2F, {{1000, -1.0f, 1.0f, "#alpha"}, {1000, 0.0f, 0.30f, "#it{Q}_{T}"}}}}, @@ -149,11 +153,12 @@ struct lambdakzeroAnalysisMc { ConfigurableAxis dcaBinning{"dca-binning", {200, 0.0f, 1.0f}, ""}; ConfigurableAxis ptBinning{"pt-binning", {200, 0.0f, 10.0f}, ""}; - ConfigurableAxis massK0Shortbinning{"K0S-mass-binning", {200, 0.450f, 0.550f}, ""}; + ConfigurableAxis massK0Shortbinning{"K0S-mass-binning", {400, 0.400f, 0.600f}, ""}; ConfigurableAxis massLambdabinning{"Lambda-mass-binning", {200, 1.015f, 1.215f}, ""}; void init(InitContext const&) { + AxisSpec dcaAxis = {dcaBinning, "DCA (cm)"}; AxisSpec ptAxis = {ptBinning, "#it{p}_{T} (GeV/c)"}; AxisSpec massAxisK0Short = {massK0Shortbinning, "Inv. Mass (GeV/c^{2})"}; @@ -174,10 +179,17 @@ struct lambdakzeroAnalysisMc { registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(8, "K0S Rapidity"); registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(9, "K0S lifetime cut"); registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(10, "K0S Armenteros cut"); + + if (doprocessRun3 && doprocessRun2) { + LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); + } + if (!doprocessRun3 && !doprocessRun2) { + LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); + } } - //Selection criteria - Configurable v0cospa{"v0cospa", 0.995, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0) + // Selection criteria + Configurable v0cospa{"v0cospa", 0.995, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0) Configurable dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"}; Configurable dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"}; Configurable dcapostopv{"dcapostopv", .1, "DCA Pos To PV"}; @@ -188,6 +200,7 @@ struct lambdakzeroAnalysisMc { Configurable boolArmenterosCut{"boolArmenterosCut", true, "cut on Armenteros-Podolanski graph"}; Configurable paramArmenterosCut{"paramArmenterosCut", 0.2, "parameter Armenteros Cut"}; Configurable eventSelection{"eventSelection", true, "event selection"}; + Configurable eventSelection_posZ{"eventSelection_posZ", true, "event selection count post poZ cut"}; Configurable hasItsTest{"hasItsTest", false, "hasItsTest"}; @@ -202,6 +215,11 @@ struct lambdakzeroAnalysisMc { if (eventSelection && !collision.sel8()) { return; } + registry.fill(HIST("hSel8Counter"), 0.5); + + if (eventSelection_posZ && abs(collision.posZ()) > 10.f) { // 10cm + return; + } registry.fill(HIST("hSelectedEventCounter"), 0.5); for (auto& v0 : fullV0s) { @@ -215,6 +233,7 @@ struct lambdakzeroAnalysisMc { if (!reconegtrack.has_mcParticle() || !recopostrack.has_mcParticle()) { continue; } + auto mcnegtrack = reconegtrack.mcParticle_as(); auto mcpostrack = recopostrack.mcParticle_as(); @@ -223,8 +242,8 @@ struct lambdakzeroAnalysisMc { if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kLambda0) < lifetimecut->get("lifetimecutLambda")) { registry.fill(HIST("V0loopFiltersCounts"), 4.5); - //Lambda - if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePr<3 for pt>0.7GeV; and no cut on K0S + // Lambda + if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePr<3 for pt>0.7GeV; and no cut on K0S registry.fill(HIST("V0loopFiltersCounts"), 5.5); // registry.fill(HIST("h3dMassLambda"), collision.centV0M(), v0.pt(), v0.mLambda()); registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); @@ -240,7 +259,7 @@ struct lambdakzeroAnalysisMc { if (particleMotherOfNeg.has_mothers()) { auto particleGrandMothersOfNegTable = particleMotherOfNeg.mothers_as(); auto particleGrandMotherOfNeg = particleGrandMothersOfNegTable[0]; - if (particleGrandMotherOfNeg.pdgCode() == 3312) { + if (particleGrandMotherOfNeg.pdgCode() == 3312 || particleGrandMotherOfNeg.pdgCode() == 3322) { registry.fill(HIST("hLambdaFeedDownMatrix"), particleMotherOfNeg.pt(), particleGrandMotherOfNeg.pt()); } } @@ -257,7 +276,7 @@ struct lambdakzeroAnalysisMc { } // AntiLambda - if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePr<3 for pt>0.7GeV; and no cut on K0S + if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePr<3 for pt>0.7GeV; and no cut on K0S registry.fill(HIST("V0loopFiltersCounts"), 5.5); // registry.fill(HIST("h3dMassLambda"), collision.centV0M(), v0.pt(), v0.mLambda()); registry.fill(HIST("h3dMassAntiLambda"), 0., v0.pt(), v0.mAntiLambda()); @@ -273,7 +292,7 @@ struct lambdakzeroAnalysisMc { if (particleMotherOfNeg.has_mothers()) { auto particleGrandMothersOfNegTable = particleMotherOfNeg.mothers_as(); auto particleGrandMotherOfNeg = particleGrandMothersOfNegTable[0]; - if (particleGrandMotherOfNeg.pdgCode() == -3312) { + if (particleGrandMotherOfNeg.pdgCode() == -3312 || particleGrandMotherOfNeg.pdgCode() == -3322) { registry.fill(HIST("hAntiLambdaFeedDownMatrix"), particleMotherOfNeg.pt(), particleGrandMotherOfNeg.pt()); } } @@ -331,6 +350,11 @@ struct lambdakzeroAnalysisMc { if (eventSelection && !collision.sel7()) { return; } + registry.fill(HIST("hSel8Counter"), 0.5); + + if (eventSelection_posZ && abs(collision.posZ()) > 10.f) { // 10cm + return; + } registry.fill(HIST("hSelectedEventCounter"), 0.5); for (auto& v0 : fullV0s) { @@ -408,7 +432,7 @@ struct lambdakzeroAnalysisMc { }; struct lambdakzeroParticleCountMc { - //Basic checks + // Basic checks HistogramRegistry registry{ "registry", { @@ -419,9 +443,17 @@ struct lambdakzeroParticleCountMc { {"hLambdaCount_PtDiff", "hLambdaCount_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, {"hAntiLambdaCount_PtDiff", "hAntiLambdaCount_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, + {"hXsiPlusCount", "hXsiPlusCount", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}}, + {"hXsiMinusCount", "hXsiMinusCount", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}}, + {"hXsi0Count", "hXsi0Count", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}}, + {"hAntiXsi0Count", "hAntiXsi0Count", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}}, + {"hXsiPlusCount_PtDiff", "hXsiPlusCount_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, + {"hXsiMinusCount_PtDiff", "hXsiMinusCount_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, + {"hXsi0Count_PtDiff", "hXsi0Count_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, + {"hAntiXsi0Count_PtDiff", "hAntiXsi0Count_PtDiff", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}}, + {"hSelAndRecoMcCollCounter", "hSelAndRecoMcCollCounter", {HistType::kTH1F, {{1, 0.0f, 1.0f}}}}, {"hTotalMcCollCounter", "hTotalMcCollCounter", {HistType::kTH1F, {{1, 0.0f, 1.0f}}}}, - }, }; @@ -437,6 +469,7 @@ struct lambdakzeroParticleCountMc { Configurable rapidityMCcut{"rapidityMCcut", 0.5, "rapidity cut MC count"}; Configurable eventSelectionMC{"eventSelectionMC", true, "event selection MC count"}; + Configurable eventSelectionMC_posZ{"eventSelectionMC_posZ", true, "event selection MC count post poZ cut"}; void process(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups>& collisions) { @@ -452,6 +485,10 @@ struct lambdakzeroParticleCountMc { const auto evtReconstructedAndSelected = std::find(SelectedEvents.begin(), SelectedEvents.end(), mcCollision.globalIndex()) != SelectedEvents.end(); + if (eventSelectionMC_posZ && abs(mcCollision.posZ()) > 10.f) { // 10cm + return; + } + registry.fill(HIST("hTotalMcCollCounter"), 0.5); if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection return; @@ -497,6 +534,50 @@ struct lambdakzeroParticleCountMc { } } } + if (mcparticle.pdgCode() == 3312) { + registry.fill(HIST("hXsiMinusCount"), 0.5); + for (auto& mcparticleDaughter0 : mcparticle.daughters_as()) { + for (auto& mcparticleDaughter1 : mcparticle.daughters_as()) { + if (mcparticleDaughter0.pdgCode() == -211 && mcparticleDaughter1.pdgCode() == 3122) { + registry.fill(HIST("hXsiMinusCount"), 1.5); + registry.fill(HIST("hXsiMinusCount_PtDiff"), mcparticle.pt()); + } + } + } + } + if (mcparticle.pdgCode() == -3312) { + registry.fill(HIST("hXsiPlusCount"), 0.5); + for (auto& mcparticleDaughter0 : mcparticle.daughters_as()) { + for (auto& mcparticleDaughter1 : mcparticle.daughters_as()) { + if (mcparticleDaughter0.pdgCode() == 211 && mcparticleDaughter1.pdgCode() == -3122) { + registry.fill(HIST("hXsiPlusCount"), 1.5); + registry.fill(HIST("hXsiPlusCount_PtDiff"), mcparticle.pt()); + } + } + } + } + if (mcparticle.pdgCode() == 3322) { + registry.fill(HIST("hXsi0Count"), 0.5); + for (auto& mcparticleDaughter0 : mcparticle.daughters_as()) { + for (auto& mcparticleDaughter1 : mcparticle.daughters_as()) { + if (mcparticleDaughter0.pdgCode() == 111 && mcparticleDaughter1.pdgCode() == 3122) { // right + registry.fill(HIST("hXsi0Count"), 1.5); + registry.fill(HIST("hXsi0Count_PtDiff"), mcparticle.pt()); + } + } + } + } + if (mcparticle.pdgCode() == -3322) { + registry.fill(HIST("hAntiXsi0Count"), 0.5); + for (auto& mcparticleDaughter0 : mcparticle.daughters_as()) { + for (auto& mcparticleDaughter1 : mcparticle.daughters_as()) { + if (mcparticleDaughter0.pdgCode() == 111 && mcparticleDaughter1.pdgCode() == -3122) { + registry.fill(HIST("hAntiXsi0Count"), 1.5); + registry.fill(HIST("hAntiXsi0Count_PtDiff"), mcparticle.pt()); + } + } + } + } } } }