8#include <tracking/ckf/cdc/filters/states/CDCStateTruthVarSet.h>
10#include <tracking/ckf/cdc/entities/CDCCKFState.h>
12#include <mdst/dataobjects/MCParticle.h>
14#include <tracking/dataobjects/RecoTrack.h>
20 const auto& path = pair->first;
21 const auto& state = pair->second;
24 const auto& seed = path->front();
25 const auto* seedRecoTrack = seed.getSeed();
26 const auto* seedMCTrack = seedRecoTrack->getRelated<
RecoTrack>(
"MCRecoTracks");
29 const auto* wireHit = state->getWireHit();
30 const auto* cdcHit = wireHit->getHit();
34 while (seedMCParticle->getMother()) {
35 seedMCParticle = seedMCParticle->getMother();
39 var<
named(
"match")>() = seedMCTrack == hitMCTrack ?
true :
false;
40 var<
named(
"PDG")>() = seedMCParticle->getPDG();
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
A Class to store the Monte Carlo particle information.
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.
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.
Abstract base class for different kinds of events.