Belle II Software development
SVDEventT0PerformanceTTreeModule.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 <framework/datastore/StoreObjPtr.h>
14#include <framework/dataobjects/EventT0.h>
15#include <svd/dataobjects/SVDCluster.h>
16
17#include <TTree.h>
18#include <TFile.h>
19
20namespace Belle2 {
30
31 public:
32
36 void initialize() override;
38 void terminate() override;
40 void event() override;
41
42 private:
43
44 //datastore
48 //rootfile
49 std::string m_rootFileName = "";
50 TFile* m_rootFilePtr = nullptr;
52 std::string m_recoTracksStoreArrayName = "";
54 TTree* m_t = nullptr;
56 /* Branches of the tree, one fill per event */
57 std::vector<float> m_svdClCharge;
58 std::vector<float> m_svdClSNR;
59 std::vector<float> m_svdClTime;
60 std::vector<float> m_svdClTimeErr;
61 std::vector<float> m_svdClPos;
62 std::vector<float> m_svdClPosErr;
63 std::vector<float> m_svdTrueTime;
64 std::vector<int> m_svdTrkPXDHits;
65 std::vector<int> m_svdTrkSVDHits;
66 std::vector<int> m_svdTrkCDCHits;
67 std::vector<float> m_svdTrkd0;
68 std::vector<float> m_svdTrkz0;
69 std::vector<float> m_svdTrkp;
70 std::vector<float> m_svdTrkpT;
71 std::vector<float> m_svdTrkpCM;
72 std::vector<float> m_svdTrkTheta;
73 std::vector<float> m_svdTrkPhi;
74 std::vector<float> m_svdTrkCharge;
75 std::vector<float> m_svdTrkPValue;
76 std::vector<float> m_svdTrkNDF;
77 std::vector<int> m_svdLayer;
78 std::vector<int> m_svdLadder;
79 std::vector<int> m_svdSensor;
80 std::vector<int> m_svdSize;
81 std::vector<int> m_svdisUside;
82 std::vector<int> m_trkNumber;
86 float m_eventT0 = std::numeric_limits<float>::quiet_NaN();
87 float m_eventT0Err = std::numeric_limits<float>::quiet_NaN();
88 float m_svdEventT0 = std::numeric_limits<float>::quiet_NaN();
89 float m_svdEventT0Err = std::numeric_limits<float>::quiet_NaN();
90 float m_svdOnlineEventT0 = std::numeric_limits<float>::quiet_NaN();
91 float m_svdOnlineEventT0Err = std::numeric_limits<float>::quiet_NaN();
92 float m_cdcEventT0 = std::numeric_limits<float>::quiet_NaN();
93 float m_cdcEventT0Err = std::numeric_limits<float>::quiet_NaN();
94 float m_cdcOnlineEventT0 = std::numeric_limits<float>::quiet_NaN();
95 float m_cdcOnlineEventT0Err = std::numeric_limits<float>::quiet_NaN();
96 float m_topEventT0 = std::numeric_limits<float>::quiet_NaN();
97 float m_topEventT0Err = std::numeric_limits<float>::quiet_NaN();
98 float m_topOnlineEventT0 = std::numeric_limits<float>::quiet_NaN();
99 float m_topOnlineEventT0Err = std::numeric_limits<float>::quiet_NaN();
100 float m_eclEventT0 = std::numeric_limits<float>::quiet_NaN();
101 float m_eclEventT0Err = std::numeric_limits<float>::quiet_NaN();
102 float m_eclOnlineEventT0 = std::numeric_limits<float>::quiet_NaN();
103 float m_eclOnlineEventT0Err = std::numeric_limits<float>::quiet_NaN();
104 int m_eclTCEmax = std::numeric_limits<int>::quiet_NaN();
105 int m_eclTCid = std::numeric_limits<int>::quiet_NaN();
106 int m_nTracks = 0;
107 int m_svdTB = -1;
108 float m_trueEventT0 = std::numeric_limits<float>::quiet_NaN();
109 int m_exp = -99;
110 int m_run = -99;
111 int m_event = -99;
113 };
115}
116
Base class for Modules.
Definition: Module.h:72
The module is used to create a TTree to study SVD EventT0.
std::vector< float > m_svdTrkTheta
polar angle of the track
std::vector< float > m_svdTrkPValue
pValue of the track
std::vector< float > m_svdTrkCharge
charge of the track
std::vector< float > m_svdClPosErr
cluster position error
std::vector< int > m_svdTrkSVDHits
number of SVD hits on the track
void initialize() override
Register input and output data.
std::vector< float > m_svdTrkPhi
azimuthal angle of the track
void event() override
Compute the variables and fill the tree.
std::vector< int > m_svdTrkPXDHits
number of PXD hits on the track
void terminate() override
Write the TTree to the file.
std::vector< float > m_svdTrkpCM
pCM of the track
std::vector< float > m_svdTrkNDF
pValue of the track
std::vector< int > m_svdTrkCDCHits
number of CDC hits on the track
std::vector< float > m_svdClTimeErr
cluster time error
TTree * m_t
tree containing info related to the clusters related to tracks
std::string m_recoTracksStoreArrayName
storeArray name of the input and output RecoTracks
TFile * m_rootFilePtr
pointer at root file used for storing histograms
std::vector< int > m_trkNumber
track number in the event
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.