Actually write out the variables into the map.
67{
68
71 getRho(gammaWithMaximumRho));
74 getRho(trackWithMaximumRho));
75
77 const double& rhoOfECLClusterWithSecondMaximumRho = getRhoOfECLClusterWithMaximumRhoBelow(
m_pionParticles,
79 rhoOfECLClusterWithMaximumRho);
80
81 const double& rhoOfTrackWithMaximumRho = getRho(trackWithMaximumRho);
82 const double& rhoOfTrackWithSecondMaximumRho = getRho(trackWithSecondMaximumRho);
83 const double& rhoOfGammaWithMaximumRho = getRho(gammaWithMaximumRho);
84 const double& rhoOfGammaWithSecondMaximumRho = getRho(gammaWithSecondMaximumRho);
85
86
87
88 calculationResult["EC1CMSLE"] = rhoOfECLClusterWithMaximumRho;
89
90
91 calculationResult["EC2CMSLE"] = rhoOfECLClusterWithSecondMaximumRho;
92
93
94 calculationResult["EC12CMSLE"] = rhoOfECLClusterWithMaximumRho + rhoOfECLClusterWithSecondMaximumRho;
95
96
98
99
101
102
104
105
106 calculationResult["P1CMSBhabhaLE"] = rhoOfTrackWithMaximumRho;
107
108
109 calculationResult["P1OEbeamCMSBhabhaLE"] = rhoOfTrackWithMaximumRho / BeamEnergyCMS();
110
111
112 calculationResult["P2CMSBhabhaLE"] = rhoOfTrackWithSecondMaximumRho;
113
114
115 calculationResult["P2OEbeamCMSBhabhaLE"] = rhoOfTrackWithSecondMaximumRho / BeamEnergyCMS();
116
117
118 calculationResult["P12CMSBhabhaLE"] = rhoOfTrackWithMaximumRho + rhoOfTrackWithSecondMaximumRho;
119
120
121 calculationResult["G1CMSBhabhaLE"] = rhoOfGammaWithMaximumRho;
122
123 calculationResult["G1OEbeamCMSBhabhaLE"] = rhoOfGammaWithMaximumRho / BeamEnergyCMS();
124
125
126 calculationResult["G2CMSBhabhaLE"] = rhoOfGammaWithSecondMaximumRho;
127
128 calculationResult["G2OEbeamCMSBhabhaLE"] = rhoOfGammaWithSecondMaximumRho / BeamEnergyCMS();
129
130
131 calculationResult["G12CMSBhabhaLE"] = rhoOfGammaWithMaximumRho + rhoOfGammaWithSecondMaximumRho;
132
133 calculationResult["G12OEbeamCMSBhabhaLE"] =
134 (rhoOfGammaWithMaximumRho + rhoOfGammaWithSecondMaximumRho) / BeamEnergyCMS();
135
136
137
138
139 if (gammaWithMaximumRho) {
140 calculationResult["ENeutralLE"] = getRho(gammaWithMaximumRho);
141 } else {
142 calculationResult["ENeutralLE"] = -1;
143 }
144
145
148 return particle.getECLCluster() != nullptr;
149 });
150 calculationResult["nECLMatchTracksLE"] = numberOfTracksWithECLMatch;
151
152
153 double neclClusters = -1.;
154 double eneclClusters = 0.;
157 double PzGamma = 0.;
158 double EsumGamma = 0.;
160 const unsigned int numberOfECLClusters = std::count_if(eclClusters.
begin(), eclClusters.
end(),
162 return (eclcluster.hasHypothesis(
163 ECLCluster::EHypothesisBit::c_nPhotons)
164 and eclcluster.getEnergy(
165 ECLCluster::EHypothesisBit::c_nPhotons) > 0.1);
166 });
167 neclClusters = numberOfECLClusters;
168
169 for (
int ncl = 0; ncl < eclClusters.
getEntries(); ncl++) {
173 if (!eclClusters[ncl]->getRelatedFrom<Track>()) {
176 EsumGamma += V4Gamma_CMS.E();
177 PzGamma += V4Gamma_CMS.Pz();
178 }
179 }
180 }
181 }
182 calculationResult["nECLClustersLE"] = neclClusters;
183
184 int nb2bcc_PhiHigh = 0;
185 int nb2bcc_PhiLow = 0;
186 int nb2bcc_3D = 0;
188 for (
int i = 0; i < eclClusters.
getEntries() - 1; i++) {
190 continue;
192 double Eg1 = V4g1.E();
193 for (
int j = i + 1; j < eclClusters.
getEntries(); j++) {
195 continue;
197 double Eg2 = V4g2.E();
202 double deltphi = fabs(V3g1.
DeltaPhi(V3g2) * TMath::RadToDeg());
203 double Tsum = Thetag1 + Thetag2;
204 if (deltphi > 170. && (Eg1 > 0.25 && Eg2 > 0.25)) nb2bcc_PhiHigh++;
205 if (deltphi > 170. && (Eg1 < 0.25 || Eg2 < 0.25)) nb2bcc_PhiLow++;
206 if (deltphi > 160. && (Tsum > 160. && Tsum < 200.)) nb2bcc_3D++;
207 }
208 }
209
210 calculationResult["nB2BCCPhiHighLE"] = nb2bcc_PhiHigh;
211 calculationResult["nB2BCCPhiLowLE"] = nb2bcc_PhiLow;
212 calculationResult["nB2BCC3DLE"] = nb2bcc_3D;
213
214
215
216 double angleGTLE = -10.;
217 if (gammaWithMaximumRho) {
219 if (trackWithMaximumRho) {
221 const double theta1 = V3g1.
Angle(V3p1);
222 if (angleGTLE < theta1) angleGTLE = theta1;
223 }
224 if (trackWithSecondMaximumRho) {
226 const double theta2 = V3g1.
Angle(V3p2);
227 if (angleGTLE < theta2) angleGTLE = theta2;
228 }
229 }
230
231 calculationResult["AngleGTLE"] = angleGTLE;
232
233
234 double angleG1G2CMSLE = -10.;
235 if (gammaWithMaximumRho) {
236 const ROOT::Math::PxPyPzEVector& V4p1 = gammaWithMaximumRho->
get4Vector();
237 if (gammaWithSecondMaximumRho) {
238 const ROOT::Math::PxPyPzEVector& V4p2 = gammaWithSecondMaximumRho->
get4Vector();
241 angleG1G2CMSLE = V3p1.
Angle(V3p2);
242 }
243 }
244
245 calculationResult["AngleG1G2CMSLE"] = angleG1G2CMSLE;
246
247
248 double maxAngleTTLE = -10.;
249 int nJpsi = 0;
250 double Jpsi = 0.;
251 const double jPsiMasswindow = 0.11;
253 for (
unsigned int i = 0; i <
m_pionParticles->getListSize() - 1; i++) {
255 for (
unsigned int j = i + 1; j <
m_pionParticles->getListSize(); j++) {
257 ROOT::Math::PxPyPzEVector V4p1 = par1->
get4Vector();
258 ROOT::Math::PxPyPzEVector V4p2 = par2->
get4Vector();
259 ROOT::Math::PxPyPzEVector V4pSum = V4p1 + V4p2;
261 const double mSum = V4pSum.M();
262 const double JpsidM = mSum - TDatabasePDG::Instance()->GetParticle(443)->Mass();
263 if (abs(JpsidM) < jPsiMasswindow && chSum == 0) nJpsi++;
266 const double temp = V3p1.
Angle(V3p2);
267 if (maxAngleTTLE < temp) maxAngleTTLE = temp;
268 }
269 }
270 }
271
272 if (nJpsi != 0) Jpsi = 1;
273
274 calculationResult["maxAngleTTLE"] = maxAngleTTLE;
275 calculationResult["Jpsi"] = Jpsi;
276
277
278 double maxAngleGGLE = -10.;
284 ROOT::Math::PxPyPzEVector V4p1 = par1->
get4Vector();
285 ROOT::Math::PxPyPzEVector V4p2 = par2->
get4Vector();
288 const double temp = V3p1.
Angle(V3p2);
289 if (maxAngleGGLE < temp) maxAngleGGLE = temp;
290 }
291 }
292 }
293
294 calculationResult["maxAngleGGLE"] = maxAngleGGLE;
295
296
299 const double& momentum = p.getMomentumMagnitude();
300 const double& r_rho = getRho(&p);
301 const ECLCluster* eclTrack = p.getECLCluster();
302 if (eclTrack) {
303 const double& energyOverMomentum = eclTrack->getEnergy(
304 ECLCluster::EHypothesisBit::c_nPhotons) / momentum;
305 double r_rhotoebeam = r_rho / BeamEnergyCMS();
306 return (r_rhotoebeam) > 0.35 && energyOverMomentum > 0.8;
307 }
308 return false;
309 });
310
311 calculationResult["nEidLE"] = nEidLE;
312
313
314
316 [](
const double & visibleEnergy,
const Particle & p) {
317 return visibleEnergy + p.getMomentumMagnitude();
318 });
319
321 [](
const double & visibleEnergy,
const Particle & p) {
322 return visibleEnergy + p.getMomentumMagnitude();
323 });
324
325 calculationResult["VisibleEnergyLE"] = visibleEnergyTracks + visibleEnergyGammas;
326
327
329 [](
const double & eTot,
const Particle & p) {
330 const ECLCluster* eclCluster = p.getECLCluster();
331 if (eclCluster) {
332 const double eclEnergy = eclCluster->getEnergy(
333 ECLCluster::EHypothesisBit::c_nPhotons);
334 if (eclEnergy > 0.1) {
335 return eTot + eclCluster->getEnergy(
336 ECLCluster::EHypothesisBit::c_nPhotons);
337 }
338 }
339 return eTot;
340 });
341
343 [](
const double & eTot,
const Particle & p) {
344 return eTot + p.getEnergy();
345 });
346 double Etot = eTotTracks + eTotGammas;
347 calculationResult["EtotLE"] = Etot;
348
349
350
351 double numMaxLayerKLM = -1.;
352 double numSecMaxLayerKLM = -1.;
355 for (const auto& klmCluster : klmClusters) {
356 double klmClusterLayer = klmCluster.getLayers();
357 if (numMaxLayerKLM < klmClusterLayer) {
358 numSecMaxLayerKLM = numMaxLayerKLM;
359 numMaxLayerKLM = klmClusterLayer;
360 } else if (numSecMaxLayerKLM < klmClusterLayer)
361 numSecMaxLayerKLM = klmClusterLayer;
362 }
363 }
364 calculationResult["N1KLMLayer"] = numMaxLayerKLM;
365 calculationResult["N2KLMLayer"] = numSecMaxLayerKLM;
366
367
368 int charget1 = -10;
369 if (trackWithMaximumRho) charget1 = trackWithMaximumRho->
getCharge();
370 int charget2 = -10;
371 if (trackWithSecondMaximumRho) charget2 = trackWithSecondMaximumRho->
getCharge();
372
373 double Bhabha2Trk = 0.;
375 double rp1ob = rhoOfTrackWithMaximumRho / BeamEnergyCMS();
376 double rp2ob = rhoOfTrackWithSecondMaximumRho / BeamEnergyCMS();
377 bool bhabha2trk_tag =
378 ntrk_bha >= 2 && maxAngleTTLE > 2.88 && nEidLE >= 1 && rp1ob > 0.35 && rp2ob > 0.35 && (Etot) > 4.0
379 && (abs(charget1) == 1 && abs(charget2) == 1 && (charget1 + charget2) == 0);
380 if (bhabha2trk_tag) Bhabha2Trk = 1;
381 calculationResult["Bhabha2Trk"] = Bhabha2Trk;
382
383 double Bhabha1Trk = 0.;
384 double rc1ob = rhoOfGammaWithMaximumRho / BeamEnergyCMS();
385 double rc2ob = rhoOfGammaWithSecondMaximumRho / BeamEnergyCMS();
386 bool bhabha1trk_tag = ntrk_bha == 1 && rp1ob > 0.35 && rc1ob > 0.35 && angleGTLE > 2.618;
387 if (bhabha1trk_tag) Bhabha1Trk = 1;
388 calculationResult["Bhabha1Trk"] = Bhabha1Trk;
389
390 double ggSel = 0.;
391 bool gg_tag = ntrk_bha <= 1 && nEidLE == 0 && rc1ob > 0.35 && rc2ob > 0.2 && Etot > 4.0 && maxAngleGGLE > 2.618;
392 if (gg_tag) ggSel = 1;
393 calculationResult["GG"] = ggSel;
394
395
396 double BhabhaECL = 0.;
398 for (
int i = 0; i < eclClusters.
getEntries() - 1; i++) {
400 continue;
401
404 double Eg1ob = V4g1.E() / (2 * BeamEnergyCMS());
405 for (
int j = i + 1; j < eclClusters.
getEntries(); j++) {
407 continue;
410 double Eg2ob = V4g2.E() / (2 * BeamEnergyCMS());
413 double Thetag1 = V4g1.
Theta() * TMath::RadToDeg();
414 double Thetag2 = V4g2.Theta() * TMath::RadToDeg();
415 double deltphi = fabs(V3g1.
DeltaPhi(V3g2) * TMath::RadToDeg());
416 double Tsum = Thetag1 + Thetag2;
417 if ((deltphi > 165. && deltphi < 178.5) && (Eg1ob > 0.4 && Eg2ob > 0.4 && (Eg1ob > 0.45 || Eg2ob > 0.45)) && (Tsum > 178.
418 && Tsum < 182.)) BhabhaECL = 1;
419 }
420 }
421 calculationResult["BhabhaECL"] = BhabhaECL;
422
423
424 double radee = 0.;
425 const double lowdEdxEdge = 0.70, highdEdxEdge = 1.30;
426 const double lowEoPEdge = 0.70, highEoPEdge = 1.30;
427
429
430
431 for (
unsigned int i = 0; i <
m_pionParticles->getListSize() - 1; i++) {
432
434 if (!part1) continue;
435
436 const auto chargep1 = part1->
getCharge();
437 if (abs(chargep1) != 1) continue;
438
440 if (!eclTrack1) continue;
442
445 if (energyOverMomentum1 <= lowEoPEdge || energyOverMomentum1 >= highEoPEdge) continue;
446
448 if (!track1) continue;
449
451 if (!trackFit1) continue;
453
455 if (!dedxTrack1) continue;
456
457
458 for (
unsigned int j = i + 1; j <
m_pionParticles->getListSize(); j++) {
459
461 if (!part2) continue;
462
463 const auto chargep2 = part2->
getCharge();
464 if (abs(chargep2) != 1 || (chargep1 + chargep2 != 0)) continue;
465
467 if (!eclTrack2) continue;
469
472 if (energyOverMomentum2 <= lowEoPEdge || energyOverMomentum2 >= highEoPEdge) continue;
473
475 if (!track2) continue;
476
478 if (!trackFit2) continue;
480
482 if (!dedxTrack2) continue;
483
486
487 if ((p1_dedxnosat > lowdEdxEdge && p1_dedxnosat < highdEdxEdge) || (p2_dedxnosat > lowdEdxEdge
488 && p2_dedxnosat < highdEdxEdge))radee = 1;
489
490 }
491 }
492 }
493
494 calculationResult["Radee"] = radee;
495
496
497 double mumutight = 0.;
498 double eMumuTotGammas = 0.;
499 int nTracks = 0;
500 double radmumu = 0.;
502
503 for (int t = 0; t < nGammas; t++) {
506 eMumuTotGammas += frame.getMomentum(part).E();
507 }
508
510 nTracks = tracks.getEntries();
514
516
517
518 for (
unsigned int k = 0; k <
m_pionParticles->getListSize() - 1; k++) {
519
521 if (!part1) continue;
522
523 const auto chargep1 = part1->
getCharge();
524 if (abs(chargep1) != 1) continue;
525
527 if (!eclTrack1) continue;
529
531 if (!track1) continue;
532
534 if (!trackFit1) continue;
535
536 const ROOT::Math::PxPyPzEVector V4p1 = trackFit1->
get4Momentum();
538
539 const double p1MomLab = V4p1.P();
540 double highestP = p1MomLab;
543 bool p1hasKLMid = 0;
544 if (p1Pid) p1hasKLMid = p1Pid->
isAvailable(Const::KLM);
545 const double p1isInCDC = Variable::inCDCAcceptance(part1);
546 const double p1clusPhi = Variable::eclClusterPhi(part1);
547
548 const double Pp1 = V3p1.
Mag();
549 const double Thetap1 = (V3p1).Theta() * TMath::RadToDeg();
550 const double Phip1 = (V3p1).Phi() * TMath::RadToDeg();
551
553
554 const bool goodTrk1 = enECLTrack1 > 0 && enECLTrack1 < 0.5 && p1CDChits > 0
555 && ((p1hasKLMid == 0 && enECLTrack1 < 0.25 && p1MomLab < 2.0) || p1hasKLMid == 1) && p1isInCDC == 1;
556
557
558 for (
unsigned int l = k + 1; l <
m_pionParticles->getListSize(); l++) {
559
561 if (!part2) continue;
562
563 const auto chargep2 = part2->
getCharge();
564 if (abs(chargep2) != 1 || (chargep1 + chargep2 != 0)) continue;
565
567 if (!eclTrack2) continue;
569
571 if (!track2) continue;
572
574 if (!trackFit2) continue;
575
576 const ROOT::Math::PxPyPzEVector V4p2 = trackFit2->
get4Momentum();
578
579 const double p2MomLab = V4p2.P();
580 double lowestP = p2MomLab;
583 bool p2hasKLMid = 0;
584 if (p2Pid) p2hasKLMid = p2Pid->
isAvailable(Const::KLM);
585 const double p2isInCDC = Variable::inCDCAcceptance(part2);
586 const double p2clusPhi = Variable::eclClusterPhi(part2);
587
588 const double Pp2 = V3p2.
Mag();
589 const double Thetap2 = (V3p2).Theta() * TMath::RadToDeg();
590 const double Phip2 = (V3p2).Phi() * TMath::RadToDeg();
591
592 const double acopPhi = fabs(180 - fabs(Phip1 - Phip2));
593 const double acopTheta = fabs(fabs(Thetap1 + Thetap2) - 180);
594
596
597 const bool goodTrk2 = enECLTrack2 > 0 && enECLTrack2 < 0.5 && p2CDChits > 0
598 && ((p2hasKLMid == 0 && enECLTrack2 < 0.25 && p2MomLab < 2.0) || p2hasKLMid == 1) && p2isInCDC == 1;
599
600 double eTotMumuTracks = enECLTrack1 + enECLTrack2;
601 double EMumutot = eTotMumuTracks + eMumuTotGammas;
602
603 bool mumutight_tag = enECLTrack1 < 0.5 && enECLTrack2 < 0.5 && EMumutot < 2 && acopPhi < 10 && acopTheta < 10 && nTracks == 2
604 && Pp1 > 0.5 && Pp2 > 0.5;
605
606 if (mumutight_tag) mumutight = 1;
607
608 if (p1MomLab < p2MomLab) {
609 lowestP = highestP;
610 highestP = p2MomLab;
611 }
612
613 double diffPhi = p1clusPhi - p2clusPhi;
614 if (fabs(diffPhi) > M_PI) {
615 if (diffPhi > M_PI) {
616 diffPhi = diffPhi - 2 * M_PI;
617 } else {
618 diffPhi = 2 * M_PI + diffPhi;
619 }
620 }
621
622 const double recoilP = fr.getMomentum(pIN - V4p1 - V4p2).P();
623
624 const bool radmumu_tag = nTracks < 4 && goodTrk1 == 1 && goodTrk2 == 1 && highestP > 1 && lowestP < 3 && (p1hasKLMid == 1
625 || p2hasKLMid == 1) && abs(diffPhi) >= 0.5 * M_PI && recoilP > 0.1 && (enECLTrack1 <= 0.25 || enECLTrack2 <= 0.25);
626
627 if (radmumu_tag) radmumu = 1;
628
629 }
630 }
631 }
632
633 calculationResult["MumuTight"] = mumutight;
634 calculationResult["Radmumu"] = radmumu;
635
636
637 double EsumPiHad = 0;
638 double PzPiHad = 0;
640 double hadronb = 0;
641 double hadronb1 = 0;
642 double hadronb2 = 0;
643 std::vector<ROOT::Math::XYZVector> m_pionHadv3;
644
645 for (int nPiHad = 0; nPiHad < nHadTracks; nPiHad++) {
649 EsumPiHad += V4PiHad.E();
650 PzPiHad += V4PiHad.Pz();
651 }
652
653 double visibleEnergyCMSnorm = (EsumPiHad + EsumGamma) / (BeamEnergyCMS() * 2.0);
654 double EsumCMSnorm = eneclClusters / (BeamEnergyCMS() * 2.0);
655 double PzTotCMSnorm = (PzPiHad + PzGamma) / (BeamEnergyCMS() * 2.0);
656
657 bool hadronb_tag = nHadTracks >= 3 && visibleEnergyCMSnorm > 0.2 && abs(PzTotCMSnorm) < 0.5 && neclClusters > 1
658 && EsumCMSnorm > 0.1 && EsumCMSnorm < 0.8;
659
660 if (hadronb_tag) {
661 hadronb = 1;
663 fw.calculateBasicMoments();
664 double R2 = fw.getR(2);
665 if (R2 < 0.4) hadronb1 = 1;
666 if (hadronb1 && nHadTracks >= 5) hadronb2 = 1;
667 }
668
669 calculationResult["HadronB"] = hadronb;
670 calculationResult["HadronB1"] = hadronb1;
671 calculationResult["HadronB2"] = hadronb2;
672
673
674 int nKshort = 0;
675 double Kshort = 0.;
676 const double KsMassLow = 0.468;
677 const double KsMassHigh = 0.528;
678
680 for (
unsigned int i = 0; i <
m_KsParticles->getListSize(); i++) {
682 const double isKsCandGood = Variable::goodBelleKshort(mergeKsCand);
683 const double KsCandMass = mergeKsCand->
getMass();
684 if (KsCandMass > KsMassLow && KsCandMass < KsMassHigh && isKsCandGood == 1.) nKshort++;
685 }
686 }
687
688 if (nKshort != 0) Kshort = 1;
689
690 calculationResult["Kshort"] = Kshort;
691
692
693 int nFourLep = 0;
694 double fourLep = 0.;
695
696 const double visibleEnergyCMS = visibleEnergyCMSnorm * BeamEnergyCMS() * 2.0;
698
699 if (n_particles >= 2) {
700 for (unsigned int i = 0; i < n_particles - 1; i++) {
702 for (unsigned int j = i + 1; j < n_particles; j++) {
705 const ROOT::Math::PxPyPzEVector V4p1 = par1->
get4Vector();
706 const ROOT::Math::PxPyPzEVector V4p2 = par2->
get4Vector();
707 const double opAng = V4p1.Theta() + V4p2.Theta();
708 const ROOT::Math::PxPyPzEVector V4pSum = V4p1 + V4p2;
710 const double ptCMS = V4pSumCMS.Pt();
711 const double pzCMS = V4pSumCMS.Pz();
712 const double mSum = V4pSum.M();
713
714 const bool fourLepCand = chSum == 0 && (V4p1.P() > 0.4 && V4p2.P() > 0.4) && cos(opAng) > -0.997 && ptCMS < 0.15 && abs(pzCMS) < 2.5
715 && mSum < 6;
716
717 if (fourLepCand) nFourLep++;
718 }
719 }
720 }
721
722 if (nFourLep != 0 && visibleEnergyCMS < 6) fourLep = 1;
723
724 calculationResult["FourLep"] = fourLep;
725
726
727 unsigned int nLambda = 0;
728
732 const double flightDist = Variable::flightDistance(mergeLambdaCand);
733 const double flightDistErr = Variable::flightDistanceErr(mergeLambdaCand);
734 const double flightSign = flightDist / flightDistErr;
737 const double protMom = protCand->
getP();
738 const double pionMom = pionCand->
getP();
739 const double asymPDaughters = (protMom - pionMom) / (protMom + pionMom);
740 if (flightSign > 10 && asymPDaughters > 0.41) nLambda++;
741 }
742 }
743
744 if (nLambda > 0) {
745 calculationResult["Lambda"] = 1;
746 } else {
747 calculationResult["Lambda"] = 0;
748 }
749
750
751 unsigned int nDstp1 = 0;
752 unsigned int nDstp2 = 0;
753 unsigned int nDstp3 = 0;
754 unsigned int nDstp4 = 0;
755
756 if (
m_DstParticles.isValid() && (ntrk_bha >= 3 && Bhabha2Trk == 0)) {
757 for (
unsigned int i = 0; i <
m_DstParticles->getListSize(); i++) {
759 const double dstDecID = allDstCand->
getExtraInfo(
"decayModeID");
760 if (dstDecID == 1.) nDstp1++;
761 if (dstDecID == 2.) nDstp2++;
762 if (dstDecID == 3.) nDstp3++;
763 if (dstDecID == 4.) nDstp4++;
764 }
765 }
766
767
768 if (nDstp1 > 0) {
769 calculationResult["Dstp1"] = 1;
770 } else {
771 calculationResult["Dstp1"] = 0;
772 }
773
774 if (nDstp2 > 0) {
775 calculationResult["Dstp2"] = 1;
776 } else {
777 calculationResult["Dstp2"] = 0;
778 }
779
780 if (nDstp3 > 0) {
781 calculationResult["Dstp3"] = 1;
782 } else {
783 calculationResult["Dstp3"] = 0;
784 }
785
786 if (nDstp4 > 0) {
787 calculationResult["Dstp4"] = 1;
788 } else {
789 calculationResult["Dstp4"] = 0;
790 }
791
792
794
795
796 calculationResult["NeuroTRG"] = 0;
797 calculationResult["GammaGammaFilter"] = 0;
798
801 const std::map<std::string, int>& nonPrescaledResults = filter_result->getNonPrescaledResults();
802 if (nonPrescaledResults.find(
m_filterL1TrgNN) != nonPrescaledResults.end()) {
804 if (hasNN) calculationResult["NeuroTRG"] = 1;
805 }
806 const bool ggEndcap = (filter_result->getNonPrescaledResult("software_trigger_cut&filter&ggEndcapLoose") ==
808 const bool ggBarrel = (filter_result->getNonPrescaledResult("software_trigger_cut&filter&ggBarrelLoose") ==
810 if (ggEndcap || ggBarrel) calculationResult["GammaGammaFilter"] = 1;
811 }
812
813
814
815 double mumuHighMass = 0.;
816
817 if (trackWithMaximumRho && trackWithSecondMaximumRho) {
818 int hasClus = 0;
819 double eclE1 = 0., eclE2 = 0.;
820
821 const auto charge1 = trackWithMaximumRho->
getCharge();
822 const auto charge2 = trackWithSecondMaximumRho->
getCharge();
823 const auto chSum = charge1 + charge2;
824
826 if (eclTrack1) {
827 hasClus++;
829 }
830
832 if (eclTrack2) {
833 hasClus++;
835 }
838
839 const ROOT::Math::PxPyPzEVector V4pSum = V4p1 + V4p2;
840 const double mSum = V4pSum.M();
841
842 const double thetaSumCMS = (V4p1.Theta() + V4p2.Theta()) * TMath::RadToDeg();
843 const double phi1CMS = V4p1.Phi() * TMath::RadToDeg();
844 const double phi2CMS = V4p2.Phi() * TMath::RadToDeg();
845
846 double diffPhi = phi1CMS - phi2CMS;
847 if (fabs(diffPhi) > 180) {
848 if (diffPhi > 180) {
849 diffPhi = diffPhi - 2 * 180;
850 } else {
851 diffPhi = 2 * 180 + diffPhi;
852 }
853 }
854 const double delThetaCMS = fabs(fabs(thetaSumCMS) - 180);
855 const double delPhiCMS = fabs(180 - fabs(diffPhi));
856
857 const bool mumuHighMassCand = chSum == 0 && (mSum > 8. && mSum < 12.) && hasClus > 0 && eclE1 <= 1
858 && eclE2 <= 1 && delThetaCMS < 10 && delPhiCMS < 10;
859
860 if (mumuHighMassCand) mumuHighMass = 1;
861
862 }
863
864 calculationResult["MumuHighM"] = mumuHighMass;
865
866
867 calculationResult["Bp"] = 0;
868 calculationResult["Bz"] = 0;
869
870 if (
m_BpParticles.isValid() && (ntrk_bha >= 3 && Bhabha2Trk == 0)) {
872 }
873
874 if (
m_BzParticles.isValid() && (ntrk_bha >= 3 && Bhabha2Trk == 0)) {
876 }
877
878}
DataType Theta() const
The polar angle.
DataType DeltaPhi(const B2Vector3< DataType > &v) const
returns phi in the interval [-PI,PI)
DataType Mag() const
The magnitude (rho in spherical coordinate system).
DataType Angle(const B2Vector3< DataType > &q) const
The angle w.r.t.
Debug output for CDCDedxPID module.
double getDedxNoSat() const
Get dE/dx truncated mean without the saturation correction for this track.
Class to provide momentum-related information from ECLClusters.
const ROOT::Math::PxPyPzEVector Get4MomentumFromCluster(const ECLCluster *cluster, ECLCluster::EHypothesisBit hypo)
Returns four momentum vector.
static const ChargedStable pion
charged pion particle
bool hasHypothesis(EHypothesisBit bitmask) const
Return if specific hypothesis bit is set.
double getEnergy(EHypothesisBit hypothesis) const
Return Energy (GeV).
@ c_nPhotons
CR is split into n photons (N1)
Class to calculate the Fox-Wolfram moments up to order 8.
unsigned short getNHits() const
Get the total Number of CDC hits in the fit.
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
bool isAvailable(Const::PIDDetectorSet set=Const::PIDDetectorSet::set()) const
Check whether PID information is available for at least one of the detectors in a given set.
Class to store reconstructed particles.
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
const ECLCluster * getECLCluster() const
Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType =...
const PIDLikelihood * getPIDLikelihood() const
Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to creat...
double getCharge(void) const
Returns particle charge.
ROOT::Math::PxPyPzEVector get4Vector() const
Returns Lorentz vector.
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
double getMomentumMagnitude() const
Returns momentum magnitude.
double getP() const
Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
double getExtraInfo(const std::string &name) const
Return given value if set.
double getMass() const
Returns invariant mass (= nominal for FS particles)
static const ReferenceFrame & GetCurrent()
Get current rest frame.
Accessor to arrays stored in the data store.
bool isValid() const
Check wether the array was registered.
int getEntries() const
Get the number of objects in the array.
iterator end()
Return iterator to last entry +1.
iterator begin()
Return iterator to first entry.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
Values of the result of a track fit with a given particle hypothesis.
ROOT::Math::PxPyPzEVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
HitPatternCDC getHitPatternCDC() const
Getter for the hit pattern in the CDC;.
Class that bundles various TrackFitResults.
@ c_accept
Accept this event.