Belle II Software development
PXDDQMEfficiencyModule.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
10#pragma once
11
12#include <framework/core/HistoModule.h>
13#include <framework/datastore/StoreArray.h>
14
15#include <vxd/geometry/GeoCache.h>
16
17#include "TH1F.h"
18#include "TH1D.h"
19#include "TH2F.h"
20
21
22namespace Belle2 {
27 class PXDCluster;
28 class RecoTrack;
29 class ROIid;
30 class PXDIntercept;
31
39
40 public:
41
46
47 private:
48
52 void event() override final;
53
57 void beginRun() override final;
58
62 void initialize() override final;
63
67 void defineHisto() override final;
68
69
70
71 private:
72 /* helper functions to do some of the calculations*/
74 int findClosestCluster(const VxdID& vxdid, ROOT::Math::XYZVector intersection);
76 bool isCloseToBorder(int u, int v, int checkDistance);
78 bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
79
82
91
94
97
98 std::string m_pxdClustersName;
99 std::string m_tracksName;
100 std::string m_ROIsName;
102
105
110
111 double m_distcut;
112 double m_uFactor;
113 double m_vFactor;
114 double m_pcut;
115 double m_momCut;
116 double m_pTCut;
117 unsigned int m_minSVDHits;
120 double m_d0Cut;
122
123 std::map<VxdID, int> revLUT;
124
125 //Histograms to later determine efficiency and crosscheck
126 TH1D* m_h_combined{};
127 std::map<VxdID, TH2F*> m_h_track_hits;
128 std::map<VxdID, TH2F*> m_h_matched_cluster;
129 std::map<VxdID, TH1F*> m_h_p;
130 std::map<VxdID, TH1F*> m_h_pt;
131 std::map<VxdID, TH1F*> m_h_su;
132 std::map<VxdID, TH1F*> m_h_sv;
133 std::map<VxdID, TH1F*> m_h_p2;
134 std::map<VxdID, TH1F*> m_h_pt2;
135 std::map<VxdID, TH1F*> m_h_su2;
136 std::map<VxdID, TH1F*> m_h_sv2;
137
138 };
139
140}
HistoModule()
Constructor.
Definition HistoModule.h:32
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition PXDCluster.h:30
PXDDQMEfficiencyModule()
Constructor: Sets the description, the properties and the parameters of the module.
std::map< VxdID, TH1F * > m_h_su
histograms of su
void initialize() override final
initializes the need store arrays, trees and histograms
std::map< VxdID, TH2F * > m_h_track_hits
histograms of track hits
double m_d0Cut
cut abs(d0) in cm (large positive value eg 9999 disables)
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
std::map< VxdID, TH1F * > m_h_su2
histrograms of su2
double m_vFactor
factor for track-error on distcut comparison
double m_distcut
distance cut in cm!
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
bool m_verboseHistos
add some verbose histograms for cuts
std::string m_PXDInterceptListName
intercept list name
double m_momCut
Cut on fitted track momentum.
std::map< VxdID, int > revLUT
reverse lookup sensor id -> index in histogram
std::map< VxdID, TH1F * > m_h_sv2
histrograms of sv2
int findClosestCluster(const VxdID &vxdid, ROOT::Math::XYZVector intersection)
find the closest cluster
void defineHisto() override final
actually defines the trees and histograms
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
double m_z0maxCut
cut z0 maximum in cm (large positive value eg 9999 disables)
double m_pcut
pValue-Cut for tracks
std::map< VxdID, TH1F * > m_h_pt2
histograms of pt2
bool m_requireROIs
Require tracks going through ROIs.
void event() override final
main function which fills trees and histograms
std::map< VxdID, TH1F * > m_h_sv
histograms of sv
std::string m_pxdClustersName
name of the store array of pxd clusters
std::string m_histogramDirectoryName
Where to save the histograms too.
TH1D * m_h_combined
combined histograms to workaround dqm glitch
double m_z0minCut
cut z0 minimum in cm (large negative value eg -9999 disables)
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
double m_pTCut
Cut on fitted track pT.
StoreArray< PXDIntercept > m_intercepts
store array of PXD Intercepts
std::string m_ROIsName
name of the store array of ROIs
std::map< VxdID, TH2F * > m_h_matched_cluster
histograms of matched clusters
std::map< VxdID, TH1F * > m_h_p2
histograms of p2
bool m_useAlignment
if true alignment will be used!
void beginRun() override final
begin run function which resets histograms
VXD::GeoCache & m_vxdGeometry
the geometry
StoreArray< RecoTrack > m_tracks
store array of tracks
double m_uFactor
factor for track-error on distcut comparison
std::map< VxdID, TH1F * > m_h_p
histograms of momenta
std::map< VxdID, TH1F * > m_h_pt
histograms of transverse momenta
std::string m_tracksName
name of the store array of tracks
StoreArray< ROIid > m_ROIs
store array of ROIs
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition ROIid.h:25
This is the Reconstruction Event-Data Model Track.
Definition RecoTrack.h:79
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
Definition GeoCache.h:38
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
Abstract base class for different kinds of events.