Belle II Software  release-05-02-19
PXDDQMEfficiencyNtupleModule.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 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
26 
27 //root stuff
28 #include "TVector3.h"
29 
30 #include "TFile.h"
31 #include "TNtuple.h"
32 
33 
34 namespace Belle2 {
45  class PXDDQMEfficiencyNtupleModule : public Module {
46 
47  public:
48 
53 
54  private:
55 
59  void event() override final;
60 
64  void initialize() override final;
65 
69  void terminate() override final;
70 
71 
72  private:
73  /* helper functions to do some of the calculations*/
75  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
77  bool isCloseToBorder(int u, int v, int checkDistance);
79  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
80 
82  bool m_useAlignment;
83 
85  VXD::GeoCache& m_vxdGeometry;
86 
87  std::string m_ntupleName;
88  std::string m_pxdClustersName;
89  std::string m_tracksName;
90  std::string m_recoTracksName;
91  std::string m_ROIsName;
92  std::string m_PXDInterceptListName;
99 
100  double m_pcut;
101  double m_momCut;
102  double m_pTCut;
103  unsigned int m_minSVDHits;
105 
106  TFile* m_file{};
107  TNtuple* m_tuple{};
108 
109  };
111 }
Belle2::PXDDQMEfficiencyNtupleModule::m_file
TFile * m_file
pointer to opened file
Definition: PXDDQMEfficiencyNtupleModule.h:114
Belle2::PXDDQMEfficiencyNtupleModule::isDeadPixelClose
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
Definition: PXDDQMEfficiencyNtupleModule.cc:260
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXDDQMEfficiencyNtupleModule::m_momCut
double m_momCut
Cut on fitted track momentum.
Definition: PXDDQMEfficiencyNtupleModule.h:109
Belle2::PXDDQMEfficiencyNtupleModule::m_pcut
double m_pcut
pValue-Cut for tracks
Definition: PXDDQMEfficiencyNtupleModule.h:108
Belle2::PXDDQMEfficiencyNtupleModule::m_intercepts
StoreArray< PXDIntercept > m_intercepts
store array of PXD Intercepts
Definition: PXDDQMEfficiencyNtupleModule.h:106
Belle2::PXDDQMEfficiencyNtupleModule::m_tracks
StoreArray< Track > m_tracks
store array of tracks
Definition: PXDDQMEfficiencyNtupleModule.h:103
Belle2::PXDDQMEfficiencyNtupleModule::m_pxdClustersName
std::string m_pxdClustersName
name of the store array of pxd clusters
Definition: PXDDQMEfficiencyNtupleModule.h:96
Belle2::PXDDQMEfficiencyNtupleModule::m_tracksName
std::string m_tracksName
name of the store array of tracks
Definition: PXDDQMEfficiencyNtupleModule.h:97
Belle2::PXDDQMEfficiencyNtupleModule::event
void event() override final
main function which fills trees and histograms
Definition: PXDDQMEfficiencyNtupleModule.cc:91
Belle2::PXDDQMEfficiencyNtupleModule::m_recoTracksName
std::string m_recoTracksName
name of the store array of recotracks
Definition: PXDDQMEfficiencyNtupleModule.h:98
Belle2::PXDDQMEfficiencyNtupleModule::m_pxdclusters
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
Definition: PXDDQMEfficiencyNtupleModule.h:102
Belle2::PXDDQMEfficiencyNtupleModule::m_minSVDHits
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
Definition: PXDDQMEfficiencyNtupleModule.h:111
Belle2::PXDDQMEfficiencyNtupleModule::initialize
void initialize() override final
initializes the need store arrays, trees and histograms
Definition: PXDDQMEfficiencyNtupleModule.cc:74
Belle2::RecoTrack
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:78
Belle2::PXDDQMEfficiencyNtupleModule::m_PXDInterceptListName
std::string m_PXDInterceptListName
intercept list name
Definition: PXDDQMEfficiencyNtupleModule.h:100
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::PXDDQMEfficiencyNtupleModule::m_tuple
TNtuple * m_tuple
pointer to opened tuple
Definition: PXDDQMEfficiencyNtupleModule.h:115
Belle2::PXDDQMEfficiencyNtupleModule::m_vxdGeometry
VXD::GeoCache & m_vxdGeometry
the geometry
Definition: PXDDQMEfficiencyNtupleModule.h:93
Belle2::PXDDQMEfficiencyNtupleModule::terminate
void terminate() override final
terminate , save tuple to file if needed
Definition: PXDDQMEfficiencyNtupleModule.cc:53
Belle2::PXDDQMEfficiencyNtupleModule::isCloseToBorder
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
Definition: PXDDQMEfficiencyNtupleModule.cc:250
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDDQMEfficiencyNtupleModule::m_maskedDistance
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
Definition: PXDDQMEfficiencyNtupleModule.h:112
Belle2::PXDDQMEfficiencyNtupleModule::m_ROIs
StoreArray< ROIid > m_ROIs
store array of ROIs
Definition: PXDDQMEfficiencyNtupleModule.h:105
Belle2::PXDDQMEfficiencyNtupleModule::m_ntupleName
std::string m_ntupleName
name output file
Definition: PXDDQMEfficiencyNtupleModule.h:95
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::PXDDQMEfficiencyNtupleModule::m_recoTracks
StoreArray< RecoTrack > m_recoTracks
store array of reco tracks
Definition: PXDDQMEfficiencyNtupleModule.h:104
Belle2::PXDDQMEfficiencyNtupleModule::m_pTCut
double m_pTCut
Cut on fitted track pT.
Definition: PXDDQMEfficiencyNtupleModule.h:110
Belle2::PXDIntercept
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
Definition: PXDIntercept.h:32
Belle2::PXDDQMEfficiencyNtupleModule::PXDDQMEfficiencyNtupleModule
PXDDQMEfficiencyNtupleModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: PXDDQMEfficiencyNtupleModule.cc:30
Belle2::PXDDQMEfficiencyNtupleModule::m_useAlignment
bool m_useAlignment
if true alignment will be used!
Definition: PXDDQMEfficiencyNtupleModule.h:90
Belle2::PXDDQMEfficiencyNtupleModule::findClosestCluster
int findClosestCluster(const VxdID &vxdid, TVector3 intersection)
find the closest cluster
Definition: PXDDQMEfficiencyNtupleModule.cc:215
Belle2::PXDDQMEfficiencyNtupleModule::m_ROIsName
std::string m_ROIsName
name of the store array of ROIs
Definition: PXDDQMEfficiencyNtupleModule.h:99