Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Prev Previous commit
Next Next commit
MultF0 and PrimariesForINELgt0
1. Chiara's suggestion to have isFT0MforMC configurable was implemented
2. check for primaries via DCAs was implemented in isINELgt0 function (for rec.), corresponding configurables and QA histo were added
  • Loading branch information
nepeivodaRS committed Jun 8, 2023
commit 1006e558d2bfeec68460126a87d4bce0876170f5
6 changes: 4 additions & 2 deletions PWGLF/Tasks/cascpostprocessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ struct cascpostprocessing {
Configurable<float> bachBaryonCosPA{"bachBaryonCosPA", 0.9999, "Bachelor baryon CosPA"};
Configurable<float> bachBaryonDCAxyToPV{"bachBaryonDCAxyToPV", 0.05, "DCA bachelor baryon to PV"};

Configurable<bool> isFT0MforMC{"isFT0MforMC", 0, "Fill with FT0M information or 0s"};

HistogramRegistry registry{"registryts"};

void init(InitContext const&)
Expand Down Expand Up @@ -485,15 +487,15 @@ struct cascpostprocessing {

if (candidate.sign() < 0) {
if (isCorrectlyRec) {
registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, 0);
registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, (isFT0MforMC ? candidate.multFT0M() : 0));
}
registry.fill(HIST("hCascMinusInvMassvsPt"), candidate.pt(), invmass);
registry.fill(HIST("hCascMinusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass);
registry.fill(HIST("hCascMinusInvMassvsPt_FV0A"), candidate.multFV0A(), candidate.pt(), invmass);
}
if (candidate.sign() > 0) {
if (isCorrectlyRec) {
registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, 0);
registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, (isFT0MforMC ? candidate.multFT0M() : 0));
}
registry.fill(HIST("hCascPlusInvMassvsPt"), candidate.pt(), invmass);
registry.fill(HIST("hCascPlusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass);
Expand Down
101 changes: 59 additions & 42 deletions PWGLF/Tasks/cascqaanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct cascqaanalysis {

void init(InitContext const&)
{
TString CandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"};
TString hCandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"};
TString hNEventsMCLabels[4] = {"All", "z vrtx", "INEL>0", "Associated with rec. collision"};
TString hNEventsLabels[4] = {"All", "sel8", "z vrtx", "INEL>0"};

Expand Down Expand Up @@ -157,12 +157,16 @@ struct cascqaanalysis {

registry.add("hCandidateCounter", "hCandidateCounter", {HistType::kTH1F, {{5, 0.0f, 5.0f}}});
for (Int_t n = 1; n <= registry.get<TH1>(HIST("hCandidateCounter"))->GetNbinsX(); n++) {
registry.get<TH1>(HIST("hCandidateCounter"))->GetXaxis()->SetBinLabel(n, CandidateCounterLabels[n - 1]);
registry.get<TH1>(HIST("hCandidateCounter"))->GetXaxis()->SetBinLabel(n, hCandidateCounterLabels[n - 1]);
}

AxisSpec allTracks = {2000, 0, 2000, "N_{all tracks}"};
AxisSpec secondaryTracks = {2000, 0, 2000, "N_{secondary tracks}"};
registry.add("hINELgt0PrimariesSelection", "hINELgt0PrimariesSelection", {HistType::kTH2F, {allTracks, secondaryTracks}});
}

// Event selection criteria
Configurable<float> cutzvertex{"cutzvertex", 15.0f, "Accepted z-vertex range (cm)"};
Configurable<float> cutzvertex{"cutzvertex", 20.0f, "Accepted z-vertex range (cm)"};
Configurable<bool> sel8{"sel8", 1, "Apply sel8 event selection"};
Configurable<bool> INELgt0{"INELgt0", 1, "Apply INEL>0 selection"};

Expand All @@ -179,6 +183,11 @@ struct cascqaanalysis {
Configurable<float> cascradius{"cascradius", 0.0, "Casc Radius"};
Configurable<float> etadau{"etadau", 0.8, "Eta Daughters"};

Configurable<float> maxDCANsigmaScaling{"DCANsigmaScaling", 1.0f, "N of 7*sigma scaling factor for DCA to select primaries"};
Configurable<float> DCASigma{"DCASigma", 0.004f, "7*sigma for DCA"};
Configurable<float> DCAPtScaling{"DCAPtScaling", 0.013f, "pt scaling for DCA"};
Configurable<float> maxDCAz{"DCAz", 0.5f, "DCA z cut to select primaries"};

TRandom* fRand = new TRandom();

Filter preFilter =
Expand Down Expand Up @@ -212,17 +221,61 @@ struct cascqaanalysis {
}
}

template <typename TCollision, typename TTracks>
bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA)
{
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 0.5);
}
// Event selection if required
if (sel8 && !collision.sel8()) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 1.5);
}

if (TMath::Abs(collision.posZ()) > cutzvertex) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 2.5);
}

if (INELgt0 && !isINELgt0(tracks, isFillEventSelectionQA)) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 3.5);
}

if (isFillEventSelectionQA) {
registry.fill(HIST("hZCollision"), collision.posZ());
registry.fill(HIST("hCentFT0M"), collision.centFT0M());
registry.fill(HIST("hCentFV0A"), collision.centFV0A());
}
return true;
}

template <typename TTracks>
bool isINELgt0(TTracks tracks)
bool isINELgt0(TTracks tracks, bool isFillEventSelectionQA)
{
// INEL > 0 (at least 1 charged track in |eta| < 1.0)
// TO DO: check for primary via DCA
std::vector<float> TracksEta(tracks.size());
int nTracks = 0;
int nRejTracks = 0;
for (const auto& track : tracks) {
if(TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling*DCASigma + DCAPtScaling/track.pt()) || TMath::Abs(track.dcaZ()) > maxDCAz) {
nRejTracks++;
continue; // consider only primaries
}
TracksEta[nTracks++] = track.eta();
}

if(isFillEventSelectionQA){
registry.fill(HIST("hINELgt0PrimariesSelection"), tracks.size(), nRejTracks);
}

auto etaConditionFunc = [](float elem) {
return TMath::Abs(elem) < 1.0;
};
Expand Down Expand Up @@ -280,42 +333,6 @@ struct cascqaanalysis {
}
}

template <typename TCollision, typename TTracks>
bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA)
{
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 0.5);
}
// Event selection if required
if (sel8 && !collision.sel8()) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 1.5);
}

if (TMath::Abs(collision.posZ()) > cutzvertex) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 2.5);
}

if (INELgt0 && !isINELgt0(tracks)) {
return false;
}
if (isFillEventSelectionQA) {
registry.fill(HIST("hNEvents"), 3.5);
}

if (isFillEventSelectionQA) {
registry.fill(HIST("hZCollision"), collision.posZ());
registry.fill(HIST("hCentFT0M"), collision.centFT0M());
registry.fill(HIST("hCentFV0A"), collision.centFV0A());
}
return true;
}

void processData(soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::CentFV0As>::iterator const& collision,
soa::Filtered<aod::CascDataExt> const& Cascades,
aod::V0sLinked const&,
Expand Down Expand Up @@ -470,7 +487,7 @@ struct cascqaanalysis {
void processMCgen(aod::McCollision const& mcCollision,
aod::McParticles const& mcParticles,
const soa::SmallGroups<o2::soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels, o2::aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::CentFV0As>>& collisions,
aod::Tracks const& Tracks)
DauTracks const& Tracks)
{
// All generated collisions
registry.fill(HIST("hNEventsMC"), 0.5);
Expand Down