Belle II Software development
SegmentNetworkAnalyzerModule.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 <tracking/trackFindingVXD/segmentNetwork/DirectedNodeNetworkContainer.h>
12#include <tracking/trackFindingVXD/segmentNetwork/Segment.h>
13#include <tracking/trackFindingVXD/segmentNetwork/TrackNode.h>
14
15#include <framework/datastore/StoreObjPtr.h>
16#include <framework/datastore/StoreArray.h>
17#include <mdst/dataobjects/MCParticle.h>
18#include <framework/core/Module.h>
19
20#include <TFile.h>
21#include <TTree.h>
22
23#include <string>
24
25namespace Belle2 {
32
33 public:
34
37 std::vector<double> phi{};
38 std::vector<double> theta{};
39 std::vector<double> pT{};
40 std::vector<int> signal{};
41 std::vector<int> passed{};
42 std::vector<int> pdg{};
43 std::vector<int> virtualIP{};
44 unsigned networkSize{};
45 unsigned networkConnections{};
46 };
47
50
52 void initialize() override;
53
55 void event() override;
56
58 void terminate() override;
59
60 private:
61
63 std::string m_PARAMnetworkName;
64
67
70
73
75 TFile* m_rFilePtr;
76
78 TTree* m_treePtr;
79
82
84 void makeBranches();
85
88 bool passed);
89
91 template<typename EntryType, typename MetaInfoType>
93
94 };
95
96}
Network of directed nodes of the type EntryType.
Module()
Constructor.
Definition Module.cc:30
std::string m_PARAMrootFileName
file name of the produced root file
void initialize() override
set up root file and check required Store Arrays
Belle2::StoreObjPtr< Belle2::DirectedNodeNetworkContainer > m_network
StoreObjPtr to the SegmentNetwork and TrackNode Network container.
RootVariables m_rootVariables
handle to collect all data for one event
void event() override
collect necessary data and put into TTree
std::string m_PARAMnetworkName
StoreArray name of the DirectedNodeNetworkContainer.
void terminate() override
write and close root file
Belle2::StoreArray< Belle2::MCParticle > m_mcParticles
MCParticles StoreArray for obtaining MC Information.
void analyzeCombination(const Belle2::Segment< Belle2::TrackNode > &outer, const Belle2::Segment< Belle2::TrackNode > &inner, bool passed)
get necessary data from three hit combination and put them into the root variables
static size_t getNConnections(Belle2::DirectedNodeNetwork< EntryType, MetaInfoType > &network)
get the number of connections between the nodes of a network
void makeBranches()
setup the Branches in the output TTree
The Segment class This class represents segments of track candidates needed for TrackFinderVXD-Module...
Definition Segment.h:25
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Abstract base class for different kinds of events.
keep all the variables for rootoutput in one struct
std::vector< double > phi
phi of the innermost hit (that is not the virtual IP)
std::vector< int > pdg
pdg of the related MCParticle
std::vector< int > virtualIP
did the segment contain the virtual IP
std::vector< double > theta
theta of the innermost hit (that is not the virtual IP)
unsigned networkConnections
number of connections in network
std::vector< int > passed
did segment combination pass the three hit filters
std::vector< int > signal
was segment combination signal
std::vector< double > pT
pT of the related MCParticle