Belle II Software development
CDCWireHitVarSet.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <tracking/trackFindingCDC/filters/wireHit/CDCWireHitVarSet.h>
9#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
10#include <cdc/dataobjects/CDCHit.h>
11
12#include <framework/core/ModuleParamList.templateDetails.h>
13
14using namespace Belle2;
15using namespace TrackFindingCDC;
16
17CDCWireHitVarSet::CDCWireHitVarSet() : Super()
18{
19}
20
22{
24}
25
27{
28 const auto* cdcHit = wireHit->getHit();
29 var<named("adc")>() = cdcHit->getADCCount();
30 var<named("tot")>() = cdcHit->getTOT();
31 var<named("tdc")>() = cdcHit->getTDCCount();
32 var<named("slayer")>() = cdcHit->getISuperLayer() == 0 ? 0 : 1;
33 return true;
34}
void initialize() override
Receive signal before the start of the event processing.
bool extract(const CDCWireHit *object) final
Generate and assign the variables from the object.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
void initialize() override
Receive and dispatch signal before the start of the event processing.
static constexpr int named(const char *name)
Getter for the index from the name.
Definition: VarSet.h:78
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Definition: VarSet.h:93
Abstract base class for different kinds of events.