 |
Belle II Software
release-05-01-25
|
10 #include <analysis/ContinuumSuppression/ContinuumSuppression.h>
11 #include <analysis/ContinuumSuppression/Thrust.h>
12 #include <analysis/ContinuumSuppression/KsfwMoments.h>
13 #include <analysis/ContinuumSuppression/FoxWolfram.h>
14 #include <analysis/ContinuumSuppression/CleoCones.h>
15 #include <analysis/dataobjects/RestOfEvent.h>
16 #include <analysis/dataobjects/ContinuumSuppression.h>
17 #include <analysis/utility/PCmsLabTransform.h>
18 #include <mdst/dataobjects/Track.h>
19 #include <mdst/dataobjects/ECLCluster.h>
20 #include <mdst/dataobjects/KLMCluster.h>
21 #include <mdst/dataobjects/PIDLikelihood.h>
22 #include <framework/datastore/StoreArray.h>
41 particle->addRelationTo(qqVars);
43 std::vector<TVector3> p3_cms_sigB, p3_cms_roe, p3_cms_all;
45 std::vector<std::pair<TVector3, int>> p3_cms_q_sigA;
46 std::vector<std::pair<TVector3, int>> p3_cms_q_sigB;
47 std::vector<std::pair<TVector3, int>> p3_cms_q_roe;
49 std::vector<float> ksfwFS0;
50 std::vector<float> ksfwFS1;
52 std::vector<float> cleoConesAll;
53 std::vector<float> cleoConesROE;
71 TLorentzVector p_cms_missA(0, 0, 0, 2 * BeamEnergy);
72 TLorentzVector p_cms_missB(0, 0, 0, 2 * BeamEnergy);
76 std::vector<Belle2::Particle*> signalDaughters = particle->getDaughters();
81 p3_cms_q_sigA.emplace_back(p_cms.Vect(), sigFS0->getCharge());
84 et[0] += p_cms.Perp();
88 std::vector<const Belle2::Particle*> signalFSParticles = particle->getFinalStateDaughters();
93 p3_cms_all.push_back(p_cms.Vect());
94 p3_cms_sigB.push_back(p_cms.Vect());
96 p3_cms_q_sigB.emplace_back(p_cms.Vect(), sigFS1->getCharge());
99 et[1] += p_cms.Perp();
109 std::vector<const Track*> roeTracks = roe->
getTracks(maskName);
111 for (
const Track* track : roeTracks) {
120 if (track->getTrackFitResultWithClosestMass(charged)->getChargeSign() == 0) {
121 B2WARNING(
"Track with charge = 0 skipped! From the ContinuumSuppression");
124 Particle charged_particle(track, charged);
128 p3_cms_all.push_back(p_cms.Vect());
129 p3_cms_roe.push_back(p_cms.Vect());
131 p3_cms_q_roe.emplace_back(p_cms.Vect(), charged_particle.
getCharge());
133 p_cms_missA -= p_cms;
134 p_cms_missB -= p_cms;
135 et[0] += p_cms.Perp();
136 et[1] += p_cms.Perp();
142 std::vector<const ECLCluster*> roeECLClusters = roe->
getECLClusters(maskName);
144 for (
const ECLCluster* cluster : roeECLClusters) {
151 p3_cms_all.push_back(p_cms.Vect());
152 p3_cms_roe.push_back(p_cms.Vect());
154 p3_cms_q_roe.emplace_back(p_cms.Vect(), gamma_particle.
getCharge());
156 p_cms_missA -= p_cms;
157 p_cms_missB -= p_cms;
158 et[0] += p_cms.Perp();
159 et[1] += p_cms.Perp();
166 thrustBm = thrustB.Mag();
167 thrustOm = thrustO.Mag();
168 cosTBTO = fabs(cos(thrustB.Angle(thrustO)));
169 cosTBz = fabs(thrustB.CosTheta());
172 CleoCones cc(p3_cms_all, p3_cms_roe, thrustB,
true,
true);
173 cleoConesAll = cc.cleo_cone_with_all();
174 cleoConesROE = cc.cleo_cone_with_roe();
182 TLorentzVector p_cms_B = T.
rotateLabToCms() * particle->get4Vector();
183 double Hso0_max(2 * (2 * BeamEnergy - p_cms_B.E()));
193 ksfwFS0.push_back(KsfwM.
mm2());
194 ksfwFS0.push_back(KsfwM.
et());
195 ksfwFS0.push_back(KsfwM.
Hso(0, 0));
196 ksfwFS0.push_back(KsfwM.
Hso(0, 1));
197 ksfwFS0.push_back(KsfwM.
Hso(0, 2));
198 ksfwFS0.push_back(KsfwM.
Hso(0, 3));
199 ksfwFS0.push_back(KsfwM.
Hso(0, 4));
200 ksfwFS0.push_back(KsfwM.
Hso(1, 0));
201 ksfwFS0.push_back(KsfwM.
Hso(1, 2));
202 ksfwFS0.push_back(KsfwM.
Hso(1, 4));
203 ksfwFS0.push_back(KsfwM.
Hso(2, 0));
204 ksfwFS0.push_back(KsfwM.
Hso(2, 2));
205 ksfwFS0.push_back(KsfwM.
Hso(2, 4));
206 ksfwFS0.push_back(KsfwM.
Hoo(0));
207 ksfwFS0.push_back(KsfwM.
Hoo(1));
208 ksfwFS0.push_back(KsfwM.
Hoo(2));
209 ksfwFS0.push_back(KsfwM.
Hoo(3));
210 ksfwFS0.push_back(KsfwM.
Hoo(4));
213 ksfwFS1.push_back(KsfwM.
mm2());
214 ksfwFS1.push_back(KsfwM.
et());
215 ksfwFS1.push_back(KsfwM.
Hso(0, 0));
216 ksfwFS1.push_back(KsfwM.
Hso(0, 1));
217 ksfwFS1.push_back(KsfwM.
Hso(0, 2));
218 ksfwFS1.push_back(KsfwM.
Hso(0, 3));
219 ksfwFS1.push_back(KsfwM.
Hso(0, 4));
220 ksfwFS1.push_back(KsfwM.
Hso(1, 0));
221 ksfwFS1.push_back(KsfwM.
Hso(1, 2));
222 ksfwFS1.push_back(KsfwM.
Hso(1, 4));
223 ksfwFS1.push_back(KsfwM.
Hso(2, 0));
224 ksfwFS1.push_back(KsfwM.
Hso(2, 2));
225 ksfwFS1.push_back(KsfwM.
Hso(2, 4));
226 ksfwFS1.push_back(KsfwM.
Hoo(0));
227 ksfwFS1.push_back(KsfwM.
Hoo(1));
228 ksfwFS1.push_back(KsfwM.
Hoo(2));
229 ksfwFS1.push_back(KsfwM.
Hoo(3));
230 ksfwFS1.push_back(KsfwM.
Hoo(4));
T * appendNew()
Construct a new T object at the end of the array.
static const ParticleType photon
photon particle
void addCosTBTO(float cosTBTO)
Add cosine of the angle between the thrust axis of the B and the thrust axis of the ROE.
void addR2(float R2)
Add reduced Fox-Wolfram moment R2.
Const::ChargedStable getMostLikely(const double *fractions=0, Const::PIDDetectorSet set=Const::PIDDetectorSet::set()) const
Return most likely particle among chargedStableSet; if prior fractions not given equal prior probabil...
void addCleoConesROE(const std::vector< float > &cleoConesROE)
Add vector of Cleo Cones constructed of only ROE particles.
static TVector3 calculateThrust(const std::vector< TVector3 > &momenta)
calculates the thrust axis
void addCosTBz(float cosTBz)
Add cosine of the angle between the thrust axis of the B and the z-axis.
double Hso(int i, int j, int uf=-1) const
Returns calculated KSFW Moments.
@ c_nPhotons
CR is split into n photons (N1)
void calculateBasicMoments()
Method to perform the calculation of the moments up to order 4, which are the most relevant ones.
This is a general purpose class for collecting reconstructed MDST data objects that are not used in r...
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
int usefinal(int uf)
Sets the flag that specifiies we are using the finalstate for signal.
double getR(int i) const
Returns the i-th moment normalized to the 0th-order moment.
static const ChargedStable pion
charged pion particle
float getCharge(void) const
Returns particle charge.
void addKsfwFS1(const std::vector< float > &ksfwFS1)
Add vector of KSFW moments, Et, and mm2 for final state = 1.
Abstract base class for different kinds of events.
void addThrustO(const TVector3 &thrustO)
Add ROE thrust axis.
void addCleoConesALL(const std::vector< float > &cleoConesALL)
Add vector of Cleo Cones constructed of all final state particles.
void addThrustBm(float thrustBm)
Add magnitude of B thrust axis.
double et(int uf=-1) const
Returns calculated transverse energy.
This is a class for collecting variables used in continuum suppression.
Class to store reconstructed particles.
std::vector< const Track * > getTracks(const std::string &maskName="") const
Get vector of all (no mask) or a subset (use mask) of all Tracks in ROE.
Provides a type-safe way to pass members of the chargedStableSet set.
double Hoo(int i, int uf=-1) const
Returns calculated KSFW Moments.
std::vector< const ECLCluster * > getECLClusters(const std::string &maskName="") const
Get vector of all (no mask) or a subset (use mask) of all ECLClusters in ROE.
double mm2(int uf=-1) const
Returns calculated missing mass squared.
Class that bundles various TrackFitResults.
Class to calculate the Cleo clone variables.
Accessor to arrays stored in the data store.
TLorentzVector get4Vector() const
Returns Lorentz vector.
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
Moment-calculation of the k_sfw improved Super-Fox-Wolfram moments.
void addThrustOm(float thrustOm)
Add magnitude of ROE thrust axis.
void addKsfwFS0(const std::vector< float > &ksfwFS0)
Add vector of KSFW moments, Et, and mm2 for final state = 0.
void addThrustB(const TVector3 &thrustB)
Add ROE thrust axis.
Class to calculate the Fox-Wolfram moments up to order 8.
void addContinuumSuppression(const Particle *particle, const std::string &maskName)
Adds continuum suppression variables.