Belle II Software  release-08-01-10
PXDDQMEfficiencyNtupleModule.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/Module.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 #include <mdst/dataobjects/Track.h>
20 #include <tracking/dataobjects/RecoTrack.h>
21 #include <tracking/dataobjects/ROIid.h>
22 
23 #include <tracking/pxdDataReductionClasses/PXDInterceptor.h>
24 
25 //root stuff
26 #include "TVector3.h"
27 
28 #include "TFile.h"
29 #include "TNtuple.h"
30 
31 
32 namespace Belle2 {
44 
45  public:
46 
51 
52  private:
53 
57  void event() override final;
58 
62  void initialize() override final;
63 
67  void terminate() override final;
68 
69 
70  private:
71  /* helper functions to do some of the calculations*/
73  int findClosestCluster(const VxdID& vxdid, TVector3 intersection);
75  bool isCloseToBorder(int u, int v, int checkDistance);
77  bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID& moduleID);
78 
81 
84 
85  std::string m_ntupleName;
86  std::string m_pxdClustersName;
87  std::string m_tracksName;
88  std::string m_recoTracksName;
89  std::string m_ROIsName;
90  std::string m_PXDInterceptListName;
97 
98  double m_pcut;
99  double m_momCut;
100  double m_pTCut;
101  unsigned int m_minSVDHits;
103 
104  TFile* m_file{};
105  TNtuple* m_tuple{};
106 
107  };
109 }
Base class for Modules.
Definition: Module.h:72
Creates Ntuples for PXD Efficiency analysis.
void initialize() override final
initializes the need store arrays, trees and histograms
bool isCloseToBorder(int u, int v, int checkDistance)
is it close to the border
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
StoreArray< PXDCluster > m_pxdclusters
store array of pxd clusters
std::string m_PXDInterceptListName
intercept list name
double m_momCut
Cut on fitted track momentum.
bool isDeadPixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
is a dead pixel close
void terminate() override final
terminate , save tuple to file if needed
void event() override final
main function which fills trees and histograms
std::string m_pxdClustersName
name of the store array of pxd clusters
StoreArray< Track > m_tracks
store array of tracks
std::string m_recoTracksName
name of the store array of recotracks
int m_maskedDistance
Distance inside which no dead pixel or module border is allowed.
StoreArray< PXDIntercept > m_intercepts
store array of PXD Intercepts
std::string m_ROIsName
name of the store array of ROIs
StoreArray< RecoTrack > m_recoTracks
store array of reco tracks
bool m_useAlignment
if true alignment will be used!
PXDDQMEfficiencyNtupleModule()
Constructor: Sets the description, the properties and the parameters of the module.
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.