1111// / \file HFD0CandidateSelector.cxx
1212// / \brief Lc->pKpi selection task.
1313// /
14- // / \author Luigi Dello Stritto <luigi.dellostritto @cern.ch>, CERN
14+ // / \author Luigi Dello Stritto <luigi.dello.stritto @cern.ch>, University and INFN SALERNO
1515// / \author Nima Zardoshti <nima.zardoshti@cern.ch>, CERN
1616
1717#include " Framework/runDataProcessing.h"
@@ -27,19 +27,18 @@ static const int npTBins = 10;
2727static const int nCutVars = 8 ;
2828// temporary until 2D array in configurable is solved - then move to json
2929// m ptp ptk ptpi DCA sigmavtx dlenght cosp
30- constexpr double cuts[npTBins][nCutVars] = {{0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* pt<1 */
31- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 1<pt<2 */
32- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 2<pt<3 */
33- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 3<pt<4 */
34- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 4<pt<5 */
35- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 5<pt<6 */
36- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 6<pt<8 */
37- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 8<pt<12 */
38- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}, /* 12<pt<24 */
39- {0.5 , 0.2 , 0.2 , 0.2 , 0.05 , 0.09 , 0.005 , 0 .}}; /* 24<pt<36 */
30+ constexpr double cuts[npTBins][nCutVars] = {{0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* pt<1 */
31+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 1<pt<2 */
32+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 2<pt<3 */
33+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 3<pt<4 */
34+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 4<pt<5 */
35+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 5<pt<6 */
36+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 6<pt<8 */
37+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 8<pt<12 */
38+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}, /* 12<pt<24 */
39+ {0.400 , 0.4 , 0.4 , 0.4 , 0.05 , 0.09 , 0.005 , 0 .}}; /* 24<pt<36 */
4040
4141// / Struct for applying Lc selection cuts
42-
4342struct HFLcCandidateSelector {
4443
4544 Produces<aod::HFSelLcCandidate> hfSelLcCandidate;
@@ -107,15 +106,16 @@ struct HFLcCandidateSelector {
107106 if (candpT < d_pTCandMin || candpT >= d_pTCandMax) {
108107 return false ; // check that the candidate pT is within the analysis range
109108 }
109+
110110 if (hfCandProng3.cpa () <= cuts[pTBin][7 ]) {
111111 return false ; // cosine of pointing angle
112112 }
113- // if (hfCandProng3.dca() > cuts[pTBin][4]) return false; //candidate DCA
114- if (hfCandProng3.chi2PCA () > cuts[pTBin][5 ]) { // candidate DCA
113+
114+ /* if (hfCandProng3.chi2PCA() > cuts[pTBin][5]) { //candidate DCA
115115 return false;
116- }
116+ } */
117117
118- if (hfCandProng3.decayLength () * hfCandProng3. decayLength () < cuts[pTBin][ 6 ] * cuts[pTBin][6 ]) {
118+ if (hfCandProng3.decayLength () <= cuts[pTBin][6 ]) {
119119 return false ;
120120 }
121121 return true ;
@@ -126,7 +126,6 @@ struct HFLcCandidateSelector {
126126 // / \param trackProton is the track with the proton hypothesis
127127 // / \param trackPion is the track with the pion hypothesis
128128 // / \param trackKaon is the track with the kaon hypothesis
129- // / \note trackPion = positive and trackKaon = negative for D0 selection and inverse for D0bar
130129 // / \return true if candidate passes all cuts for the given Conjugate
131130 template <typename T1, typename T2>
132131 bool selectionTopolConjugate (const T1& hfCandProng3, const T2& trackProton, const T2& trackKaon, const T2& trackPion)
@@ -138,18 +137,19 @@ struct HFLcCandidateSelector {
138137 return false ;
139138 }
140139
141- // invariant mass cut
142- if (TMath::Abs (InvMassLc (hfCandProng3) - RecoDecay::getMassPDG (4122 )) > cuts[pTBin][0 ]) {
143- return false ;
144- }
145-
146- if (TMath::Abs (trackProton.pt ()) < TMath::Abs (cuts[pTBin][1 ]) || TMath::Abs (trackKaon.pt ()) < TMath::Abs (cuts[pTBin][2 ]) || TMath::Abs (trackPion.pt ()) < TMath::Abs (cuts[pTBin][3 ])) {
140+ if (trackProton.pt () < cuts[pTBin][1 ] || trackKaon.pt () < cuts[pTBin][2 ] || trackPion.pt () < cuts[pTBin][3 ]) {
147141 return false ; // cut on daughter pT
148142 }
149143
150- /* if (TMath::Sqrt( trackProton.dcaPrim0()*trackProton.dcaPrim0() + trackKaon.dcaPrim0()*trackKaon.dcaPrim0() + trackPion.dcaPrim0()*trackPion.dcaPrim0() ) > cuts[pTBin][5]) {
151- return false; //cut on daughter dca - need to add secondary vertex constraint here
152- }*/
144+ if (trackProton.globalIndex () == hfCandProng3.index0Id ()) {
145+ if (TMath::Abs (InvMassLcpKpi (hfCandProng3) - RecoDecay::getMassPDG (4122 )) > cuts[pTBin][0 ]) {
146+ return false ;
147+ }
148+ } else {
149+ if (TMath::Abs (InvMassLcpiKp (hfCandProng3) - RecoDecay::getMassPDG (4122 )) > cuts[pTBin][0 ]) {
150+ return false ;
151+ }
152+ }
153153
154154 return true ;
155155 }
@@ -190,17 +190,17 @@ struct HFLcCandidateSelector {
190190 template <typename T>
191191 bool selectionPIDTPC (const T& track, int nPDG, int nSigmaCut)
192192 {
193- double nSigma = 100 .0 ; // arbitarily large value
193+ double nSigma = 1 .0 ; // arbitarily large value
194194 nPDG = TMath::Abs (nPDG);
195- if (nPDG == 2212 ) {
195+ /* if (nPDG == 2212) {
196196 nSigma = track.tpcNSigmaPr();
197197 } else if (nPDG == 321) {
198198 nSigma = track.tpcNSigmaKa();
199199 } else if (nPDG == 111) {
200200 nSigma = track.tpcNSigmaPi();
201201 } else {
202202 return false;
203- }
203+ } */
204204 return nSigma < nSigmaCut;
205205 }
206206
@@ -213,17 +213,17 @@ struct HFLcCandidateSelector {
213213 template <typename T>
214214 bool selectionPIDTOF (const T& track, int nPDG, int nSigmaCut)
215215 {
216- double nSigma = 100.0 ; // arbitarily large value
216+ double nSigma = 1 . ; // arbitarily large value
217217 nPDG = TMath::Abs (nPDG);
218- if (nPDG == 2212 ) {
218+ /* if (nPDG == 2212) {
219219 nSigma = track.tofNSigmaPr();
220220 } else if (nPDG == 321) {
221221 nSigma = track.tofNSigmaKa();
222222 } else if (nPDG == 321) {
223223 nSigma = track.tofNSigmaPi();
224224 } else {
225225 return false;
226- }
226+ } */
227227 return nSigma < nSigmaCut;
228228 }
229229
@@ -279,42 +279,53 @@ struct HFLcCandidateSelector {
279279
280280 void process (aod::HfCandProng3 const & hfCandProng3s, aod::BigTracksPID const & tracks)
281281 {
282- int statusLc ; // final selection flag : 0-rejected 1-accepted
283- bool topolLc ;
282+ int statusLcpKpi, statusLcpiKp ; // final selection flag : 0-rejected 1-accepted
283+ bool topolLcpKpi, topolLcpiKp ;
284284 int pidLc, proton, kaonMinus, pionPlus;
285285
286286 for (auto & hfCandProng3 : hfCandProng3s) { // looping over 3 prong candidates
287287
288- auto trackPos1 = hfCandProng3. index0_as <aod::BigTracksPID>(); // positive daughter
289- auto trackNeg1 = hfCandProng3. index1_as <aod::BigTracksPID>(); // negative daughter
290- auto trackPos2 = hfCandProng3.index2_as <aod::BigTracksPID> (); // positive daughter
288+ statusLcpKpi = 0 ;
289+ statusLcpiKp = 0 ;
290+ int LcFlag = hfCandProng3.hfflag ();
291291
292- statusLc = 0 ;
293- topolLc = true ;
292+ if (!(LcFlag & 1 << 1 )) {
293+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp);
294+ continue ;
295+ }
296+
297+ auto trackPos1 = hfCandProng3.index0_as <aod::BigTracksPID>(); // positive daughter (negative for the antiparticles)
298+ auto trackNeg1 = hfCandProng3.index1_as <aod::BigTracksPID>(); // negative daughter (positive for the antiparticles)
299+ auto trackPos2 = hfCandProng3.index2_as <aod::BigTracksPID>(); // positive daughter (negative for the antiparticles)
300+
301+ topolLcpKpi = true ;
302+ topolLcpiKp = true ;
294303 pidLc = -1 ;
295304 proton = -1 ;
296305 kaonMinus = -1 ;
297306 pionPlus = -1 ;
298307
299308 // daughter track validity selection
300309 if (!daughterSelection (trackPos1) || !daughterSelection (trackNeg1) || !daughterSelection (trackPos2)) {
301- hfSelLcCandidate (statusLc );
310+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp );
302311 continue ;
303312 }
304313
305314 // implement filter bit 4 cut - should be done before this task at the track selection level
306315
307316 // conjugate independent topological selection
308317 if (!selectionTopol (hfCandProng3)) {
309- hfSelLcCandidate (statusLc );
318+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp );
310319 continue ;
311320 }
312321
313322 // conjugate dependent toplogical selection for Lc
314- topolLc = selectionTopolConjugate (hfCandProng3, trackPos1, trackNeg1, trackPos2);
315323
316- if (!topolLc) {
317- hfSelLcCandidate (statusLc);
324+ topolLcpKpi = selectionTopolConjugate (hfCandProng3, trackPos1, trackNeg1, trackPos2);
325+ topolLcpiKp = selectionTopolConjugate (hfCandProng3, trackPos2, trackNeg1, trackPos1);
326+
327+ if (!topolLcpKpi && !topolLcpiKp) {
328+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp);
318329 continue ;
319330 }
320331
@@ -330,15 +341,18 @@ struct HFLcCandidateSelector {
330341 }
331342
332343 if (pidLc == 0 ) {
333- hfSelLcCandidate (statusLc );
344+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp );
334345 continue ;
335346 }
336347
337- if ((pidLc == -1 || pidLc == 1 ) && topolLc) {
338- statusLc = 1 ; // identified as Lc
348+ if ((pidLc == -1 || pidLc == 1 ) && topolLcpKpi) {
349+ statusLcpKpi = 1 ; // identified as Lc
350+ }
351+ if ((pidLc == -1 || pidLc == 1 ) && topolLcpiKp) {
352+ statusLcpiKp = 1 ; // identified as Lc
339353 }
340354
341- hfSelLcCandidate (statusLc );
355+ hfSelLcCandidate (statusLcpKpi, statusLcpiKp );
342356 }
343357 }
344358};
0 commit comments