Belle II Software  release-05-02-19
PXDDQMEfficiencyModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Lueck, Ulf Stolzenberg, Benjamin Schwenker, Uwe Gebauer, Bjoern Spruck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 
12 #pragma once
13 
14 #include <framework/core/HistoModule.h>
15 #include <framework/datastore/StoreArray.h>
16 
17 #include <pxd/dataobjects/PXDCluster.h>
18 
19 #include <vxd/geometry/GeoCache.h>
20 #include <vxd/geometry/SensorInfoBase.h>
21 
22 #include <tracking/dataobjects/RecoTrack.h>
23 #include <tracking/dataobjects/ROIid.h>
24 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
25 
26 #include "TH1F.h"
27 #include "TH2F.h"
28 #include "TVector3.h"
29 
30 
31 namespace Belle2 {
46  class PXDDQMEfficiencyModule : public HistoModule {
47 
48  public:
49 
54 
55  private:
56 
60  void event() override final;
61 
65  void beginRun() override final;
66 
70  void initialize() override final;
71 
75  void defineHisto() override final;
76 
77 
78 
79  private:
80  /* helper functions to do some of the calculations*/
82  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
84  bool isCloseToBorder(int u, int v, int checkDistance);
86  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
87 
89  bool m_requireROIs;
90 
92  bool m_useAlignment;
94  bool m_maskDeadPixels;
96  bool m_cutBorders;
98  bool m_verboseHistos;
99 
101  VXD::GeoCache& m_vxdGeometry;
102 
105 
106  std::string m_pxdClustersName;
107  std::string m_tracksName;
108  std::string m_ROIsName;
111  int m_u_bins;
112  int m_v_bins;
113 
118 
119  double m_distcut;
120  double m_uFactor;
121  double m_vFactor;
122  double m_pcut;
123  double m_momCut;
124  double m_pTCut;
125  unsigned int m_minSVDHits;
126  double m_z0minCut;
127  double m_z0maxCut;
128  double m_d0Cut;
130 
131  //Histograms to later determine efficiency
132  std::map<VxdID, TH2F*> m_h_track_hits;
133  std::map<VxdID, TH2F*> m_h_matched_cluster;
134  std::map<VxdID, TH1F*> m_h_p;
135  std::map<VxdID, TH1F*> m_h_pt;
136  std::map<VxdID, TH1F*> m_h_su;
137  std::map<VxdID, TH1F*> m_h_sv;
138  std::map<VxdID, TH1F*> m_h_p2;
139  std::map<VxdID, TH1F*> m_h_pt2;
140  std::map<VxdID, TH1F*> m_h_su2;
141  std::map<VxdID, TH1F*> m_h_sv2;
142 
143  };
145 }
Belle2::PXDDQMEfficiencyModule::event
void event() override final
main function which fills trees and histograms
Definition: PXDDQMEfficiencyModule.cc:95
Belle2::PXDDQMEfficiencyModule::m_vxdGeometry
VXD::GeoCache & m_vxdGeometry
the geometry
Definition: PXDDQMEfficiencyModule.h:109
Belle2::PXDDQMEfficiencyModule::m_h_matched_cluster
std::map< VxdID, TH2F * > m_h_matched_cluster
histograms of matched clusters
Definition: PXDDQMEfficiencyModule.h:141
Belle2::PXDDQMEfficiencyModule::isCloseToBorder
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
Definition: PXDDQMEfficiencyModule.cc:311
Belle2::PXDDQMEfficiencyModule::m_z0maxCut
double m_z0maxCut
cut z0 maximum in cm (large positiv value eg 9999 disables)
Definition: PXDDQMEfficiencyModule.h:135
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXDDQMEfficiencyModule::m_histogramDirectoryName
std::string m_histogramDirectoryName
Where to save the histograms too.
Definition: PXDDQMEfficiencyModule.h:112
Belle2::PXDDQMEfficiencyModule::m_h_pt2
std::map< VxdID, TH1F * > m_h_pt2
histograms of pt2
Definition: PXDDQMEfficiencyModule.h:147
Belle2::PXDDQMEfficiencyModule::m_maskDeadPixels
bool m_maskDeadPixels
mask dead pixels
Definition: PXDDQMEfficiencyModule.h:102
Belle2::PXDDQMEfficiencyModule::m_momCut
double m_momCut
Cut on fitted track momentum.
Definition: PXDDQMEfficiencyModule.h:131
Belle2::PXDDQMEfficiencyModule::m_PXDInterceptListName
std::string m_PXDInterceptListName
intercept list name
Definition: PXDDQMEfficiencyModule.h:117
Belle2::PXDDQMEfficiencyModule::m_requireROIs
bool m_requireROIs
Require tracks going through ROIs.
Definition: PXDDQMEfficiencyModule.h:97
Belle2::PXDDQMEfficiencyModule::m_z0minCut
double m_z0minCut
cut z0 minimum in cm (large negativ value eg -9999 disables)
Definition: PXDDQMEfficiencyModule.h:134
Belle2::PXDDQMEfficiencyModule::beginRun
void beginRun() override final
begin run function which resets histograms
Definition: PXDDQMEfficiencyModule.cc:81
Belle2::PXDDQMEfficiencyModule::m_tracks
StoreArray< RecoTrack > m_tracks
store array of tracks
Definition: PXDDQMEfficiencyModule.h:123
Belle2::PXDDQMEfficiencyModule::m_h_sv
std::map< VxdID, TH1F * > m_h_sv
histograms of sv
Definition: PXDDQMEfficiencyModule.h:145
Belle2::PXDDQMEfficiencyModule::m_distcut
double m_distcut
distance cut in cm!
Definition: PXDDQMEfficiencyModule.h:127
Belle2::PXDDQMEfficiencyModule::m_h_track_hits
std::map< VxdID, TH2F * > m_h_track_hits
histograms of track hits
Definition: PXDDQMEfficiencyModule.h:140
Belle2::PXDDQMEfficiencyModule::m_verboseHistos
bool m_verboseHistos
add some verbose histograms for cuts
Definition: PXDDQMEfficiencyModule.h:106
Belle2::PXDDQMEfficiencyModule::m_tracksName
std::string m_tracksName
name of the store array of tracks
Definition: PXDDQMEfficiencyModule.h:115
Belle2::PXDDQMEfficiencyModule::m_pcut
double m_pcut
pValue-Cut for tracks
Definition: PXDDQMEfficiencyModule.h:130
Belle2::PXDDQMEfficiencyModule::m_ROIs
StoreArray< ROIid > m_ROIs
store array of ROIs
Definition: PXDDQMEfficiencyModule.h:124
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:78
Belle2::PXDDQMEfficiencyModule::m_h_pt
std::map< VxdID, TH1F * > m_h_pt
histograms of transverse momenta
Definition: PXDDQMEfficiencyModule.h:143
Belle2::PXDDQMEfficiencyModule::m_ROIsName
std::string m_ROIsName
name of the store array of ROIs
Definition: PXDDQMEfficiencyModule.h:116
Belle2::PXDDQMEfficiencyModule::m_h_p
std::map< VxdID, TH1F * > m_h_p
histograms of momenta
Definition: PXDDQMEfficiencyModule.h:142
Belle2::ROIid
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:35
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXDDQMEfficiencyModule::m_pxdclusters
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
Definition: PXDDQMEfficiencyModule.h:122
Belle2::PXDDQMEfficiencyModule::m_cutBorders
bool m_cutBorders
cut borders
Definition: PXDDQMEfficiencyModule.h:104
Belle2::PXDDQMEfficiencyModule::m_h_p2
std::map< VxdID, TH1F * > m_h_p2
histograms of p2
Definition: PXDDQMEfficiencyModule.h:146
Belle2::PXDDQMEfficiencyModule::m_vFactor
double m_vFactor
factor for track-error on distcut comparison
Definition: PXDDQMEfficiencyModule.h:129
Belle2::PXDDQMEfficiencyModule::isDeadPixelClose
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
Definition: PXDDQMEfficiencyModule.cc:321
Belle2::PXDDQMEfficiencyModule::m_uFactor
double m_uFactor
factor for track-error on distcut comparison
Definition: PXDDQMEfficiencyModule.h:128
Belle2::PXDDQMEfficiencyModule::findClosestCluster
int findClosestCluster(const VxdID &vxdid, TVector3 intersection)
find the closest cluster
Definition: PXDDQMEfficiencyModule.cc:276
Belle2::PXDDQMEfficiencyModule::m_pxdClustersName
std::string m_pxdClustersName
name of the store array of pxd clusters
Definition: PXDDQMEfficiencyModule.h:114
Belle2::PXDDQMEfficiencyModule::m_u_bins
int m_u_bins
the u bins
Definition: PXDDQMEfficiencyModule.h:119
Belle2::PXDDQMEfficiencyModule::m_intercepts
StoreArray< PXDIntercept > m_intercepts
store array of PXD Intercepts
Definition: PXDDQMEfficiencyModule.h:125
Belle2::PXDDQMEfficiencyModule::initialize
void initialize() override final
initializes the need store arrays, trees and histograms
Definition: PXDDQMEfficiencyModule.cc:68
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDDQMEfficiencyModule::m_d0Cut
double m_d0Cut
cut abs(d0) in cm (and negativ value eg -9999 disables)
Definition: PXDDQMEfficiencyModule.h:136
Belle2::PXDDQMEfficiencyModule::m_h_sv2
std::map< VxdID, TH1F * > m_h_sv2
histrograms of sv2
Definition: PXDDQMEfficiencyModule.h:149
Belle2::PXDDQMEfficiencyModule::defineHisto
void defineHisto() override final
actually defines the trees and histograms
Definition: PXDDQMEfficiencyModule.cc:232
Belle2::PXDDQMEfficiencyModule::m_h_su
std::map< VxdID, TH1F * > m_h_su
histograms of su
Definition: PXDDQMEfficiencyModule.h:144
Belle2::PXDDQMEfficiencyModule::m_v_bins
int m_v_bins
the v bins
Definition: PXDDQMEfficiencyModule.h:120
Belle2::PXDDQMEfficiencyModule::m_pTCut
double m_pTCut
Cut on fitted track pT.
Definition: PXDDQMEfficiencyModule.h:132
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::PXDDQMEfficiencyModule::PXDDQMEfficiencyModule
PXDDQMEfficiencyModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: PXDDQMEfficiencyModule.cc:31
Belle2::PXDDQMEfficiencyModule::m_useAlignment
bool m_useAlignment
if true alignment will be used!
Definition: PXDDQMEfficiencyModule.h:100
Belle2::PXDIntercept
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
Definition: PXDIntercept.h:32
Belle2::PXDDQMEfficiencyModule::m_maskedDistance
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
Definition: PXDDQMEfficiencyModule.h:137
Belle2::PXDDQMEfficiencyModule::m_h_su2
std::map< VxdID, TH1F * > m_h_su2
histrograms of su2
Definition: PXDDQMEfficiencyModule.h:148
Belle2::PXDDQMEfficiencyModule::m_minSVDHits
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
Definition: PXDDQMEfficiencyModule.h:133