Belle II Software  release-08-01-10
ExporterTcInfo.h
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 #pragma once
10 
11 #include <vector>
12 #include <string>
13 
14 namespace Belle2 {
23  public:
25  ExporterTcInfo(int pdg, int motherID):
26  m_pdgCode(pdg),
27  m_motherID(motherID) {}
28 
29 
32 
33 
36  void addHit(std::pair<double, std::string> hit) { m_hits.push_back(hit); }
37 
38 
40  void addHitIDs(const std::vector<int>& ids) { m_hitIDs = ids; }
41 
42 
44  int getNHits() { return m_hits.size(); }
45 
46 
48  std::vector<std::pair<double, std::string>>* getHits() { return &m_hits; }
49 
50 
52  std::vector<int>* getHitIDs() { return &m_hitIDs; }
53 
54 
58  void addInfo(const std::string& info) { m_tcInfo = info; }
59 
60 
62  std::string getInfo() { return m_tcInfo; }
63 
64 
66  int getPdgCode() { return m_pdgCode; }
67 
68 
70  int getMotherID() { return m_motherID; }
71 
72 
73  protected:
75  int m_pdgCode;
76 
79 
82  std::vector<std::pair<double, std::string>> m_hits;
83 
86  std::vector<int> m_hitIDs;
87 
90  std::string m_tcInfo;
91  };
93 }
94 
Bundles information for a single track candidate to be stored by EventInfo (needed for HitExporter,...
void addInfo(const std::string &info)
Adds Info about the tc itself.
std::string m_tcInfo
contains Info about the tc itself.
~ExporterTcInfo()
Destructor.
int getMotherID()
returns index of the mother particle in the simulation
void addHitIDs(const std::vector< int > &ids)
adds IDs of hits for unique identification
void addHit(std::pair< double, std::string > hit)
adds already formatted hit information.
int m_motherID
Index of the mother particle in the simulation.
std::vector< std::pair< double, std::string > > * getHits()
returns the hits added one by one using addHit
std::vector< std::pair< double, std::string > > m_hits
Contains already formatted hit information.
std::string getInfo()
returns info about tc in formatted without having the last piece of the Information
int m_pdgCode
pdgCode of tc in the tc-file. TODO: implement a check which proves that suggested and real fileIndex ...
int getNHits()
returns number of Hits attached to this tc
int getPdgCode()
returns pdgCode of tc in the tc-file
std::vector< int > m_hitIDs
Stores the hitIDs of the hits attached to this TC, can be treated independently of hits themselves.
std::vector< int > * getHitIDs()
returns hitIDs of the hits attached to this TC (in no particular order!)
ExporterTcInfo(int pdg, int motherID)
Standard constructor.
Abstract base class for different kinds of events.