Belle II Software  release-05-01-25
PXDDQMEfficiencySelftrackModule.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 
25 #include "TH1F.h"
26 #include "TH2F.h"
27 #include "TVector3.h"
28 
29 
30 namespace Belle2 {
48  class PXDDQMEfficiencySelftrackModule : public HistoModule {
49 
50  public:
51 
56 
57  private:
58 
62  void event() override final;
63 
67  void beginRun() override final;
68 
72  void initialize() override final;
73 
77  void defineHisto() override final;
78 
79 
80 
81  private:
83  /* returns the space point in local coordinates where the track hits the sensor:
84  sensorInfo: info of the sensor under investigation
85  aTrack: the track to be tested
86  isgood: flag which is false if some error occured (do not use the point if false)
87  du and dv are the uncertainties in u and v on the sensor plane of the fit (local coordinates)
88  */
89  TVector3 getTrackInterSec(const VXD::SensorInfoBase& pxdSensorInfo, const RecoTrack& aTrack, bool& isgood, double& du, double& dv);
91  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
93  bool isCloseToBorder(int u, int v, int checkDistance);
95  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
96 
98  bool m_requireROIs;
99 
101  bool m_useAlignment;
103  bool m_maskDeadPixels;
105  bool m_cutBorders;
107  bool m_verboseHistos;
108 
110  VXD::GeoCache& m_vxdGeometry;
111 
114 
115  std::string m_pxdClustersName;
116  std::string m_tracksName;
117  std::string m_ROIsName;
118 
119  int m_u_bins;
120  int m_v_bins;
121 
125 
126  double m_distcut;
127  double m_uFactor;
128  double m_vFactor;
129  double m_pcut;
130  double m_momCut;
131  double m_pTCut;
132  unsigned int m_minSVDHits;
133  double m_z0minCut;
134  double m_z0maxCut;
135  double m_d0Cut;
137 
138  //Histograms to later determine efficiency
139  std::map<VxdID, TH2F*> m_h_track_hits;
140  std::map<VxdID, TH2F*> m_h_matched_cluster;
141  std::map<VxdID, TH1F*> m_h_p;
142  std::map<VxdID, TH1F*> m_h_pt;
143  std::map<VxdID, TH1F*> m_h_su;
144  std::map<VxdID, TH1F*> m_h_sv;
145  std::map<VxdID, TH1F*> m_h_p2;
146  std::map<VxdID, TH1F*> m_h_pt2;
147  std::map<VxdID, TH1F*> m_h_su2;
148  std::map<VxdID, TH1F*> m_h_sv2;
149 
150  };
152 }
Belle2::PXDDQMEfficiencySelftrackModule::m_pTCut
double m_pTCut
Cut on fitted track pT.
Definition: PXDDQMEfficiencySelftrackModule.h:139
Belle2::PXDDQMEfficiencySelftrackModule::isCloseToBorder
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
Definition: PXDDQMEfficiencySelftrackModule.cc:369
Belle2::PXDDQMEfficiencySelftrackModule::m_ROIsName
std::string m_ROIsName
name of the store array of ROIs
Definition: PXDDQMEfficiencySelftrackModule.h:125
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXDDQMEfficiencySelftrackModule::m_h_track_hits
std::map< VxdID, TH2F * > m_h_track_hits
histograms of track hits
Definition: PXDDQMEfficiencySelftrackModule.h:147
Belle2::PXDDQMEfficiencySelftrackModule::getTrackInterSec
TVector3 getTrackInterSec(const VXD::SensorInfoBase &pxdSensorInfo, const RecoTrack &aTrack, bool &isgood, double &du, double &dv)
helper functions to do some of the calculations
Definition: PXDDQMEfficiencySelftrackModule.cc:230
Belle2::PXDDQMEfficiencySelftrackModule::m_h_p2
std::map< VxdID, TH1F * > m_h_p2
histograms of p2
Definition: PXDDQMEfficiencySelftrackModule.h:153
Belle2::PXDDQMEfficiencySelftrackModule::findClosestCluster
int findClosestCluster(const VxdID &vxdid, TVector3 intersection)
find the closest cluster
Definition: PXDDQMEfficiencySelftrackModule.cc:334
Belle2::PXDDQMEfficiencySelftrackModule::PXDDQMEfficiencySelftrackModule
PXDDQMEfficiencySelftrackModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: PXDDQMEfficiencySelftrackModule.cc:31
Belle2::PXDDQMEfficiencySelftrackModule::m_h_sv2
std::map< VxdID, TH1F * > m_h_sv2
histrograms of sv2
Definition: PXDDQMEfficiencySelftrackModule.h:156
Belle2::PXDDQMEfficiencySelftrackModule::m_maskDeadPixels
bool m_maskDeadPixels
mask dead pixels
Definition: PXDDQMEfficiencySelftrackModule.h:111
Belle2::PXDDQMEfficiencySelftrackModule::m_requireROIs
bool m_requireROIs
Require tracks going through ROIs.
Definition: PXDDQMEfficiencySelftrackModule.h:106
Belle2::PXDDQMEfficiencySelftrackModule::m_verboseHistos
bool m_verboseHistos
add some verbose histograms for cuts
Definition: PXDDQMEfficiencySelftrackModule.h:115
Belle2::PXDDQMEfficiencySelftrackModule::m_d0Cut
double m_d0Cut
cut abs(d0) in cm (and negativ value eg -9999 disables)
Definition: PXDDQMEfficiencySelftrackModule.h:143
Belle2::PXDDQMEfficiencySelftrackModule::m_tracksName
std::string m_tracksName
name of the store array of tracks
Definition: PXDDQMEfficiencySelftrackModule.h:124
Belle2::PXDDQMEfficiencySelftrackModule::m_vxdGeometry
VXD::GeoCache & m_vxdGeometry
the geometry
Definition: PXDDQMEfficiencySelftrackModule.h:118
Belle2::PXDDQMEfficiencySelftrackModule::m_h_sv
std::map< VxdID, TH1F * > m_h_sv
histograms of sv
Definition: PXDDQMEfficiencySelftrackModule.h:152
Belle2::PXDDQMEfficiencySelftrackModule::m_useAlignment
bool m_useAlignment
if true alignment will be used!
Definition: PXDDQMEfficiencySelftrackModule.h:109
Belle2::PXDDQMEfficiencySelftrackModule::beginRun
void beginRun() override final
begin run function which resets histograms
Definition: PXDDQMEfficiencySelftrackModule.cc:79
Belle2::PXDDQMEfficiencySelftrackModule::m_pxdclusters
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
Definition: PXDDQMEfficiencySelftrackModule.h:130
Belle2::PXDDQMEfficiencySelftrackModule::m_maskedDistance
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
Definition: PXDDQMEfficiencySelftrackModule.h:144
Belle2::PXDDQMEfficiencySelftrackModule::m_minSVDHits
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
Definition: PXDDQMEfficiencySelftrackModule.h:140
Belle2::PXDDQMEfficiencySelftrackModule::m_momCut
double m_momCut
Cut on fitted track momentum.
Definition: PXDDQMEfficiencySelftrackModule.h:138
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:78
Belle2::PXDDQMEfficiencySelftrackModule::m_h_su2
std::map< VxdID, TH1F * > m_h_su2
histrograms of su2
Definition: PXDDQMEfficiencySelftrackModule.h:155
Belle2::ROIid
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:35
Belle2::PXDDQMEfficiencySelftrackModule::m_h_pt2
std::map< VxdID, TH1F * > m_h_pt2
histograms of pt2
Definition: PXDDQMEfficiencySelftrackModule.h:154
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXDDQMEfficiencySelftrackModule::event
void event() override final
main function which fills trees and histograms
Definition: PXDDQMEfficiencySelftrackModule.cc:93
Belle2::PXDDQMEfficiencySelftrackModule::m_pcut
double m_pcut
pValue-Cut for tracks
Definition: PXDDQMEfficiencySelftrackModule.h:137
Belle2::PXDDQMEfficiencySelftrackModule::m_v_bins
int m_v_bins
the v bins
Definition: PXDDQMEfficiencySelftrackModule.h:128
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDDQMEfficiencySelftrackModule::m_z0minCut
double m_z0minCut
cut z0 minimum in cm (large negativ value eg -9999 disables)
Definition: PXDDQMEfficiencySelftrackModule.h:141
Belle2::PXDDQMEfficiencySelftrackModule::isDeadPixelClose
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
Definition: PXDDQMEfficiencySelftrackModule.cc:379
Belle2::PXDDQMEfficiencySelftrackModule::m_vFactor
double m_vFactor
factor for track-error on distcut comparison
Definition: PXDDQMEfficiencySelftrackModule.h:136
Belle2::PXDDQMEfficiencySelftrackModule::m_h_pt
std::map< VxdID, TH1F * > m_h_pt
histograms of transverse momenta
Definition: PXDDQMEfficiencySelftrackModule.h:150
Belle2::PXDDQMEfficiencySelftrackModule::m_h_matched_cluster
std::map< VxdID, TH2F * > m_h_matched_cluster
histograms of matched clusters
Definition: PXDDQMEfficiencySelftrackModule.h:148
Belle2::PXDDQMEfficiencySelftrackModule::defineHisto
void defineHisto() override final
actually defines the trees and histograms
Definition: PXDDQMEfficiencySelftrackModule.cc:290
Belle2::PXDDQMEfficiencySelftrackModule::initialize
void initialize() override final
initializes the need store arrays, trees and histograms
Definition: PXDDQMEfficiencySelftrackModule.cc:67
Belle2::PXDDQMEfficiencySelftrackModule::m_pxdClustersName
std::string m_pxdClustersName
name of the store array of pxd clusters
Definition: PXDDQMEfficiencySelftrackModule.h:123
Belle2::PXDDQMEfficiencySelftrackModule::m_cutBorders
bool m_cutBorders
cut borders
Definition: PXDDQMEfficiencySelftrackModule.h:113
Belle2::PXDDQMEfficiencySelftrackModule::m_histogramDirectoryName
std::string m_histogramDirectoryName
Where to save the histograms too.
Definition: PXDDQMEfficiencySelftrackModule.h:121
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::PXDDQMEfficiencySelftrackModule::m_distcut
double m_distcut
distance cut in cm!
Definition: PXDDQMEfficiencySelftrackModule.h:134
Belle2::PXDDQMEfficiencySelftrackModule::m_h_p
std::map< VxdID, TH1F * > m_h_p
histograms of momenta
Definition: PXDDQMEfficiencySelftrackModule.h:149
Belle2::PXDDQMEfficiencySelftrackModule::m_ROIs
StoreArray< ROIid > m_ROIs
store array of ROIs
Definition: PXDDQMEfficiencySelftrackModule.h:132
Belle2::PXDDQMEfficiencySelftrackModule::m_z0maxCut
double m_z0maxCut
cut z0 maximum in cm (large positiv value eg 9999 disables)
Definition: PXDDQMEfficiencySelftrackModule.h:142
Belle2::PXDDQMEfficiencySelftrackModule::m_uFactor
double m_uFactor
factor for track-error on distcut comparison
Definition: PXDDQMEfficiencySelftrackModule.h:135
Belle2::PXDDQMEfficiencySelftrackModule::m_u_bins
int m_u_bins
the u bins
Definition: PXDDQMEfficiencySelftrackModule.h:127
Belle2::PXDDQMEfficiencySelftrackModule::m_tracks
StoreArray< RecoTrack > m_tracks
store array of tracks
Definition: PXDDQMEfficiencySelftrackModule.h:131
Belle2::PXDDQMEfficiencySelftrackModule::m_h_su
std::map< VxdID, TH1F * > m_h_su
histograms of su
Definition: PXDDQMEfficiencySelftrackModule.h:151