 |
Belle II Software
release-05-01-25
|
11 #include <svd/modules/svdDQM/SVDDQMEfficiencyModule.h>
12 #include "TDirectory.h"
28 setDescription(
"Create basic histograms for SVD efficiency");
31 setPropertyFlags(c_ParallelProcessingCertified);
34 addParam(
"svdClustersName", m_svdClustersName,
"name of StoreArray with SVD cluster", std::string(
""));
35 addParam(
"interceptsName", m_interceptsName,
"name of StoreArray with SVDIntercepts", std::string(
""));
37 addParam(
"histogramDirectoryName", m_histogramDirectoryName,
"Name of the directory where histograms will be placed",
38 std::string(
"SVDEfficiency"));
40 addParam(
"binsU", m_u_bins,
"histogram bins in u direction",
int(4));
41 addParam(
"binsV", m_v_bins,
"histogram bins in v direction",
int(6));
44 addParam(
"saveExpertHistos", m_saveExpertHistos,
"if true save additional histograms",
bool(
false));
46 addParam(
"minSVDHits", m_minSVDHits,
"Number of SVD hits required in a track to be considered", 1u);
47 addParam(
"minCDCHits", m_minCDCHits,
"Number of CDC hits required in a track to be considered", 20u);
49 addParam(
"pValCut", m_pcut,
"Set a cut on the p-value ",
double(0));
53 addParam(
"momCut", m_momCut,
"Set a cut on the track momentum",
double(0));
54 addParam(
"ptCut", m_ptCut,
"Set a cut on the track transverse momentum",
double(1));
56 addParam(
"fiducialU", m_fiducialU,
"Fiducial Area, U direction",
float(0.5));
57 addParam(
"fiducialV", m_fiducialV,
"Fiducial Area, V direction",
float(0.5));
58 addParam(
"maxHalfResidU", m_maxResidU,
"half window for cluster search around intercept, U direction",
float(0.05));
59 addParam(
"maxHalfResidV", m_maxResidV,
"half window for cluster search around intercept, V direction",
float(0.05));
81 B2INFO(
"SVDClusters array is missing, no SVD efficiencies");
85 B2INFO(
"SVDIntercepts array is missing, no SVD efficiencies");
90 B2INFO(
"RecoTracks array is missing, no SVD efficiencies");
96 for (
int inter = 0 ; inter <
m_intercepts.getEntries(); inter++) {
101 B2DEBUG(10,
"this intercept is related to a good track");
107 int cellU = info.getUCellID(coorU);
108 int cellV = info.getVCellID(coorV);
127 if (clVxdID != theVxdID)
131 double interCoor = coorV;
132 double resid = interCoor -
m_svdClusters[cls]->getPosition();
140 if (resid < maxResid) {
147 if (foundU && foundV)
171 TDirectory* oldDir = gDirectory;
185 for (
VxdID& avxdid : sensors) {
190 TString buff = (std::string)avxdid;
191 buff.ReplaceAll(
".",
"_");
193 int nu = info.getUCells();
194 int nv = info.getVCells();
196 m_h_track_hits[avxdid] =
new TH2D(
"track_hits_" + buff,
"tracks through sensor " + buff,
198 m_h_matched_clusterU[avxdid] =
new TH2D(
"matched_clusterU_" + buff,
"track intersections with a matched U cluster" + buff,
200 m_h_matched_clusterV[avxdid] =
new TH2D(
"matched_clusterV_" + buff,
"track intersections with a matched V cluster" + buff,
214 if (theRC.
size() == 0)
219 if (!theRC[0]->wasFitSuccessful())
return false;
221 if (theRC[0]->getNumberOfSVDHits() <
m_minSVDHits)
return false;
223 if (theRC[0]->getNumberOfCDCHits() <
m_minCDCHits)
return false;
233 trackstate = theRC[0]->getMeasuredStateOnPlaneFromFirstHit();
234 if (trackstate.getMom().Mag() <
m_momCut)
return false;
236 if (trackstate.getMom().Perp() <
m_ptCut)
return false;
size_t size() const
Get number of relations.
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
Class to uniquely identify a any structure of the PXD and SVD.
#StateOnPlane with additional covariance matrix.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double m_ptCut
Cut on fitted track pt.
std::string m_svdClustersName
SVDClusters StoreArray name.
SVDSummaryPlots * m_MatchedHits
matched hits summary plot
std::string m_interceptsName
SVDIntercepts StoreArray name.
Base class to provide Sensor Information for PXD and SVD.
void fill(int layer, int ladder, int sensor, int view, float value)
fill the histogram for
float m_fiducialV
stay away from the U border by m_fiducialU (in cm)
bool m_saveExpertHistos
save additional histograms id set True
const std::vector< VxdID > getListOfSensors() const
Get list of all sensors.
std::map< VxdID, TH2D * > m_h_matched_clusterU
matched U-hits histogram map to sensorID
SVDSummaryPlots * m_TrackHits
track hits summary plot
double m_pcut
pValue-Cut for tracks
unsigned short baseType
The base integer type for VxdID.
virtual double getPVal() const
Get the p value of the fit.
Class for type safe access to objects that are referred to in relations.
Abstract base class for different kinds of events.
float m_maxResidU
max distance cut in cm U side
StoreArray< SVDCluster > m_svdClusters
SVDCluster StoreArray.
bool isGoodIntercept(SVDIntercept *inter)
returns true if the track related to the intercept passes the selection cuts
void initialize() override final
initializes the need store arrays, trees and histograms
void defineHisto() override final
actually defines the trees and histograms
int m_v_bins
number of V-bins for expert histogram
std::map< VxdID, TH2D * > m_h_track_hits
track hits histogram map to sensorID
bool isValid() const
Check wether the array was registered.
class to summarize SVD quantities per sensor and side
unsigned int m_minCDCHits
Required hits in CDC for tracks.
StoreArray< SVDIntercept > m_intercepts
SVDIntercept StoreArray.
float m_maxResidV
max distance cut in cm V side
StoreArray< RecoTrack > m_recoTracks
RecoTrack StoreArray.
VXD::GeoCache & m_geoCache
BelleII Geometry.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
std::map< VxdID, TH2D * > m_h_matched_clusterV
matched V-hits histogram map to sensorID
void event() override final
main function which fills trees and histograms
float m_fiducialU
stay away from the U border by m_fiducialU (in cm)
int m_u_bins
number of U-bins for expert histogram
Creates the basic histograms for SVD Efficiency DQM.
Class where important numbers and properties of a fit can be stored.
double m_momCut
Cut on fitted track momentum.
int getEntries() const
Get the number of objects in the array.
bool inside(double u, double v, double uTolerance=DBL_EPSILON, double vTolerance=DBL_EPSILON) const
Check wether a given point is inside the active area.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
unsigned int m_minSVDHits
Required hits in SVD strips for tracks.
std::string m_histogramDirectoryName
name of the directory where to store the histograms