Belle II Software  release-05-01-25
ExporterTcInfo.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jakob Lettenbichler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vector>
14 #include <string>
15 
16 namespace Belle2 {
24  class ExporterTcInfo {
25  public:
27  ExporterTcInfo(int pdg, int motherID):
28  m_pdgCode(pdg),
29  m_motherID(motherID) {}
30 
31 
33  ~ExporterTcInfo() {}
34 
35 
38  void addHit(std::pair<double, std::string> hit) { m_hits.push_back(hit); }
39 
40 
42  void addHitIDs(const std::vector<int>& ids) { m_hitIDs = ids; }
43 
44 
46  int getNHits() { return m_hits.size(); }
47 
48 
50  std::vector<std::pair<double, std::string>>* getHits() { return &m_hits; }
51 
52 
54  std::vector<int>* getHitIDs() { return &m_hitIDs; }
55 
56 
60  void addInfo(const std::string& info) { m_tcInfo = info; }
61 
62 
64  std::string getInfo() { return m_tcInfo; }
65 
66 
68  int getPdgCode() { return m_pdgCode; }
69 
70 
72  int getMotherID() { return m_motherID; }
73 
74 
75  protected:
77  int m_pdgCode;
78 
81 
84  std::vector<std::pair<double, std::string>> m_hits;
85 
88  std::vector<int> m_hitIDs;
89 
92  std::string m_tcInfo;
93  };
95 }
96 
Belle2::ExporterTcInfo::m_hitIDs
std::vector< int > m_hitIDs
Stores the hitIDs of the hits attached to this TC, can be treated independently of hits themselves.
Definition: ExporterTcInfo.h:96
Belle2::ExporterTcInfo::~ExporterTcInfo
~ExporterTcInfo()
Destructor.
Definition: ExporterTcInfo.h:41
Belle2::ExporterTcInfo::m_hits
std::vector< std::pair< double, std::string > > m_hits
Contains already formatted hit information.
Definition: ExporterTcInfo.h:92
Belle2::ExporterTcInfo::getInfo
std::string getInfo()
returns info about tc in formatted without having the last piece of the Information
Definition: ExporterTcInfo.h:72
Belle2::ExporterTcInfo::m_pdgCode
int m_pdgCode
pdgCode of tc in the tc-file. TODO: implement a check which proves that suggested and real fileIndex ...
Definition: ExporterTcInfo.h:85
Belle2::ExporterTcInfo::m_motherID
int m_motherID
Index of the mother particle in the simulation.
Definition: ExporterTcInfo.h:88
Belle2::ExporterTcInfo::getPdgCode
int getPdgCode()
returns pdgCode of tc in the tc-file
Definition: ExporterTcInfo.h:76
Belle2::ExporterTcInfo::addHit
void addHit(std::pair< double, std::string > hit)
adds already formatted hit information.
Definition: ExporterTcInfo.h:46
Belle2::ExporterTcInfo::addInfo
void addInfo(const std::string &info)
Adds Info about the tc itself.
Definition: ExporterTcInfo.h:68
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ExporterTcInfo::getHitIDs
std::vector< int > * getHitIDs()
returns hitIDs of the hits attached to this TC (in no particular order!)
Definition: ExporterTcInfo.h:62
Belle2::ExporterTcInfo::getMotherID
int getMotherID()
returns index of the mother particle in the simulation
Definition: ExporterTcInfo.h:80
Belle2::ExporterTcInfo::getHits
std::vector< std::pair< double, std::string > > * getHits()
returns the hits added one by one using addHit
Definition: ExporterTcInfo.h:58
Belle2::ExporterTcInfo::addHitIDs
void addHitIDs(const std::vector< int > &ids)
adds IDs of hits for unique identification
Definition: ExporterTcInfo.h:50
Belle2::ExporterTcInfo::ExporterTcInfo
ExporterTcInfo(int pdg, int motherID)
Standard constructor.
Definition: ExporterTcInfo.h:35
Belle2::ExporterTcInfo::getNHits
int getNHits()
returns number of Hits attached to this tc
Definition: ExporterTcInfo.h:54
Belle2::ExporterTcInfo::m_tcInfo
std::string m_tcInfo
contains Info about the tc itself.
Definition: ExporterTcInfo.h:100