 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/Module.h>
14 #include <mdst/dataobjects/MCParticle.h>
15 #include <framework/datastore/StoreArray.h>
25 #include <boost/any.hpp>
37 class PhaseSpaceAnalysisModule :
public Module {
43 void event()
override;
48 std::vector<double>
MomX;
49 std::vector<double>
MomY;
50 std::vector<double>
MomZ;
53 std::vector<double>
Eta;
55 std::vector<double>
pT;
58 std::vector<double>
VertY;
59 std::vector<double>
VertZ;
111 m_mcPartCtr = std::vector<unsigned int>(nContainers, 0);
115 void initializeRootFile(std::string fileName, std::string writeOption, std::vector<std::string> treeNames);
119 template<
typename TrackCandType>
129 std::vector<std::vector<int> >
getDiffIds(
const std::vector<std::vector<int> >& allIDs);
TFile * m_rootFilePtr
Pointer to root file.
void event() override
event
std::vector< int > getMCParticleIDs(Belle2::StoreArray< TrackCandType > trackCands)
get all MCPartileIDs of tracks
void initialize() override
initialize
void terminate() override
terminate
void initializeRootFile(std::string fileName, std::string writeOption, std::vector< std::string > treeNames)
create a root file with file name
std::vector< double > VertZ
z position of vertex
bool m_PARAMdiffAnalysis
take containers pair-wise and only analize those particles that are found in one container but not in...
std::vector< std::string > m_PARAMcontainerNames
collection name of trackCands to be investigated
helper class to have all RootVariables assembled in one container
e_trackCandType
enum to differentiate between possible trackCandidate types
std::vector< double > MomY
y momentum
unsigned int m_noMcPartCtr
Counter for NULL pointers to MC Particles (should always be zero.
@ c_sptc
SpacePointTrackCand.
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.
std::vector< std::string > m_treeNames
names of the trees that are stored in the root file
std::vector< double > MomX
x momentum
@ c_gftc
genfit::TrackCand
std::vector< double > Eta
pseudo rapidity.
std::vector< double > Mass
mc particle mass
std::vector< std::string > m_PARAMtrackCandTypes
types of the track candidates in containerNames
std::vector< std::pair< boost::any, e_trackCandType > > m_tcStoreArrays
StoreArrays of the containers.
std::vector< double > pT
transverse momentum.
Abstract base class for different kinds of events.
std::vector< double > MomZ
z momentum
std::vector< double > Energy
mc particle energy
RootVariables m_rootVariables
root variables used for collecting data event-wise
unsigned int m_skippedTCsCtr
Counter for negative MC particle ids (should always be zero.
void initializeCounters(size_t nContainers)
initialize all counters to 0 to avoid undefined behavior
PhaseSpaceAnalysisModule()
Constructor.
std::vector< double > Charge
mc particle charge
std::vector< double > VertY
y position of vertex
std::vector< std::string > m_PARAMrootFileName
name of the output root file name
A Class to store the Monte Carlo particle information.
Accessor to arrays stored in the data store.
std::vector< int > PDG
mc particle pdg code
void getValuesForRoot(Belle2::MCParticle *mcParticle, RootVariables &rootVariables)
collect the values for root output
std::vector< double > VertX
x position of vertex
std::vector< unsigned int > m_mcPartCtr
container wise coutner of TrackCands / MCParticles
std::vector< TTree * > m_treePtrs
each container name gets its own tree in the root file