Belle II Software  release-08-01-10
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 <pxd/dataobjects/PXDCluster.h>
16 
17 #include <vxd/geometry/GeoCache.h>
18 #include <vxd/geometry/SensorInfoBase.h>
19 
20 #include <tracking/dataobjects/RecoTrack.h>
21 #include <tracking/dataobjects/ROIid.h>
22 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
23 
24 #include "TH1F.h"
25 #include "TH1D.h"
26 #include "TH2F.h"
27 #include "TVector3.h"
28 
29 
30 namespace Belle2 {
46 
47  public:
48 
53 
54  private:
55 
59  void event() override final;
60 
64  void beginRun() override final;
65 
69  void initialize() override final;
70 
74  void defineHisto() override final;
75 
76 
77 
78  private:
79  /* helper functions to do some of the calculations*/
81  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
83  bool isCloseToBorder(int u, int v, int checkDistance);
85  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
86 
89 
98 
101 
104 
105  std::string m_pxdClustersName;
106  std::string m_tracksName;
107  std::string m_ROIsName;
110  int m_u_bins;
111  int m_v_bins;
112 
117 
118  double m_distcut;
119  double m_uFactor;
120  double m_vFactor;
121  double m_pcut;
122  double m_momCut;
123  double m_pTCut;
124  unsigned int m_minSVDHits;
125  double m_z0minCut;
126  double m_z0maxCut;
127  double m_d0Cut;
129 
130  std::map<VxdID, int> revLUT;
131 
132  //Histograms to later determine efficiency and crosscheck
133  TH1D* m_h_combined{};
134  std::map<VxdID, TH2F*> m_h_track_hits;
135  std::map<VxdID, TH2F*> m_h_matched_cluster;
136  std::map<VxdID, TH1F*> m_h_p;
137  std::map<VxdID, TH1F*> m_h_pt;
138  std::map<VxdID, TH1F*> m_h_su;
139  std::map<VxdID, TH1F*> m_h_sv;
140  std::map<VxdID, TH1F*> m_h_p2;
141  std::map<VxdID, TH1F*> m_h_pt2;
142  std::map<VxdID, TH1F*> m_h_su2;
143  std::map<VxdID, TH1F*> m_h_sv2;
144 
145  };
147 }
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Creates the basic histograms for PXD Efficiency DQM Simplified and adopted version of the testbeam px...
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 positiv 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
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 positiv 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 negativ 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
int findClosestCluster(const VxdID &vxdid, TVector3 intersection)
find the closest cluster
StoreArray< ROIid > m_ROIs
store array of ROIs
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.