8#include <tracking/ckf/cdc/filters/states/CDCfromEclStateTruthVarSet.h>
10#include <tracking/ckf/cdc/entities/CDCCKFState.h>
11#include <ecl/dataobjects/ECLShower.h>
13#include <mdst/dataobjects/MCParticle.h>
15#include <tracking/dataobjects/RecoTrack.h>
21 const auto& path = pair->first;
22 const auto& state = pair->second;
25 const auto& seed = path->front();
26 const auto* seedRecoTrack = seed.getSeed();
27 const auto* seedEclShower = seedRecoTrack->getRelated<
ECLShower>(
"ECLShowers");
30 const auto* wireHit = state->getWireHit();
31 const auto* cdcHit = wireHit->getHit();
35 while (hitMCParticle->getMother()) {
36 hitMCParticle = hitMCParticle->
getMother();
40 var<
named(
"match")>() = seedMCParticle == hitMCParticle ?
true :
false;
41 var<
named(
"PDG")>() = seedMCParticle->getPDG();
44 var<
named(
"seed_p_truth")>() = seedMom.R();
45 var<
named(
"seed_theta_truth")>() = seedMom.Theta() * 180. / M_PI;
46 var<
named(
"seed_pt_truth")>() = seedMom.Rho();
47 var<
named(
"seed_pz_truth")>() = seedMom.Z();
48 var<
named(
"seed_px_truth")>() = seedMom.X();
49 var<
named(
"seed_py_truth")>() = seedMom.Y();
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
Class to store ECL Showers.
ROOT::Math::XYZVector getMomentum() const
The method to get return ROOT::Math::XYZVector Momentum.
A Class to store the Monte Carlo particle information.
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.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
MCParticle * getMother() const
Returns a pointer to the mother particle.
Abstract base class for different kinds of events.