Belle II Software  release-08-01-10
SVDPerformanceTTreeModule.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/StoreObjPtr.h>
13 #include <framework/database/DBObjPtr.h>
14 #include <framework/dataobjects/EventT0.h>
15 #include <framework/dbobjects/HardwareClockSettings.h>
16 
17 #include <TTree.h>
18 #include <TFile.h>
19 
20 namespace Belle2 {
30 
31  public:
35  void initialize() override;
37  void terminate() override;
39  void event() override;
41  void beginRun() override;
42 
43  private:
44 
50  double m_apvClockPeriod = std::numeric_limits<double>::quiet_NaN();
51 
52  std::string m_rootFileName = "";
53  TFile* m_rootFilePtr = nullptr;
55  std::string m_recoTracksStoreArrayName{"RecoTracks"};
57  TTree* m_t_U = nullptr;
58  TTree* m_t_V = nullptr;
59  /* event-wise branches*/
60  float m_cdcEventT0 = std::numeric_limits<float>::quiet_NaN();
61  float m_cdcEventT0_6SRF = std::numeric_limits<float>::quiet_NaN();
62  float m_cdcEventT0_3SRF = std::numeric_limits<float>::quiet_NaN();
63  float m_cdcEventT0Err = std::numeric_limits<float>::quiet_NaN();
64  unsigned int m_svdTB = 0;
65  /* Branches of SVD u and v clusters tree */
66  float m_svdClCharge = 0;
67  float m_svdClSNR = 0;
68  float m_svdClTime = 0;
69  float m_svdClTimeErr = 0;
70  float m_svdClTime_6SRF = 0;
71  float m_svdClTime_3SRF = 0;
72  float m_svdRes = 0;
73  float m_svdPitch = 0;
74  float m_svdWidth = 0;
75  float m_svdLength = 0;
76  float m_svdClIntStrPos = 0;
77  float m_svdClPos = 0;
78  float m_svdClPosErr = 0;
79  float m_svdTruePos = -99;
80  float m_svdClPhi = 0;
81  float m_svdClZ = 0;
82  std::vector<float> m_svdStripCharge;
83  std::vector<float> m_svdStrip6Samples;
84  std::vector<float> m_svdStripTime;
85  std::vector<float> m_svdStripPosition;
86  int m_svdTrkPXDHits = 0;
87  int m_svdTrkSVDHits = 0;
88  int m_svdTrkCDCHits = 0;
89  float m_svdTrkd0 = 0;
90  float m_svdTrkz0 = 0;
91  float m_svdTrkpT = 0;
92  float m_svdTrkpCM = 0;
94  float m_svdTrkPos = 0;
95  float m_svdTrkPosOS = 0;
96  float m_svdTrkPosErr = 0;
97  float m_svdTrkPosErrOS = 0;
98  float m_svdTrkQoP = 0;
99  float m_svdTrkPrime = 0;
100  float m_svdTrkPrimeOS = 0;
105  unsigned int m_svdLayer = 0;
106  unsigned int m_svdLadder = 0;
107  unsigned int m_svdSensor = 0;
108  unsigned int m_svdSize = 0;
109  unsigned int m_svdFF = 0;
111  };
113 }
114 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
The module is used to create a TTree to study SVD clusters, genfit unbiased residuals and many other ...
float m_svdTrkPrimeOS
tan of incident angle projected on v/u,w (other side)
float m_svdClIntStrPos
cluster interstrip position
float m_svdTrkPosErrOS
track position error on the other side
TTree * m_t_V
tree containing info related to the V side clusters
void initialize() override
Register input and output data.
std::vector< float > m_svdStripPosition
absolute position of the strips of the cluster
float m_svdClPosErr
cluster position error
int m_svdTrkCDCHits
number of CDC hits on the track
float m_svdTrkPrime
tan of incident angle projected on u/v,w
void event() override
Compute the variables and fill the tree.
int m_svdTrkPXDHits
number of PXD hits on the track
void terminate() override
Write the TTrees to the file.
float m_cdcEventT0_3SRF
CDC event T0 in the 3-sample SVD ref frame.
std::vector< float > m_svdStripCharge
charge of the strips of the cluster
void beginRun() override
Compute the APV clock period.
float m_svdTrkTraversedLength
traversed length of the track in the sensor
float m_svdTrkPosUnbiased
unbiased track position
DBObjPtr< HardwareClockSettings > m_hwClock
Hardware Clocks.
std::vector< float > m_svdStrip6Samples
6 samples of the strips of the cluster
float m_svdRes
residual computed by genfit
StoreObjPtr< EventT0 > m_EventT0
event T0
float m_svdTrkPosErrUnbiased
unbiased track position error
TTree * m_t_U
tree containing info related to the U side clusters
float m_svdTrkPosOS
track position on the other side
float m_svdClTime_6SRF
cluster time in the 6-sample SVD ref frame
std::vector< float > m_svdStripTime
time of the strips of the cluster
float m_svdTrkPrimeUnbiased
unbiased tan of incident angle projected on u,w
float m_cdcEventT0_6SRF
CDC event T0 in the 6-sample SVD ref frame.
std::string m_recoTracksStoreArrayName
storeArray name of the input and output RecoTracks
TFile * m_rootFilePtr
pointer at root file used for storing histograms
float m_svdClTime_3SRF
cluster time in the 3-sample SVD ref frame
int m_svdTrkSVDHits
number of SVD hits on the track
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.