10 #include <hlt/softwaretrigger/calculations/SkimSampleCalculator.h>
11 #include <hlt/softwaretrigger/calculations/utilities.h>
12 #include <analysis/utility/PCmsLabTransform.h>
13 #include <analysis/ClusterUtility/ClusterUtils.h>
14 #include <analysis/dataobjects/Particle.h>
15 #include <mdst/dataobjects/KLMCluster.h>
16 #include <mdst/dataobjects/Track.h>
17 #include <analysis/utility/ReferenceFrame.h>
18 #include <mdst/dataobjects/TrackFitResult.h>
19 #include <mdst/dataobjects/HitPatternCDC.h>
20 #include <reconstruction/dataobjects/CDCDedxTrack.h>
21 #include <analysis/ContinuumSuppression/FoxWolfram.h>
23 #include <TDatabasePDG.h>
24 #include <analysis/variables/BelleVariables.h>
25 #include <analysis/variables/ECLVariables.h>
26 #include <mdst/dataobjects/PIDLikelihood.h>
27 #include <analysis/variables/AcceptanceVariables.h>
28 #include <analysis/variables/FlightInfoVariables.h>
29 #include <mdst/dataobjects/SoftwareTriggerResult.h>
32 using namespace SoftwareTrigger;
35 m_pionParticles(
"pi+:skim"), m_gammaParticles(
"gamma:skim"), m_pionHadParticles(
"pi+:hadb"), m_pionTauParticles(
"pi+:tau"),
36 m_KsParticles(
"K_S0:merged"), m_LambdaParticles(
"Lambda0:merged"), m_DstParticles(
"D*+:d0pi"), m_offIpParticles(
"pi+:offip"),
37 m_filterL1TrgNN(
"software_trigger_cut&filter&L1_trigger_nn_info")
60 getRho(gammaWithMaximumRho));
63 getRho(trackWithMaximumRho));
66 const double& rhoOfECLClusterWithSecondMaximumRho = getRhoOfECLClusterWithMaximumRhoBelow(
m_pionParticles,
68 rhoOfECLClusterWithMaximumRho);
70 const double& rhoOfTrackWithMaximumRho = getRho(trackWithMaximumRho);
71 const double& rhoOfTrackWithSecondMaximumRho = getRho(trackWithSecondMaximumRho);
72 const double& rhoOfGammaWithMaximumRho = getRho(gammaWithMaximumRho);
73 const double& rhoOfGammaWithSecondMaximumRho = getRho(gammaWithSecondMaximumRho);
77 calculationResult[
"EC1CMSLE"] = rhoOfECLClusterWithMaximumRho;
80 calculationResult[
"EC2CMSLE"] = rhoOfECLClusterWithSecondMaximumRho;
83 calculationResult[
"EC12CMSLE"] = rhoOfECLClusterWithMaximumRho + rhoOfECLClusterWithSecondMaximumRho;
95 calculationResult[
"P1CMSBhabhaLE"] = rhoOfTrackWithMaximumRho;
98 calculationResult[
"P1OEbeamCMSBhabhaLE"] = rhoOfTrackWithMaximumRho / BeamEnergyCMS();
101 calculationResult[
"P2CMSBhabhaLE"] = rhoOfTrackWithSecondMaximumRho;
104 calculationResult[
"P2OEbeamCMSBhabhaLE"] = rhoOfTrackWithSecondMaximumRho / BeamEnergyCMS();
107 calculationResult[
"P12CMSBhabhaLE"] = rhoOfTrackWithMaximumRho + rhoOfTrackWithSecondMaximumRho;
110 calculationResult[
"G1CMSBhabhaLE"] = rhoOfGammaWithMaximumRho;
112 calculationResult[
"G1OEbeamCMSBhabhaLE"] = rhoOfGammaWithMaximumRho / BeamEnergyCMS();
115 calculationResult[
"G2CMSBhabhaLE"] = rhoOfGammaWithSecondMaximumRho;
117 calculationResult[
"G2OEbeamCMSBhabhaLE"] = rhoOfGammaWithSecondMaximumRho / BeamEnergyCMS();
120 calculationResult[
"G12CMSBhabhaLE"] = rhoOfGammaWithMaximumRho + rhoOfGammaWithSecondMaximumRho;
122 calculationResult[
"G12OEbeamCMSBhabhaLE"] =
123 (rhoOfGammaWithMaximumRho + rhoOfGammaWithSecondMaximumRho) / BeamEnergyCMS();
128 if (gammaWithMaximumRho) {
129 calculationResult[
"ENeutralLE"] = getRho(gammaWithMaximumRho);
131 calculationResult[
"ENeutralLE"] = -1;
137 return particle.getECLCluster() != nullptr;
139 calculationResult[
"nECLMatchTracksLE"] = numberOfTracksWithECLMatch;
142 double neclClusters = -1.;
143 double eneclClusters = 0.;
147 double EsumGamma = 0.;
149 const unsigned int numberOfECLClusters = std::count_if(eclClusters.
begin(), eclClusters.
end(),
151 return (eclcluster.hasHypothesis(
152 ECLCluster::EHypothesisBit::c_nPhotons)
153 and eclcluster.getEnergy(
154 ECLCluster::EHypothesisBit::c_nPhotons) > 0.1);
156 neclClusters = numberOfECLClusters;
158 for (
int ncl = 0; ncl < eclClusters.
getEntries(); ncl++) {
162 if (!eclClusters[ncl]->getRelatedFrom<Track>()) {
165 EsumGamma += V4Gamma_CMS.E();
166 PzGamma += V4Gamma_CMS.Pz();
171 calculationResult[
"nECLClustersLE"] = neclClusters;
173 int nb2bcc_PhiHigh = 0;
174 int nb2bcc_PhiLow = 0;
177 for (
int i = 0; i < eclClusters.
getEntries() - 1; i++) {
181 double Eg1 = V4g1.E();
182 for (
int j = i + 1; j < eclClusters.
getEntries(); j++) {
186 double Eg2 = V4g2.E();
191 double deltphi = fabs(V3g1.DeltaPhi(V3g2) * 180. / 3.1415926);
192 double Tsum = Thetag1 + Thetag2;
193 if (deltphi > 170. && (Eg1 > 0.25 && Eg2 > 0.25)) nb2bcc_PhiHigh++;
194 if (deltphi > 170. && (Eg1 < 0.25 || Eg2 < 0.25)) nb2bcc_PhiLow++;
195 if (deltphi > 160. && (Tsum > 160. && Tsum < 200.)) nb2bcc_3D++;
199 calculationResult[
"nB2BCCPhiHighLE"] = nb2bcc_PhiHigh;
200 calculationResult[
"nB2BCCPhiLowLE"] = nb2bcc_PhiLow;
201 calculationResult[
"nB2BCC3DLE"] = nb2bcc_3D;
205 double angleGTLE = -10.;
206 if (gammaWithMaximumRho) {
207 const TLorentzVector& V4g1 = gammaWithMaximumRho->
get4Vector();
208 if (trackWithMaximumRho) {
209 const TLorentzVector& V4p1 = trackWithMaximumRho->
get4Vector();
210 const double theta1 = (V4g1.Vect()).Angle(V4p1.Vect());
211 if (angleGTLE < theta1) angleGTLE = theta1;
213 if (trackWithSecondMaximumRho) {
214 const TLorentzVector& V4p2 = trackWithSecondMaximumRho->
get4Vector();
215 const double theta2 = (V4g1.Vect()).Angle(V4p2.Vect());
216 if (angleGTLE < theta2) angleGTLE = theta2;
220 calculationResult[
"AngleGTLE"] = angleGTLE;
223 double angleG1G2CMSLE = -10.;
224 if (gammaWithMaximumRho) {
225 const TLorentzVector& V4p1 = gammaWithMaximumRho->
get4Vector();
226 if (gammaWithSecondMaximumRho) {
227 const TLorentzVector& V4p2 = gammaWithSecondMaximumRho->
get4Vector();
230 angleG1G2CMSLE = V3p1.Angle(V3p2);
234 calculationResult[
"AngleG1G2CMSLE"] = angleG1G2CMSLE;
237 double maxAngleTTLE = -10.;
240 const double jPsiMasswindow = 0.11;
242 for (
unsigned int i = 0; i <
m_pionParticles->getListSize() - 1; i++) {
244 for (
unsigned int j = i + 1; j <
m_pionParticles->getListSize(); j++) {
248 TLorentzVector V4pSum = V4p1 + V4p2;
250 const double mSum = V4pSum.M();
251 const double JpsidM = mSum - TDatabasePDG::Instance()->GetParticle(443)->Mass();
252 if (abs(JpsidM) < jPsiMasswindow && chSum == 0) nJpsi++;
255 const double temp = V3p1.Angle(V3p2);
256 if (maxAngleTTLE < temp) maxAngleTTLE = temp;
261 if (nJpsi != 0) Jpsi = 1;
263 calculationResult[
"maxAngleTTLE"] = maxAngleTTLE;
264 calculationResult[
"Jpsi"] = Jpsi;
267 double maxAngleGGLE = -10.;
277 const double temp = V3p1.Angle(V3p2);
278 if (maxAngleGGLE < temp) maxAngleGGLE = temp;
283 calculationResult[
"maxAngleGGLE"] = maxAngleGGLE;
288 const double& momentum = p.getMomentumMagnitude();
289 const double& r_rho = getRho(&p);
290 const ECLCluster* eclTrack = p.getECLCluster();
292 const double& energyOverMomentum = eclTrack->getEnergy(
293 ECLCluster::EHypothesisBit::c_nPhotons) / momentum;
294 double r_rhotoebeam = r_rho / BeamEnergyCMS();
295 return (r_rhotoebeam) > 0.35 && energyOverMomentum > 0.8;
300 calculationResult[
"nEidLE"] = nEidLE;
304 const double visibleEnergyTracks = std::accumulate(m_pionParticles->begin(), m_pionParticles->end(), 0.0,
305 [](
const double & visibleEnergy,
const Particle & p) {
306 return visibleEnergy + p.getMomentumMagnitude();
309 const double visibleEnergyGammas = std::accumulate(m_gammaParticles->begin(), m_gammaParticles->end(), 0.0,
310 [](
const double & visibleEnergy,
const Particle & p) {
311 return visibleEnergy + p.getMomentumMagnitude();
314 calculationResult[
"VisibleEnergyLE"] = visibleEnergyTracks + visibleEnergyGammas;
317 const double eTotTracks = std::accumulate(m_pionParticles->begin(), m_pionParticles->end(), 0.0,
318 [](
const double & eTot,
const Particle & p) {
319 const ECLCluster* eclCluster = p.getECLCluster();
321 const double eclEnergy = eclCluster->getEnergy(
322 ECLCluster::EHypothesisBit::c_nPhotons);
323 if (eclEnergy > 0.1) {
324 return eTot + eclCluster->getEnergy(
325 ECLCluster::EHypothesisBit::c_nPhotons);
331 const double eTotGammas = std::accumulate(m_gammaParticles->begin(), m_gammaParticles->end(), 0.0,
332 [](
const double & eTot,
const Particle & p) {
333 return eTot + p.getEnergy();
335 double Etot = eTotTracks + eTotGammas;
336 calculationResult[
"EtotLE"] = Etot;
340 double numMaxLayerKLM = -1.;
341 double numSecMaxLayerKLM = -1.;
344 for (
const auto& klmCluster : klmClusters) {
345 double klmClusterLayer = klmCluster.getLayers();
346 if (numMaxLayerKLM < klmClusterLayer) {
347 numSecMaxLayerKLM = numMaxLayerKLM;
348 numMaxLayerKLM = klmClusterLayer;
349 }
else if (numSecMaxLayerKLM < klmClusterLayer)
350 numSecMaxLayerKLM = klmClusterLayer;
353 calculationResult[
"N1KLMLayer"] = numMaxLayerKLM;
354 calculationResult[
"N2KLMLayer"] = numSecMaxLayerKLM;
358 if (trackWithMaximumRho) charget1 = trackWithMaximumRho->getCharge();
360 if (trackWithSecondMaximumRho) charget2 = trackWithSecondMaximumRho->getCharge();
362 double Bhabha2Trk = 0.;
363 int ntrk_bha = m_pionParticles->getListSize();
364 double rp1ob = rhoOfTrackWithMaximumRho / BeamEnergyCMS();
365 double rp2ob = rhoOfTrackWithSecondMaximumRho / BeamEnergyCMS();
366 bool bhabha2trk_tag =
367 ntrk_bha >= 2 && maxAngleTTLE > 2.88 && nEidLE >= 1 && rp1ob > 0.35 && rp2ob > 0.35 && (Etot) > 4.0
368 && (abs(charget1) == 1 && abs(charget2) == 1 && (charget1 + charget2) == 0);
369 if (bhabha2trk_tag) Bhabha2Trk = 1;
370 calculationResult[
"Bhabha2Trk"] = Bhabha2Trk;
372 double Bhabha1Trk = 0.;
373 double rc1ob = rhoOfGammaWithMaximumRho / BeamEnergyCMS();
374 double rc2ob = rhoOfGammaWithSecondMaximumRho / BeamEnergyCMS();
375 bool bhabha1trk_tag = ntrk_bha == 1 && rp1ob > 0.35 && rc1ob > 0.35 && angleGTLE > 2.618;
376 if (bhabha1trk_tag) Bhabha1Trk = 1;
377 calculationResult[
"Bhabha1Trk"] = Bhabha1Trk;
380 bool gg_tag = ntrk_bha <= 1 && nEidLE == 0 && rc1ob > 0.35 && rc2ob > 0.2 && Etot > 4.0 && maxAngleGGLE > 2.618;
381 if (gg_tag) ggSel = 1;
382 calculationResult[
"GG"] = ggSel;
385 double BhabhaECL = 0.;
387 for (
int i = 0; i < eclClusters.getEntries() - 1; i++) {
393 double Eg1ob = V4g1.E() / (2 * BeamEnergyCMS());
394 for (
int j = i + 1; j < eclClusters.getEntries(); j++) {
399 double Eg2ob = V4g2.E() / (2 * BeamEnergyCMS());
400 const TVector3 V3g1 = V4g1.Vect();
401 const TVector3 V3g2 = V4g2.Vect();
402 double Thetag1 = V4g1.Theta() * TMath::RadToDeg();
403 double Thetag2 = V4g2.Theta() * TMath::RadToDeg();
404 double deltphi = fabs(V3g1.DeltaPhi(V3g2) * TMath::RadToDeg());
405 double Tsum = Thetag1 + Thetag2;
406 if ((deltphi > 165. && deltphi < 178.5) && (Eg1ob > 0.4 && Eg2ob > 0.4 && (Eg1ob > 0.45 || Eg2ob > 0.45)) && (Tsum > 178.
407 && Tsum < 182.)) BhabhaECL = 1;
410 calculationResult[
"BhabhaECL"] = BhabhaECL;
414 const double lowdEdxEdge = 0.70, highdEdxEdge = 1.30;
415 const double lowEoPEdge = 0.70, highEoPEdge = 1.30;
417 if (m_pionParticles->getListSize() == 2) {
420 for (
unsigned int i = 0; i < m_pionParticles->getListSize() - 1; i++) {
422 Particle* part1 = m_pionParticles->getParticle(i);
423 if (!part1)
continue;
425 const auto chargep1 = part1->
getCharge();
426 if (abs(chargep1) != 1)
continue;
429 if (!eclTrack1)
continue;
434 if (energyOverMomentum1 <= lowEoPEdge || energyOverMomentum1 >= highEoPEdge)
continue;
437 if (!track1)
continue;
440 if (!trackFit1)
continue;
444 if (!dedxTrack1)
continue;
447 for (
unsigned int j = i + 1; j < m_pionParticles->getListSize(); j++) {
449 Particle* part2 = m_pionParticles->getParticle(j);
450 if (!part2)
continue;
452 const auto chargep2 = part2->
getCharge();
453 if (abs(chargep2) != 1 || (chargep1 + chargep2 != 0))
continue;
456 if (!eclTrack2)
continue;
461 if (energyOverMomentum2 <= lowEoPEdge || energyOverMomentum2 >= highEoPEdge)
continue;
464 if (!track2)
continue;
467 if (!trackFit2)
continue;
471 if (!dedxTrack2)
continue;
476 if ((p1_dedxnosat > lowdEdxEdge && p1_dedxnosat < highdEdxEdge) || (p2_dedxnosat > lowdEdxEdge
477 && p2_dedxnosat < highdEdxEdge))radee = 1;
483 calculationResult[
"Radee"] = radee;
486 double mumutight = 0.;
487 double eMumuTotGammas = 0.;
490 const double maxEoP = 0.4;
491 int nGammas = m_gammaParticles->getListSize();
493 for (
int t = 0; t < nGammas; t++) {
494 const Particle* part = m_gammaParticles->getParticle(t);
496 eMumuTotGammas += frame.getMomentum(part).E();
500 nTracks = tracks.getEntries();
505 if (m_pionParticles->getListSize() == 2) {
508 for (
unsigned int k = 0; k < m_pionParticles->getListSize() - 1; k++) {
510 Particle* part1 = m_pionParticles->getParticle(k);
511 if (!part1)
continue;
513 const auto chargep1 = part1->
getCharge();
514 if (abs(chargep1) != 1)
continue;
517 if (!eclTrack1)
continue;
521 if (!track1)
continue;
524 if (!trackFit1)
continue;
529 const double p1MomLab = V4p1.P();
530 double highestP = p1MomLab;
531 const double p1Eop = Variable::eclClusterEoP(part1);
535 if (p1Pid) p1hasKLMid = p1Pid->
isAvailable(Const::KLM);
536 const double p1isInCDC = Variable::inCDCAcceptance(part1);
537 const double p1clusPhi = Variable::eclClusterPhi(part1);
539 const double Pp1 = V3p1.Mag();
540 const double Thetap1 = (V3p1).Theta() * TMath::RadToDeg();
541 const double Phip1 = (V3p1).Phi() * TMath::RadToDeg();
545 const bool goodTrk1 = enECLTrack1 > 0 && enECLTrack1 < 0.4 && p1Eop < maxEoP && p1CDChits > 0
546 && ((p1hasKLMid == 0 && enECLTrack1 < 0.25 && p1MomLab < 2.0) || p1hasKLMid == 1) && p1isInCDC == 1;
549 for (
unsigned int l = k + 1; l < m_pionParticles->getListSize(); l++) {
551 Particle* part2 = m_pionParticles->getParticle(l);
552 if (!part2)
continue;
554 const auto chargep2 = part2->
getCharge();
555 if (abs(chargep2) != 1 || (chargep1 + chargep2 != 0))
continue;
558 if (!eclTrack2)
continue;
562 if (!track2)
continue;
565 if (!trackFit2)
continue;
570 const double p2MomLab = V4p2.P();
571 double lowestP = p2MomLab;
572 const double p2Eop = Variable::eclClusterEoP(part2);
576 if (p2Pid) p2hasKLMid = p2Pid->
isAvailable(Const::KLM);
577 const double p2isInCDC = Variable::inCDCAcceptance(part2);
578 const double p2clusPhi = Variable::eclClusterPhi(part2);
580 const double Pp2 = V3p2.Mag();
581 const double Thetap2 = (V3p2).Theta() * TMath::RadToDeg();
582 const double Phip2 = (V3p2).Phi() * TMath::RadToDeg();
584 const double acopPhi = fabs(180 - fabs(Phip1 - Phip2));
585 const double acopTheta = fabs(fabs(Thetap1 + Thetap2) - 180);
589 const bool goodTrk2 = enECLTrack2 > 0 && enECLTrack2 < 0.4 && p2Eop < maxEoP && p2CDChits > 0
590 && ((p2hasKLMid == 0 && enECLTrack2 < 0.25 && p2MomLab < 2.0) || p2hasKLMid == 1) && p2isInCDC == 1;
592 double eTotMumuTracks = enECLTrack1 + enECLTrack2;
593 double EMumutot = eTotMumuTracks + eMumuTotGammas;
595 bool mumutight_tag = enECLTrack1 < 0.5 && enECLTrack2 < 0.5 && EMumutot < 2 && acopPhi < 10 && acopTheta < 10 && nTracks == 2
596 && Pp1 > 0.5 && Pp2 > 0.5;
598 if (mumutight_tag) mumutight = 1;
600 if (p1MomLab < p2MomLab) {
605 double diffPhi = p1clusPhi - p2clusPhi;
606 if (fabs(diffPhi) > M_PI) {
607 if (diffPhi > M_PI) {
608 diffPhi = diffPhi - 2 * M_PI;
610 diffPhi = 2 * M_PI + diffPhi;
614 const double recoilP = fr.getMomentum(pIN - V4p1 - V4p2).P();
616 const bool radmumu_tag = nTracks < 4 && goodTrk1 == 1 && goodTrk2 == 1 && highestP > 1 && lowestP < 3 && (p1hasKLMid == 1
617 || p2hasKLMid == 1) && abs(diffPhi) >= 0.5 * M_PI && recoilP > 0.1 && (enECLTrack1 <= 0.25 || enECLTrack2 <= 0.25);
619 if (radmumu_tag) radmumu = 1;
625 calculationResult[
"MumuTight"] = mumutight;
626 calculationResult[
"Radmumu"] = radmumu;
629 double EsumPiHad = 0;
631 int nHadTracks = m_pionHadParticles->getListSize();
635 std::vector<TVector3> m_pionHadv3;
637 for (
int nPiHad = 0; nPiHad < nHadTracks; nPiHad++) {
638 Particle* parPiHad = m_pionHadParticles->getParticle(nPiHad);
641 EsumPiHad += V4PiHad.E();
642 PzPiHad += V4PiHad.Pz();
645 double visibleEnergyCMSnorm = (EsumPiHad + EsumGamma) / (BeamEnergyCMS() * 2.0);
646 double EsumCMSnorm = eneclClusters / (BeamEnergyCMS() * 2.0);
647 double PzTotCMSnorm = (PzPiHad + PzGamma) / (BeamEnergyCMS() * 2.0);
649 bool hadronb_tag = nHadTracks >= 3 && visibleEnergyCMSnorm > 0.2 && abs(PzTotCMSnorm) < 0.5 && neclClusters > 1
650 && EsumCMSnorm > 0.1 && EsumCMSnorm < 0.8;
655 fw.calculateBasicMoments();
656 double R2 = fw.getR(2);
657 if (R2 < 0.4) hadronb1 = 1;
658 if (hadronb1 && nHadTracks >= 5) hadronb2 = 1;
661 calculationResult[
"HadronB"] = hadronb;
662 calculationResult[
"HadronB1"] = hadronb1;
663 calculationResult[
"HadronB2"] = hadronb2;
668 const double KsMassLow = 0.468;
669 const double KsMassHigh = 0.528;
671 if (m_KsParticles.isValid()) {
672 for (
unsigned int i = 0; i < m_KsParticles->getListSize(); i++) {
673 const Particle* mergeKsCand = m_KsParticles->getParticle(i);
674 const double isKsCandGood = Variable::goodBelleKshort(mergeKsCand);
675 const double KsCandMass = mergeKsCand->
getMass();
676 if (KsCandMass > KsMassLow && KsCandMass < KsMassHigh && isKsCandGood == 1.) nKshort++;
680 if (nKshort != 0) Kshort = 1;
682 calculationResult[
"Kshort"] = Kshort;
688 const double visibleEnergyCMS = visibleEnergyCMSnorm * BeamEnergyCMS() * 2.0;
689 const unsigned int n_particles = m_pionHadParticles->getListSize();
691 if (n_particles >= 2) {
692 for (
unsigned int i = 0; i < n_particles - 1; i++) {
693 Particle* par1 = m_pionHadParticles->getParticle(i);
694 for (
unsigned int j = i + 1; j < n_particles; j++) {
695 Particle* par2 = m_pionHadParticles->getParticle(j);
697 const TLorentzVector V4p1 = par1->
get4Vector();
698 const TLorentzVector V4p2 = par2->
get4Vector();
699 const double opAng = V4p1.Theta() - V4p2.Theta();
700 const TLorentzVector V4pSum = V4p1 + V4p2;
702 const double ptCMS = V4pSumCMS.Pt();
703 const double pzCMS = V4pSumCMS.Pz();
704 const double mSum = V4pSum.M();
706 const bool fourLepCand = chSum == 0 && (V4p1.P() > 0.4 && V4p2.P() > 0.4) && cos(opAng) > -0.997 && ptCMS < 0.15 && abs(pzCMS) < 2.5
709 if (fourLepCand) nFourLep++;
714 if (nFourLep != 0 && visibleEnergyCMS < 6) fourLep = 1;
716 calculationResult[
"FourLep"] = fourLep;
719 unsigned int nLambda = 0;
721 if (m_LambdaParticles.isValid()) {
722 for (
unsigned int i = 0; i < m_LambdaParticles->getListSize(); i++) {
723 const Particle* mergeLambdaCand = m_LambdaParticles->getParticle(i);
724 const double flightDist = Variable::flightDistance(mergeLambdaCand);
725 const double flightDistErr = Variable::flightDistanceErr(mergeLambdaCand);
726 const double flightSign = flightDist / flightDistErr;
729 const double protMom = protCand->
getMomentum().Mag();
730 const double pionMom = pionCand->
getMomentum().Mag();
731 const double asymPDaughters = (protMom - pionMom) / (protMom + pionMom);
732 if (flightSign > 10 && asymPDaughters > 0.41) nLambda++;
737 calculationResult[
"Lambda"] = 1;
739 calculationResult[
"Lambda"] = 0;
743 unsigned int nDstp1 = 0;
744 unsigned int nDstp2 = 0;
745 unsigned int nDstp3 = 0;
746 unsigned int nDstp4 = 0;
748 if (m_DstParticles.isValid() && (ntrk_bha >= 3 && Bhabha2Trk == 0)) {
749 for (
unsigned int i = 0; i < m_DstParticles->getListSize(); i++) {
750 const Particle* allDstCand = m_DstParticles->getParticle(i);
751 const double dstDecID = allDstCand->
getExtraInfo(
"decayModeID");
752 if (dstDecID == 1.) nDstp1++;
753 if (dstDecID == 2.) nDstp2++;
754 if (dstDecID == 3.) nDstp3++;
755 if (dstDecID == 4.) nDstp4++;
761 calculationResult[
"Dstp1"] = 1;
763 calculationResult[
"Dstp1"] = 0;
767 calculationResult[
"Dstp2"] = 1;
769 calculationResult[
"Dstp2"] = 0;
773 calculationResult[
"Dstp3"] = 1;
775 calculationResult[
"Dstp3"] = 0;
779 calculationResult[
"Dstp4"] = 1;
781 calculationResult[
"Dstp4"] = 0;
785 calculationResult[
"nTracksOffIP"] = m_offIpParticles->getListSize();
788 calculationResult[
"NeuroTRG"] = 0;
792 const std::map<std::string, int>& nonPrescaledResults = filter_result->getNonPrescaledResults();
793 if (nonPrescaledResults.find(m_filterL1TrgNN) != nonPrescaledResults.end()) {
795 if (hasNN) calculationResult[
"NeuroTRG"] = 1;