Belle II Software prerelease-11-00-00a
PXDDQMEfficiencySelftrackModule.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/HistoModule.h>
12#include <framework/datastore/StoreArray.h>
13
14#include <vxd/geometry/GeoCache.h>
15
16#include <TH1F.h>
17#include <TH2F.h>
18
19namespace Belle2 {
24 class PXDCluster;
25 class RecoTrack;
26 class ROIid;
27
41
42 public:
43
48
49 private:
50
54 void event() override final;
55
59 void beginRun() override final;
60
64 void initialize() override final;
65
69 void defineHisto() override final;
70
71
72
73 private:
75 /* returns the space point in local coordinates where the track hits the sensor:
76 sensorInfo: info of the sensor under investigation
77 aTrack: the track to be tested
78 isgood: flag which is false if some error occurred (do not use the point if false)
79 du and dv are the uncertainties in u and v on the sensor plane of the fit (local coordinates)
80 */
81 ROOT::Math::XYZVector getTrackInterSec(const VXD::SensorInfoBase& pxdSensorInfo, const RecoTrack& aTrack, bool& isgood, double& du,
82 double& dv);
84 int findClosestCluster(const VxdID& vxdid, ROOT::Math::XYZVector intersection);
86 bool isCloseToBorder(int u, int v, int checkDistance);
88 bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
89
92
101
104
107
108 std::string m_pxdClustersName;
109 std::string m_tracksName;
110 std::string m_ROIsName;
111
114
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;
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 };
144
145}
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
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
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::map< VxdID, TH1F * > m_h_sv2
histrograms of sv2
int findClosestCluster(const VxdID &vxdid, ROOT::Math::XYZVector intersection)
find the closest cluster
PXDDQMEfficiencySelftrackModule()
Constructor: Sets the description, the properties and the parameters of the module.
void defineHisto() override final
actually defines the trees and histograms
ROOT::Math::XYZVector getTrackInterSec(const VXD::SensorInfoBase &pxdSensorInfo, const RecoTrack &aTrack, bool &isgood, double &du, double &dv)
helper functions to do some of the calculations
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)
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.
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.
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
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
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
Base class to provide Sensor Information for PXD and SVD.
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
Abstract base class for different kinds of events.