9 #include <tracking/modules/svdROIFinder/SVDROIFinderModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <framework/datastore/RelationArray.h>
12 #include <genfit/MaterialEffects.h>
29 setDescription(
"This module finds the ROI on the SVD planes");
30 setPropertyFlags(c_ParallelProcessingCertified);
33 addParam(
"recoTrackListName", m_recoTracksListName,
" name of the list of the fitted tracks", std::string(
""));
35 addParam(
"tolerancePhi", m_tolerancePhi,
"Tolerance by finding sensor in phi coordinate (radians).",
double(0.15));
37 addParam(
"toleranceZ", m_toleranceZ,
"Tolerance by finding sensor in Z coordinate (cm).",
double(0.5));
39 addParam(
"sigmaSystU", m_sigmaSystU,
" systematic sigma in the u local coordinate ",
double(0.025));
40 addParam(
"sigmaSystV", m_sigmaSystV,
" systematic sigma in the V local coordinate ",
double(0.025));
41 addParam(
"numSigmaTotU", m_numSigmaTotU,
" number of sigmas (total) in the U local coordinate ",
double(10));
42 addParam(
"numSigmaTotV", m_numSigmaTotV,
" number of sigmas (total) in the V local coordinate ",
double(10));
43 addParam(
"maxWidthU", m_maxWidthU,
" upper limit on width of the ROI in the U local coordinate (cm) ",
double(0.5));
44 addParam(
"maxWidthV", m_maxWidthV,
" upper limit on width of the ROI in the V local coordinate (cm) ",
double(0.5));
46 addParam(
"SVDInterceptListName", m_SVDInterceptListName,
"name of the list of interceptions", std::string(
""));
47 addParam(
"ROIListName", m_ROIListName,
"name of the list of ROIs", std::string(
""));
51 SVDROIFinderModule::~SVDROIFinderModule()
56 void SVDROIFinderModule::initialize()
58 m_recotracks.isOptional(m_recoTracksListName);
60 m_rois.registerInDataStore(m_ROIListName);
62 m_intercepts.registerInDataStore(m_SVDInterceptListName);
64 m_recotracks.registerRelationTo(m_intercepts);
65 m_intercepts.registerRelationTo(m_rois);
68 if (!genfit::MaterialEffects::getInstance()->isInitialized()) {
69 B2FATAL(
"Material effects not set up. Please use SetupGenfitExtrapolationModule.");
74 void SVDROIFinderModule::beginRun()
77 B2DEBUG(21,
"||| SVDROIFinder Parameters:");
78 B2DEBUG(21,
" tolerance: phi = " << m_tolerancePhi);
79 B2DEBUG(21,
" z = " << m_toleranceZ);
80 B2DEBUG(21,
" n sigma: u = " << m_numSigmaTotU);
81 B2DEBUG(21,
" v = " << m_numSigmaTotV);
82 B2DEBUG(21,
" systematic: u = " << m_sigmaSystU);
83 B2DEBUG(21,
" v = " << m_sigmaSystV);
84 B2DEBUG(21,
" max width: u = " << m_maxWidthU);
85 B2DEBUG(21,
" v = " << m_maxWidthV);
87 m_ROIinfo.sigmaSystU = m_sigmaSystU;
88 m_ROIinfo.sigmaSystV = m_sigmaSystV;
89 m_ROIinfo.numSigmaTotU = m_numSigmaTotU;
90 m_ROIinfo.numSigmaTotV = m_numSigmaTotV;
91 m_ROIinfo.maxWidthU = m_maxWidthU;
92 m_ROIinfo.maxWidthV = m_maxWidthV;
93 m_ROIinfo.PXDInterceptListName = m_SVDInterceptListName;
94 m_ROIinfo.ROIListName = m_ROIListName;
95 m_ROIinfo.recoTracksListName = m_recoTracksListName;
97 m_theSVDInterceptor =
new SVDInterceptor(&m_ROIinfo, m_toleranceZ, m_tolerancePhi);
104 void SVDROIFinderModule::event()
107 if (!m_recotracks.isValid()) {
108 B2DEBUG(21,
"RecoTracks array is missing, no SVD ROIs");
113 B2DEBUG(21,
"%%%%%%%% Number of RecoTracks in the events = " << m_recotracks.getEntries());
115 RelationArray recoTrackToSVDIntercepts(m_recotracks, m_intercepts);
116 recoTrackToSVDIntercepts.
create();
119 SVDInterceptsToROIids.
create();
121 m_theSVDInterceptor->fillInterceptList(&m_intercepts, m_recotracks, &recoTrackToSVDIntercepts);
123 m_theStripTranslator->fillRoiIDList(&m_intercepts, &m_rois);
128 void SVDROIFinderModule::endRun()
130 delete m_theStripTranslator;
131 delete m_theSVDInterceptor;
135 void SVDROIFinderModule::terminate()
Translator for ROI-geometry-information into a list of pixels.
Low-level class to create/modify relations between StoreArrays.
bool create(bool replace=false)
Create an empty relation array in the data store.
This Class implements the interceptor of the SVD tracks on the PXD layers.
The SVD ROI Finder Module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.