8#include <tracking/trackFindingCDC/filters/cluster/BkgTruthClusterVarSet.h>
10#include <tracking/trackFindingCDC/eventdata/segments/CDCWireHitCluster.h>
11#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
12#include <tracking/trackFindingCDC/mclookup/CDCMCManager.h>
13#include <tracking/trackFindingCDC/mclookup/CDCMCHitLookUp.h>
16using namespace TrackFindingCDC;
32 if (not ptrCluster)
return false;
35 int nBackgroundHits = 0;
38 const CDCHit* hit = wireHit->getHit();
46 var<
named(
"n_background_hits_truth")>() = nBackgroundHits;
47 var<
named(
"background_fraction_truth")>() = 1.0 * nBackgroundHits / cluster.size();
48 var<
named(
"weight")>() = cluster.size();
49 var<
named(
"truth")>() = (1.0 * nBackgroundHits / cluster.size() > 0.8) ? 0 : 1;
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
void initialize() override
Signal the initialisation of the event processing - requires the Monte Carlo information.
void beginEvent() override
Signal the beginning of a new event - loads the Monte Carlo information.
bool extract(const CDCWireHitCluster *ptrCluster) final
Generate and assign the contained variables.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
void requireTruthInformation()
Require the MC information store arrays.
void fill()
Fill Monte Carlo look up maps from the DataStore.
static CDCMCManager & getInstance()
Getter for the singleton instance.
An aggregation of CDCWireHits.
Class representing a hit wire in the central drift chamber.
void initialize() override
Receive and dispatch signal before the start of the event processing.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
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.