Belle II Software development
HitXPModule.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 <framework/core/Module.h>
12#include <framework/datastore/StoreArray.h>
13#include <mdst/dataobjects/MCParticle.h>
14#include <tracking/dataobjects/hitXP.h>
15#include <TTree.h>
16#include <TFile.h>
17
18#include <set>
19
20namespace Belle2 {
41 class HitXPModule : public Module {
42 public:
43
45
47
50 void initialize() override;
51
53 void beginRun() override;
54
57 void event() override;
58
60 void endRun() override;
61
63 void terminate() override;
64
65 private:
66 TTree* m_tree = nullptr;
67 TFile* m_outputFile = nullptr;
68 std::vector<hitXP> m_hitXP;
69 std::set<hitXP, hitXP::timeCompare> m_hitXPSet;
70 bool c_addTree;
72 int m_trackNumber = 0;
73 int m_eventNumber = 0;
78 TTree* m_treeSel = nullptr;
79 TFile* m_outputFileSel = nullptr;
80 std::vector<hitXP> m_hitXPSel;
85 TTree* m_treeTiSel = nullptr;
86 TFile* m_outputFileTiSel = nullptr;
87 std::vector<hitXP> m_hitXPTiSel;
92 TFile* m_outputFileExt = nullptr;
93 TTree* m_treeExt = nullptr;
94 std::vector<double> m_EpositionEntryX;
95 std::vector<double> m_EpositionEntryY;
96 std::vector<double> m_EpositionEntryZ;
97 std::vector<double> m_EmomentumEntryX;
98 std::vector<double> m_EmomentumEntryY;
99 std::vector<double> m_EmomentumEntryZ;
100 std::vector<double> m_EpositionLocalEntryX;
101 std::vector<double> m_EpositionLocalEntryY;
102 std::vector<double> m_EpositionLocalEntryZ;
103 std::vector<int> m_EPDGID;
104 std::vector<double> m_Eposition0X;
105 std::vector<double> m_Eposition0Y;
106 std::vector<double> m_Eposition0Z;
107 std::vector<double> m_Emomentum0X;
108 std::vector<double> m_Emomentum0Y;
109 std::vector<double> m_Emomentum0Z;
110 std::vector<double> m_Etime;
111 std::vector<int> m_EsensorSensor;
112 std::vector<int> m_EsensorLayer;
113 std::vector<int> m_EsensorLadder;
114 std::vector<int> m_Ereconstructed;
115 std::vector<int> m_EclusterU;
116 std::vector<int> m_EclusterV;
117 std::vector<double> m_Echarge;
121 std::vector<double> m_EomegaEntry;
122 std::vector<double> m_Eomega0;
123 std::vector<double> m_Ed0Entry;
124 std::vector<double> m_Ed00;
125 std::vector<double> m_Ephi0Entry;
126 std::vector<double> m_Ephi00;
127 std::vector<double> m_Ez0Entry;
128 std::vector<double> m_Ez00;
129 std::vector<double> m_EtanlambdaEntry;
130 std::vector<double> m_Etanlambda0;
131 int m_Eprimary = 0;
135 protected:
136
137 };
139}
This module from a data root file builds a tree of hitXP (see the class to know all the information c...
Definition: HitXPModule.h:41
std::vector< double > m_EmomentumEntryX
external momentum at entry point, coordinate x
Definition: HitXPModule.h:97
std::vector< int > m_EclusterV
external flag of v-cluster
Definition: HitXPModule.h:116
TFile * m_outputFile
output file
Definition: HitXPModule.h:67
std::vector< double > m_EomegaEntry
external omega parameter at entry point
Definition: HitXPModule.h:121
std::vector< hitXP > m_hitXPSel
selected vector of hitXP
Definition: HitXPModule.h:80
TTree * m_treeTiSel
tight selected output tree
Definition: HitXPModule.h:85
TTree * m_tree
full output tree
Definition: HitXPModule.h:66
std::vector< double > m_Etanlambda0
external tanlambda parameter at IP
Definition: HitXPModule.h:130
std::vector< double > m_EtanlambdaEntry
external tanlambda parameter at entry point
Definition: HitXPModule.h:129
TTree * m_treeExt
external output tree
Definition: HitXPModule.h:93
std::vector< int > m_EPDGID
external PDGID
Definition: HitXPModule.h:103
std::vector< int > m_EsensorLayer
external layer of the hit
Definition: HitXPModule.h:112
int m_Eprimary
external flag for primary particles
Definition: HitXPModule.h:131
std::vector< double > m_EmomentumEntryY
external momentum at entry point, coordinate x
Definition: HitXPModule.h:98
void initialize() override
Initialize the Module.
Definition: HitXPModule.cc:43
int m_eventNumberTiSel
tight selected interative number of the event in the run
Definition: HitXPModule.h:89
bool c_addTree
parameter to produce additional tree
Definition: HitXPModule.h:70
void event() override
This method is the core of the module.
Definition: HitXPModule.cc:154
TFile * m_outputFileSel
selected output file
Definition: HitXPModule.h:79
TTree * m_treeSel
selected output tree
Definition: HitXPModule.h:78
std::vector< double > m_EpositionLocalEntryZ
external local position at entry point, coordinate z
Definition: HitXPModule.h:102
std::vector< int > m_Ereconstructed
external flag of track-reconstruction or not
Definition: HitXPModule.h:114
std::vector< double > m_EmomentumEntryZ
external momentum at entry point, coordinate x
Definition: HitXPModule.h:99
std::vector< double > m_Etime
external time of the hit
Definition: HitXPModule.h:110
void endRun() override
This method is called if the current run ends.
Definition: HitXPModule.cc:353
std::vector< double > m_Ephi0Entry
external phi0 parameter at entry point
Definition: HitXPModule.h:125
std::vector< double > m_Ed00
external d0 parameter at IP
Definition: HitXPModule.h:124
std::vector< int > m_EsensorSensor
external sensor of the hit
Definition: HitXPModule.h:111
int m_trackNumberSel
selected iterative number of the track in the run
Definition: HitXPModule.h:81
void terminate() override
This method is called at the end of the event processing.
Definition: HitXPModule.cc:385
std::vector< double > m_Emomentum0X
external momentum at IP, coordinate x
Definition: HitXPModule.h:107
std::vector< double > m_Eposition0X
external position at IP, coordinate x
Definition: HitXPModule.h:104
std::vector< double > m_EpositionLocalEntryY
external local position at entry point, coordinate y
Definition: HitXPModule.h:101
int m_trackIterator
iterator used to count track (m_trackNumber)
Definition: HitXPModule.h:75
std::vector< int > m_EsensorLadder
external ladder of the hit
Definition: HitXPModule.h:113
std::vector< double > m_EpositionLocalEntryX
external local position at entry point, coordinate x
Definition: HitXPModule.h:100
std::vector< double > m_Emomentum0Y
external momentum at IP, coordinate y
Definition: HitXPModule.h:108
std::vector< int > m_EclusterU
external flag of u-cluster
Definition: HitXPModule.h:115
int m_EeventNumber
external iterator of event in the run
Definition: HitXPModule.h:119
std::vector< double > m_EpositionEntryX
external position at entry point, coordinate x
Definition: HitXPModule.h:94
int m_numberHitPerTrackTiSel
tight selected counter of the number of the hit for each track
Definition: HitXPModule.h:90
std::vector< hitXP > m_hitXPTiSel
tight selected vector of hitXP
Definition: HitXPModule.h:87
int m_eventNumber
interative number of the event in the run
Definition: HitXPModule.h:73
int m_numberHitPerTrack
counter of the number of the hit for each track
Definition: HitXPModule.h:74
TFile * m_outputFileTiSel
tight selected output file
Definition: HitXPModule.h:86
void beginRun() override
Called when entering a new run.
Definition: HitXPModule.cc:152
int m_trackNumber
iterative number of the track in the run
Definition: HitXPModule.h:72
std::set< hitXP, hitXP::timeCompare > m_hitXPSet
set of the hitXP, used to order tn time he hit
Definition: HitXPModule.h:69
TFile * m_outputFileExt
external output file
Definition: HitXPModule.h:92
std::vector< double > m_EpositionEntryZ
external position at entry point, coordinate z
Definition: HitXPModule.h:96
int m_eventNumberSel
selected interative number of the event in the run
Definition: HitXPModule.h:82
std::vector< double > m_Emomentum0Z
external momentum at IP, coordinate z
Definition: HitXPModule.h:109
int m_trackNumberTiSel
tight selected iterative number of the track in the run
Definition: HitXPModule.h:88
std::vector< double > m_Ephi00
external phi0 parameter at IP
Definition: HitXPModule.h:126
std::vector< double > m_Echarge
external charge
Definition: HitXPModule.h:117
int m_numberHitPerTrackSel
selected counter of the number of the hit for each track
Definition: HitXPModule.h:83
std::vector< hitXP > m_hitXP
vector of the hitXP, used to fill the output tree
Definition: HitXPModule.h:68
int m_EtrackNumber
external iterator of track in the run
Definition: HitXPModule.h:118
std::vector< double > m_EpositionEntryY
external position at entry point, coordinate y
Definition: HitXPModule.h:95
int m_eventIterator
iterator used to count event number (m_eventNumber)
Definition: HitXPModule.h:76
std::vector< double > m_Ed0Entry
external d0 parameter at entry point
Definition: HitXPModule.h:123
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
Definition: HitXPModule.h:133
std::vector< double > m_Ez00
external z0 parameter at IP
Definition: HitXPModule.h:128
std::vector< double > m_Eomega0
external omega parameter at IP
Definition: HitXPModule.h:122
std::vector< double > m_Eposition0Z
external position at IP, coordinate z
Definition: HitXPModule.h:106
int m_EnumberHitPerTrack
external number of the hit for each track
Definition: HitXPModule.h:120
std::vector< double > m_Eposition0Y
external position at IP, coordinate y
Definition: HitXPModule.h:105
std::vector< double > m_Ez0Entry
external z0 parameter at entry point
Definition: HitXPModule.h:127
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.