12#include <framework/core/Module.h>
13#include <mdst/dataobjects/MCParticle.h>
14#include <framework/datastore/StoreArray.h>
15#include <genfit/TrackCand.h>
16#include <tracking/spacePointCreation/SpacePointTrackCand.h>
26#include <boost/any.hpp>
44 void event()
override;
54 std::vector<double>
Eta;
56 std::vector<double>
pT;
112 m_mcPartCtr = std::vector<unsigned int>(nContainers, 0);
120 void initializeRootFile(std::string fileName, std::string writeOption, std::vector<std::string> treeNames);
124 template<
typename TrackCandType>
134 std::vector<std::vector<int> >
getDiffIds(
const std::vector<std::vector<int> >& allIDs);
A Class to store the Monte Carlo particle information.
Module for analysing the phase space of genfit::TrackCand(s) and SpacePointTrackCand(s) NOTE: this is...
void initializeRootFile(std::string fileName, std::string writeOption, std::vector< std::string > treeNames)
create a root file with file name
std::vector< std::string > m_PARAMtrackCandTypes
types of the track candidates in containerNames
std::vector< unsigned int > m_mcPartCtr
container wise counter of TrackCands / MCParticles
void initialize() override
initialize
StoreArray< SpacePointTrackCand > m_SpacePointTrackCands
SpacePointTrackCands StoreArray.
RootVariables m_rootVariables
root variables used for collecting data event-wise
bool m_PARAMdiffAnalysis
take containers pair-wise and only analyze those particles that are found in one container but not in...
unsigned int m_noMcPartCtr
Counter for nullptr pointers to MC Particles (should always be zero.
void event() override
event
void terminate() override
terminate
std::vector< std::string > m_treeNames
names of the trees that are stored in the root file
StoreArray< genfit::TrackCand > m_GenfitTrackCands
Genfit::TrackCands StoreArray.
std::vector< std::string > m_PARAMrootFileName
name of the output root file name
unsigned int m_skippedTCsCtr
Counter for negative MC particle ids (should always be zero.
e_trackCandType
enum to differentiate between possible trackCandidate types
@ c_gftc
genfit::TrackCand
@ c_sptc
SpacePointTrackCand.
std::vector< TTree * > m_treePtrs
each container name gets its own tree in the root file
std::vector< std::string > m_PARAMcontainerNames
collection name of trackCands to be investigated
void initializeCounters(size_t nContainers)
initialize all counters to 0 to avoid undefined behavior
std::vector< std::vector< int > > getDiffIds(const std::vector< std::vector< int > > &allIDs)
the first vector in allIds is used as reference to which all other vectors of allIDs are compared.
void getValuesForRoot(Belle2::MCParticle *mcParticle, RootVariables &rootVariables)
collect the values for root output
std::vector< int > getMCParticleIDs(Belle2::StoreArray< TrackCandType > trackCands)
get all MCPartileIDs of tracks
TFile * m_rootFilePtr
Pointer to root file.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
PhaseSpaceAnalysisModule()
Constructor.
std::vector< std::pair< boost::any, e_trackCandType > > m_tcStoreArrays
StoreArrays of the containers.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.
helper class to have all RootVariables assembled in one container
std::vector< double > Mass
mc particle mass
std::vector< double > Eta
pseudo rapidity.
std::vector< double > MomY
y momentum
std::vector< double > VertZ
z position of vertex
std::vector< double > MomX
x momentum
std::vector< int > PDG
mc particle pdg code
std::vector< double > MomZ
z momentum
std::vector< double > VertY
y position of vertex
std::vector< double > VertX
x position of vertex
std::vector< double > Charge
mc particle charge
std::vector< double > pT
transverse momentum.
std::vector< double > Energy
mc particle energy