Skip to content

Commit d3fb7ed

Browse files
authored
Update PiDeuteronFemto.cxx
add function of computing kstar and switch of fill table
1 parent a093163 commit d3fb7ed

File tree

1 file changed

+94
-4
lines changed

1 file changed

+94
-4
lines changed

PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ struct PiDeuteronFemto {
152152
Configurable<float> settingCutVertex{"settingCutVertex", 10.0f, "Accepted z-vertex range"};
153153
Configurable<float> settingCutPinMinDe{"settingCutPinMinDe", 0.0f, "Minimum Pin for De"};
154154
Configurable<float> settingCutEta{"settingCutEta", 0.8f, "Eta cut on daughter track"};
155-
Configurable<float> settingCutDCAxy{"settingCutDCAxy", 2.0f, "DCAxy range for tracks"};
156-
Configurable<float> settingCutDCAz{"settingCutDCAz", 2.0f, "DCAz range for tracks"};
157155
Configurable<float> settingCutChi2tpcLow{"settingCutChi2tpcLow", 0.0f, "Low cut on TPC chi2"};
158156
Configurable<float> settingCutChi2tpcHigh{"settingCutChi2tpcHigh", 999.f, "High cut on TPC chi2"};
159157
Configurable<float> settingCutInvMass{"settingCutInvMass", 0.0f, "Invariant mass upper limit"};
@@ -170,6 +168,18 @@ struct PiDeuteronFemto {
170168
Configurable<float> settingCutNsigmaTOFTPCPi{"settingCutNsigmaTOFTPCPi", 3.0f, "Value of the Pion TOF TPC Nsigma cut"};
171169
Configurable<int> settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"};
172170
Configurable<bool> settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"};
171+
172+
Configurable<bool> settingFillTable{"settingFillTable", false, "Enable table filling"};
173+
Configurable<float> settingCutPiptMin{"settingCutPiptMin", 0.14f, "Minimum PT cut on Pi"};
174+
Configurable<float> settingCutPiptMax{"settingCutPiptMax", 4.0f, "Maximum PT cut on Pi"};
175+
Configurable<float> settingCutDeptMin{"settingCutDeptMin", 0.6f, "Minimum PT cut on De"};
176+
Configurable<float> settingCutDeptMax{"settingCutDeptMax", 1.6f, "Maximum PT cut on De"};
177+
Configurable<float> settingCutPiDCAxyMin{"settingCutPiDCAxyMin", 0.3f, "DCAxy Min for Pi"};
178+
Configurable<float> settingCutPiDCAzMin{"settingCutPiDCAzMin", 0.3f, "DCAz Min for Pi"};
179+
Configurable<float> settingCutDeDCAzMin{"settingCutDeDCAzMin", 0.2f, "DCAxy Min for De"};
180+
Configurable<float> settingCutNsigTPCPrMin{"settingCutNsigTPCPrMin", 3.0f, "Minimum TPC Pr Nsigma cut on Pi"};
181+
Configurable<float> settingCutNsigTOFPrMin{"settingCutNsigTOFPrMin", 3.0f, "Minimum TOF Pr Nsigma cut on Pi"};
182+
173183
Configurable<bool> settingSaveUSandLS{"settingSaveUSandLS", true, "Save All Pairs"};
174184
Configurable<bool> settingFillMultiplicity{"settingFillMultiplicity", false, "Fill multiplicity table"};
175185

@@ -237,6 +247,11 @@ struct PiDeuteronFemto {
237247
{"h2NsigmaPiTPC_preselection", "NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
238248
{"h2NsigmaPiTOF", "NsigmaPi TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}},
239249
{"h2NsigmaPiTOF_preselection", "NsigmaPi TOF distribution; #iit{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
250+
{"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
251+
{"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
252+
{"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
253+
{"hkStar_US_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
254+
{"hisBkgEM", "; isBkgEM;", {HistType::kTH1F, {{3, -1, 2}}}}
240255
},
241256
OutputObjHandlingPolicy::AnalysisObject,
242257
false,
@@ -683,6 +698,75 @@ struct PiDeuteronFemto {
683698
mQaRegistry.fill(HIST("hdcazDe"), piDecand.dcazDe);
684699
mQaRegistry.fill(HIST("hNClsDeITS"), piDecand.nClsItsDe);
685700
mQaRegistry.fill(HIST("hNClsPiITS"), piDecand.nClsItsPi);
701+
mQaRegistry.fill(HIST("hisBkgEM"), piDecand.isBkgEM);
702+
}
703+
704+
double computePrTPCnsig(double InnerParamTPCHad, double SignalTPCHad){
705+
double m_BBparamsProton[6] = {-54.42066571222577, 0.2857381250239097, 1.247140602468868, 0.6297483918147729, 2.985438833884555, 0.09};
706+
707+
float TPCinnerParam = InnerParamTPCHad;
708+
float expTPCSignal = o2::tpc::BetheBlochAleph((TPCinnerParam / 0.9382721), m_BBparamsProton[0], m_BBparamsProton[1], m_BBparamsProton[2], m_BBparamsProton[3], m_BBparamsProton[4]);
709+
double resoTPC{expTPCSignal * m_BBparamsProton[5]};
710+
return ((SignalTPCHad - expTPCSignal) / resoTPC);
711+
}
712+
713+
double tofNSigmaCalculation(double MassTOFHad, double ptHad)
714+
{
715+
double fExpTOFMassHad = 0.9487; // Proton mass in TOF
716+
const float kp0 = 1.22204e-02;
717+
const float kp1 = 7.48467e-01;
718+
719+
double fSigmaTOFMassHad = (kp0 * TMath::Exp(kp1 * TMath::Abs(ptHad))) * fExpTOFMassHad;
720+
double fNSigmaTOFHad = (MassTOFHad - fExpTOFMassHad) / fSigmaTOFMassHad;
721+
return fNSigmaTOFHad;
722+
}
723+
724+
double computeKstar(const PiDecandidate& piDecand)
725+
{
726+
TLorentzVector he3, hadron;
727+
float massHe3 = 2.80839;
728+
float massHad = 0.1395704;
729+
he3.SetPtEtaPhiM(abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massHe3);
730+
hadron.SetPtEtaPhiM(abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad);
731+
732+
TLorentzVector p_total_lab = he3 + hadron;
733+
TVector3 v_cm = p_total_lab.BoostVector();
734+
TLorentzVector p1_cm = he3;
735+
TLorentzVector p2_cm = hadron;
736+
p1_cm.Boost(-v_cm);
737+
p2_cm.Boost(-v_cm);
738+
TLorentzVector p_diff_cm = p1_cm - p2_cm;
739+
double kStar = sqrt(p_diff_cm.X() * p_diff_cm.X() + p_diff_cm.Y() * p_diff_cm.Y() + p_diff_cm.Z() * p_diff_cm.Z());
740+
return kStar / 2.0;
741+
}
742+
743+
void fillKstar(const PiDecandidate& piDecand)
744+
{
745+
double PrTPCnsigma = computePrTPCnsig(piDecand.momPiTPC, piDecand.tpcSignalPi);
746+
double PrTOFnsigma = tofNSigmaCalculation(piDecand.massTOFPi, piDecand.recoPtPi());
747+
if(abs(PrTPCnsigma) < settingCutNsigTPCPrMin) return;
748+
if(abs(PrTOFnsigma) < settingCutNsigTOFPrMin) return;
749+
float DeDCAxyMin = 0.015 + 0.0305 / TMath::Power(piDecand.recoPtDe(),1.1);
750+
if (abs(piDecand.dcaxyDe) > DeDCAxyMin || abs(piDecand.dcazDe) > settingCutDeDCAzMin || abs(piDecand.dcaxyPi) > settingCutPiDCAxyMin || abs(piDecand.dcazPi) > settingCutPiDCAzMin) return;
751+
if (std::abs(piDecand.recoPtPi()) < settingCutPiptMin || std::abs(piDecand.recoPtPi()) > settingCutPiptMax) return;
752+
if (std::abs(piDecand.recoPtDe()) < settingCutDeptMin || std::abs(piDecand.recoPtDe()) > settingCutDeptMax) return;
753+
754+
fillHistograms(piDecand);
755+
756+
double kstar = computeKstar(piDecand);
757+
if(piDecand.isBkgUS == 0){
758+
if(piDecand.recoPtDe() > 0){
759+
mQaRegistry.fill(HIST("hkStar_LS_M"), kstar);
760+
}else{
761+
mQaRegistry.fill(HIST("hkStar_LS_A"), kstar);
762+
}
763+
}else{
764+
if(piDecand.recoPtDe() > 0){
765+
mQaRegistry.fill(HIST("hkStar_US_M"), kstar);
766+
}else{
767+
mQaRegistry.fill(HIST("hkStar_US_A"), kstar);
768+
}
769+
}
686770
}
687771

688772
// ==================================================================================================================
@@ -700,9 +784,15 @@ struct PiDeuteronFemto {
700784
if (!fillCandidateInfo(deTrack, piTrack, collBracket, collisions, piDecand, tracks, isMixedEvent)) {
701785
continue;
702786
}
703-
fillHistograms(piDecand);
787+
788+
fillKstar(piDecand);
789+
704790
auto collision = collisions.rawIteratorAt(piDecand.collisionID);
705-
fillTable(piDecand, collision);
791+
792+
if(settingFillTable) {
793+
fillTable(piDecand, collision);
794+
}
795+
706796
}
707797
}
708798

0 commit comments

Comments
 (0)