Belle II Software development
ExporterEventInfo.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
9#include "tracking/vxdCaTracking/ExporterEventInfo.h"
10
11
12using namespace Belle2;
13// using namespace Belle2::Tracking;
14
15
16
17void ExporterEventInfo::addHit(ExporterHitInfo aHit) { m_hits.push_back(aHit); }
18
19
20
21void ExporterEventInfo::addTc(ExporterTcInfo aTc) { m_tcs.push_back(aTc); }
22
23
24
25std::vector<ExporterHitInfo>* ExporterEventInfo::getHits() { return &m_hits; }
26
27
28
29std::vector<ExporterTcInfo>* ExporterEventInfo::getTcs() { return &m_tcs; }
30
31
32
34
35
36
38
39
41{
42 int nMCHits = 0;
43 for (ExporterTcInfo tc : m_tcs) {
44 nMCHits += tc.getNHits();
45 }
46 return nMCHits;
47}
48
50{
51 int counter = 0;
52 for (ExporterHitInfo hit : m_hits) {
53 if (hit.getType() == type) { ++counter; }
54 }
55 return counter;
56}
void addTc(ExporterTcInfo aTc)
adds Tc to internal storage.
int getNSVDTrueHits()
returns number of stored svdTruehits
std::vector< ExporterTcInfo > * getTcs()
returns a pointer to internal vector of tcs
std::vector< ExporterHitInfo > m_hits
stores all hits of event
void addHit(ExporterHitInfo aHit)
adds Hit to internal storage.
std::vector< ExporterHitInfo > * getHits()
returns a pointer to internal vector of hits
std::vector< ExporterTcInfo > m_tcs
stores all tcs of event
int countHitsOfType(int type)
used by getXXXHits to determine number of hits of certain type found in current event
int getNPXDTrueHits()
returns number of stored pxdTruehits
int getNMCHits()
returns total number of stored mcHits stored in all Tcs of this event
Bundles information for a single hit to be stored by EventInfo (needed for HitExporter,...
Bundles information for a single track candidate to be stored by EventInfo (needed for HitExporter,...
Abstract base class for different kinds of events.