Belle II Software  release-05-01-25
PXDDQMEfficiencyNtupleSelftrackModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Bjoern Spruck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 
12 #pragma once
13 
14 #include <framework/core/Module.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 #include <mdst/dataobjects/Track.h>
22 #include <tracking/dataobjects/RecoTrack.h>
23 #include <tracking/dataobjects/ROIid.h>
24 
25 
26 //root stuff
27 #include "TVector3.h"
28 
29 #include "TFile.h"
30 #include "TNtuple.h"
31 
32 
33 namespace Belle2 {
47  class PXDDQMEfficiencyNtupleSelftrackModule : public Module {
48 
49  public:
50 
55 
56  private:
57 
61  void event() override final;
62 
66  void initialize() override final;
67 
71  void terminate() override final;
72 
73 
74  private:
76  /* returns the space point in local coordinates where the track hits the sensor:
77  sensorInfo: info of the sensor under investigation
78  aTrack: the track to be tested
79  isgood: flag which is false if some error occured (do not use the point if false)
80  du and dv are the uncertainties in u and v on the sensor plane of the fit (local coordinates)
81  */
82  TVector3 getTrackInterSec(const VXD::SensorInfoBase& pxdSensorInfo, const RecoTrack& aTrack, bool& isgood, double& du, double& dv);
84  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
86  bool isCloseToBorder(int u, int v, int checkDistance);
88  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
89 
91  bool m_useAlignment;
92 
94  VXD::GeoCache& m_vxdGeometry;
95 
96  std::string m_pxdClustersName;
97  std::string m_tracksName;
98  std::string m_recoTracksName;
99  std::string m_ROIsName;
100 
105 
106  double m_pcut;
107  double m_momCut;
108  double m_pTCut;
109  unsigned int m_minSVDHits;
111 
112  TFile* m_file{};
113  TNtuple* m_tuple{};
114 
115  };
117 }
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_recoTracks
StoreArray< RecoTrack > m_recoTracks
store array of reco tracks
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:111
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_momCut
double m_momCut
Cut on fitted track momentum.
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:115
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_recoTracksName
std::string m_recoTracksName
name of the store array of recotracks
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:106
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::isCloseToBorder
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:311
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_tracksName
std::string m_tracksName
name of the store array of tracks
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:105
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::findClosestCluster
int findClosestCluster(const VxdID &vxdid, TVector3 intersection)
find the closest cluster
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:276
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_ROIs
StoreArray< ROIid > m_ROIs
store array of ROIs
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:112
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:78
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::isDeadPixelClose
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:321
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_useAlignment
bool m_useAlignment
if true alignment will be used!
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:99
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::PXDDQMEfficiencyNtupleSelftrackModule::event
void event() override final
main function which fills trees and histograms
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:89
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::terminate
void terminate() override final
terminate , save tuple to file if needed
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:52
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_pxdclusters
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:109
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_tracks
StoreArray< Track > m_tracks
store array of tracks
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:110
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::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: PXDDQMEfficiencyNtupleSelftrackModule.cc:215
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_maskedDistance
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:118
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_ROIsName
std::string m_ROIsName
name of the store array of ROIs
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:107
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_tuple
TNtuple * m_tuple
pointer to opened tuple
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:121
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_pxdClustersName
std::string m_pxdClustersName
name of the store array of pxd clusters
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:104
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_pTCut
double m_pTCut
Cut on fitted track pT.
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:116
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::initialize
void initialize() override final
initializes the need store arrays, trees and histograms
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:73
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::PXDDQMEfficiencyNtupleSelftrackModule
PXDDQMEfficiencyNtupleSelftrackModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: PXDDQMEfficiencyNtupleSelftrackModule.cc:30
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_minSVDHits
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:117
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_pcut
double m_pcut
pValue-Cut for tracks
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:114
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_file
TFile * m_file
pointer to opened file
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:120
Belle2::PXDDQMEfficiencyNtupleSelftrackModule::m_vxdGeometry
VXD::GeoCache & m_vxdGeometry
the geometry
Definition: PXDDQMEfficiencyNtupleSelftrackModule.h:102