Skip to content

Commit

Permalink
PWGEM/PhotonMeson: remove unnecessary min pin cut for eID (AliceO2Gro…
Browse files Browse the repository at this point in the history
…up#5621)

* PWGEM/PhotonMeson: remove unnecessary min pin cut for eID

* PWGEM/PhotonMeson: improve mixing event
  • Loading branch information
dsekihat authored Apr 15, 2024
1 parent e516373 commit 8605499
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 58 deletions.
8 changes: 4 additions & 4 deletions PWGEM/PhotonMeson/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ DalitzEECut* o2::aod::pwgem::photon::dalitzeecuts::GetCut(const char* cutName)
cut->SetMaxDcaZ(1.0);

// for PID
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly_lowB);
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly);
cut->SetTOFbetaRange(true, 0.0, 0.95);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetTPCNsigmaPiRange(0, 0);
Expand Down Expand Up @@ -540,14 +540,14 @@ DalitzEECut* o2::aod::pwgem::photon::dalitzeecuts::GetCut(const char* cutName)
if (nameStr.find("mee") != std::string::npos) { // for electron
if (nameStr.find("tpchadrejortofreq_lowB") != std::string::npos) {
// for PID
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq_lowB);
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq);
cut->SetTOFbetaRange(true, 0.0, 0.95);
cut->SetTPCNsigmaElRange(-2, +3);
cut->SetTOFNsigmaElRange(-3, +3);
cut->SetTPCNsigmaMuRange(-2, +2);
cut->SetTPCNsigmaPiRange(-3, +3);
cut->SetTPCNsigmaKaRange(-3, +3);
cut->SetTPCNsigmaPrRange(-3, +3);
cut->SetTOFNsigmaElRange(-3, +3);
cut->SetMuonExclusionTPC(true);
return cut;
} else if (nameStr.find("tpchadrejortofreq") != std::string::npos) {
Expand All @@ -562,7 +562,7 @@ DalitzEECut* o2::aod::pwgem::photon::dalitzeecuts::GetCut(const char* cutName)
return cut;
} else if (nameStr.find("tpconly_lowB") != std::string::npos) {
// for PID
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly_lowB);
cut->SetPIDScheme(DalitzEECut::PIDSchemes::kTPConly);
cut->SetTOFbetaRange(true, 0.0, 0.95);
cut->SetTPCNsigmaElRange(-2, +3);
cut->SetTPCNsigmaPiRange(-3, +3);
Expand Down
49 changes: 1 addition & 48 deletions PWGEM/PhotonMeson/Core/DalitzEECut.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,11 @@ class DalitzEECut : public TNamed

enum class PIDSchemes : int {
kUnDef = -1,
// for nominal B analysis
kTOFreq = 0,
kTPChadrej = 1,
kTPChadrejORTOFreq = 2,
kTPConly = 3,

// for low B analysis
kTOFreq_lowB = 4,
kTPChadrej_lowB = 5,
kTPChadrejORTOFreq_lowB = 6,
kTPConly_lowB = 7,
kMuon_lowB = 8,
kMuon_lowB = 4,
};

template <class TLeg, typename TPair>
Expand Down Expand Up @@ -223,18 +216,6 @@ class DalitzEECut : public TNamed
case PIDSchemes::kTPConly:
return PassTPConly(track);

case PIDSchemes::kTOFreq_lowB:
return PassTOFreq(track);

case PIDSchemes::kTPChadrej_lowB:
return PassTPChadrej_lowB(track);

case PIDSchemes::kTPChadrejORTOFreq_lowB:
return PassTPChadrej_lowB(track) || PassTOFreq_lowB(track);

case PIDSchemes::kTPConly_lowB:
return PassTPConly_lowB(track);

case PIDSchemes::kMuon_lowB:
return PassMuon_lowB(track);

Expand Down Expand Up @@ -274,34 +255,6 @@ class DalitzEECut : public TNamed
return is_el_included_TPC && is_pi_excluded_TPC;
}

template <typename T>
bool PassTOFreq_lowB(T const& track) const
{
bool is_el_included_TPC = mMinTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < mMaxTPCNsigmaEl;
bool is_pi_excluded_TPC = track.tpcInnerParam() < 0.4 ? true : (track.tpcNSigmaPi() < mMinTPCNsigmaPi || mMaxTPCNsigmaPi < track.tpcNSigmaPi());
bool is_el_included_TOF = mMinTOFNsigmaEl < track.tofNSigmaEl() && track.tofNSigmaEl() < mMaxTOFNsigmaEl;
return is_el_included_TPC && is_pi_excluded_TPC && is_el_included_TOF;
}

template <typename T>
bool PassTPChadrej_lowB(T const& track) const
{
bool is_el_included_TPC = mMinTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < mMaxTPCNsigmaEl;
bool is_mu_excluded_TPC = mMuonExclusionTPC ? track.tpcNSigmaMu() < mMinTPCNsigmaMu || mMaxTPCNsigmaMu < track.tpcNSigmaMu() : true;
bool is_pi_excluded_TPC = track.tpcInnerParam() < 0.4 ? true : (track.tpcNSigmaPi() < mMinTPCNsigmaPi || mMaxTPCNsigmaPi < track.tpcNSigmaPi());
bool is_ka_excluded_TPC = track.tpcNSigmaKa() < mMinTPCNsigmaKa || mMaxTPCNsigmaKa < track.tpcNSigmaKa();
bool is_pr_excluded_TPC = track.tpcNSigmaPr() < mMinTPCNsigmaPr || mMaxTPCNsigmaPr < track.tpcNSigmaPr();
return is_el_included_TPC && is_mu_excluded_TPC && is_pi_excluded_TPC && is_ka_excluded_TPC && is_pr_excluded_TPC;
}

template <typename T>
bool PassTPConly_lowB(T const& track) const
{
bool is_el_included_TPC = mMinTPCNsigmaEl < track.tpcNSigmaEl() && track.tpcNSigmaEl() < mMaxTPCNsigmaEl;
bool is_pi_excluded_TPC = track.tpcInnerParam() < 0.4 ? true : (track.tpcNSigmaPi() < mMinTPCNsigmaPi || mMaxTPCNsigmaPi < track.tpcNSigmaPi());
return is_el_included_TPC && is_pi_excluded_TPC;
}

template <typename T>
bool PassMuon_lowB(T const& track) const
{
Expand Down
13 changes: 13 additions & 0 deletions PWGEM/PhotonMeson/TableProducer/skimmerDalitzEE.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,19 @@ struct skimmerDalitzEE {
} // end of collision loop
}
PROCESS_SWITCH(skimmerDalitzEE, processCEFP, "Process dalitz ee for CEFP", false); // for central event filter processing

void processOnlyNee(soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent> const& collisions)
{
for (auto& collision : collisions) {
float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()};
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
event_nee(0, 0, 0);
continue;
}
event_nee(0, 0, 0);
} // end of collision loop
}
PROCESS_SWITCH(skimmerDalitzEE, processOnlyNee, "Process only nee", false); // for central event filter processing
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
16 changes: 15 additions & 1 deletion PWGEM/PhotonMeson/TableProducer/skimmerDalitzMuMu.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ struct skimmerDalitzMuMu {

Partition<MyTracks> posTracks = minpt < o2::aod::track::pt && o2::aod::track::pt < maxpt && nabs(o2::aod::track::eta) < maxeta && o2::aod::emprimarymuon::sign > 0 && minTPCNsigmaMu < o2::aod::pidtpc::tpcNSigmaMu&& o2::aod::pidtpc::tpcNSigmaMu < maxTPCNsigmaMu;
Partition<MyTracks> negTracks = minpt < o2::aod::track::pt && o2::aod::track::pt < maxpt && nabs(o2::aod::track::eta) < maxeta && o2::aod::emprimarymuon::sign < 0 && minTPCNsigmaMu < o2::aod::pidtpc::tpcNSigmaMu && o2::aod::pidtpc::tpcNSigmaMu < maxTPCNsigmaMu;
void process(MyCollisions const& collisions, MyTracks const& tracks)
void processAnalysis(MyCollisions const& collisions, MyTracks const& tracks)
{
for (auto& collision : collisions) {
float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()};
Expand All @@ -191,6 +191,20 @@ struct skimmerDalitzMuMu {
event_nmumu(npair_uls, npair_lspp, npair_lsmm);
} // end of collision loop
}
PROCESS_SWITCH(skimmerDalitzMuMu, processAnalysis, "Process dalitz mumu for analysis", true);

void processOnlyNmumu(soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent> const& collisions)
{
for (auto& collision : collisions) {
float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()};
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
event_nmumu(0, 0, 0);
continue;
}
event_nmumu(0, 0, 0);
} // end of collision loop
}
PROCESS_SWITCH(skimmerDalitzMuMu, processOnlyNmumu, "Process only nmumu", false); // for central event filter processing
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/PhotonMeson/Tasks/PhotonHBT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using namespace o2::soa;
using namespace o2::aod::photonpair;
using namespace o2::aod::pwgem::photon;

using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent, aod::EMEventsNgPCM>;
using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent, aod::EMEventsNgPCM, aod::EMEventsNee>;
using MyCollision = MyCollisions::iterator;

using MyV0Photons = soa::Join<aod::V0PhotonsKF, aod::V0KFEMEventIds>;
Expand Down Expand Up @@ -569,7 +569,7 @@ struct PhotonHBT {

Filter collisionFilter_common = nabs(o2::aod::collision::posZ) < 10.f && o2::aod::collision::numContrib > (uint16_t)0 && o2::aod::evsel::sel8 == true;
Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_subsys = (o2::aod::emevent::ngpcm >= 1);
Filter collisionFilter_subsys = ((o2::aod::emevent::ngpcm >= 1) && (o2::aod::emevent::neeuls >= 1)) || (o2::aod::emevent::ngpcm >= 2) || (o2::aod::emevent::neeuls >= 2);
using MyFilteredCollisions = soa::Filtered<MyCollisions>;

void processPCMPCM(MyCollisions const& collisions, MyFilteredCollisions const& filtered_collisions, MyV0Photons const& v0photons, aod::V0Legs const& legs)
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGamma.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using namespace o2::soa;
using namespace o2::aod::photonpair;
using namespace o2::aod::pwgem::photon;

using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent, aod::EMEventsNgPCM, aod::EMEventsNgPHOS, aod::EMEventsNgEMC>;
using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent, aod::EMEventsNgPCM, aod::EMEventsNgPHOS, aod::EMEventsNgEMC, aod::EMEventsNee>;
using MyCollision = MyCollisions::iterator;

using MyV0Photons = soa::Join<aod::V0PhotonsKF, aod::V0KFEMEventIds>;
Expand Down Expand Up @@ -645,7 +645,7 @@ struct Pi0EtaToGammaGamma {
Partition<MyCollisions> grouped_collisions = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); // this goes to same event.
Filter collisionFilter_common = nabs(o2::aod::collision::posZ) < 10.f && o2::aod::collision::numContrib > (uint16_t)0 && o2::aod::evsel::sel8 == true;
Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_subsys = (o2::aod::emevent::ngpcm >= 1) || (o2::aod::emevent::ngphos >= 1) || (o2::aod::emevent::ngemc >= 1);
Filter collisionFilter_subsys = (o2::aod::emevent::ngpcm >= 1) || (o2::aod::emevent::ngphos >= 1) || (o2::aod::emevent::ngemc >= 1) || (aod::emevent::neeuls >= 1);
using MyFilteredCollisions = soa::Filtered<MyCollisions>; // this goes to mixed event.

void processPCMPCM(MyCollisions const& collisions, MyFilteredCollisions const& filtered_collisions, MyV0Photons const& v0photons, aod::V0Legs const& legs)
Expand Down
2 changes: 1 addition & 1 deletion PWGEM/PhotonMeson/Tasks/TaggingPi0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ struct TaggingPi0 {
Partition<MyCollisions> grouped_collisions = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); // this goes to same event.
Filter collisionFilter_common = nabs(o2::aod::collision::posZ) < 10.f && o2::aod::collision::numContrib > (uint16_t)0 && o2::aod::evsel::sel8 == true;
Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_subsys = (o2::aod::emevent::ngpcm >= 1) || (o2::aod::emevent::ngphos >= 1) || (o2::aod::emevent::ngemc >= 1);
Filter collisionFilter_subsys = (o2::aod::emevent::ngpcm >= 1) && ((o2::aod::emevent::ngphos >= 1) || (o2::aod::emevent::ngemc >= 1) || (o2::aod::emevent::neeuls >= 1));
using MyFilteredCollisions = soa::Filtered<MyCollisions>;

Filter DalitzEEFilter = o2::aod::dalitzee::sign == 0; // analyze only uls
Expand Down

0 comments on commit 8605499

Please sign in to comment.