8 #include <tracking/ckf/cdc/filters/paths/CDCPathTruthVarSet.h>
10 #include <tracking/ckf/cdc/entities/CDCCKFState.h>
12 #include <ecl/dataobjects/ECLShower.h>
13 #include <mdst/dataobjects/MCParticle.h>
15 #include <tracking/dataobjects/RecoTrack.h>
23 const auto& seed = path->front();
24 auto* seedRecoTrack = seed.getSeed();
25 auto* seedMCTrack = seedRecoTrack->getRelated<
RecoTrack>(
"MCRecoTracks");
40 std::vector<MCParticle*> daughterMCParticles;
41 if (seedMCParticle->getNDaughters() > 0) {
44 while (daughterMCParticles.size() == 1) {
45 daughterMCParticles = daughterMCParticles.at(0)->getDaughters();
47 if (daughterMCParticles.size() > 1) {
48 daughters = daughterMCParticles.size();
52 while (seedMCParticle->getMother()) {
53 seedMCParticle = seedMCParticle->getMother();
59 mcTrackHits = seedMCTrack->getNumberOfCDCHits();
61 var<named(
"mcTrackHits")>() = mcTrackHits;
63 var<named(
"daughters")>() = daughters;
64 var<named(
"PDG")>() = seedMCParticle->getPDG();
66 auto seedMom = seedMCParticle->getMomentum();
67 var<named(
"seed_p_truth")>() = seedMom.Mag();
68 var<named(
"seed_theta_truth")>() = seedMom.Theta() * 180. / M_PI;
69 var<named(
"seed_pt_truth")>() = seedMom.Perp();
70 var<named(
"seed_pz_truth")>() = seedMom.Z();
71 var<named(
"seed_px_truth")>() = seedMom.X();
72 var<named(
"seed_py_truth")>() = seedMom.Y();
Class to store ECL Showers.
A Class to store the Monte Carlo particle information.
std::vector< Belle2::MCParticle * > getDaughters() const
Get vector of all daughter particles, empty vector if none.
This is the Reconstruction Event-Data Model Track.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
AObject Object
Type of the object to be analysed.
Abstract base class for different kinds of events.