11 #include <tracking/modules/svdROIFinder/SVDROIFinderModule.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/datastore/RelationArray.h>
14 #include <genfit/MaterialEffects.h>
31 setDescription(
"This module finds the ROI on the SVD planes");
32 setPropertyFlags(c_ParallelProcessingCertified);
35 addParam(
"recoTrackListName", m_recoTracksListName,
" name of the list of the fitted tracks", std::string(
""));
37 addParam(
"tolerancePhi", m_tolerancePhi,
"Tolerance by finding sensor in phi coordinate (radians).",
double(0.15));
39 addParam(
"toleranceZ", m_toleranceZ,
"Tolerance by finding sensor in Z coordinate (cm).",
double(0.5));
41 addParam(
"sigmaSystU", m_sigmaSystU,
" systematic sigma in the u local coordinate ",
double(0.025));
42 addParam(
"sigmaSystV", m_sigmaSystV,
" systematic sigma in the V local coordinate ",
double(0.025));
43 addParam(
"numSigmaTotU", m_numSigmaTotU,
" number of sigmas (total) in the U local coordinate ",
double(10));
44 addParam(
"numSigmaTotV", m_numSigmaTotV,
" number of sigmas (total) in the V local coordinate ",
double(10));
45 addParam(
"maxWidthU", m_maxWidthU,
" upper limit on width of the ROI in the U local coordinate (cm) ",
double(0.5));
46 addParam(
"maxWidthV", m_maxWidthV,
" upper limit on width of the ROI in the V local coordinate (cm) ",
double(0.5));
48 addParam(
"SVDInterceptListName", m_SVDInterceptListName,
"name of the list of interceptions", std::string(
""));
49 addParam(
"ROIListName", m_ROIListName,
"name of the list of ROIs", std::string(
""));
53 SVDROIFinderModule::~SVDROIFinderModule()
58 void SVDROIFinderModule::initialize()
60 m_recotracks.isOptional(m_recoTracksListName);
62 m_rois.registerInDataStore(m_ROIListName);
64 m_intercepts.registerInDataStore(m_SVDInterceptListName);
66 m_recotracks.registerRelationTo(m_intercepts);
67 m_intercepts.registerRelationTo(m_rois);
70 if (!genfit::MaterialEffects::getInstance()->isInitialized()) {
71 B2FATAL(
"Material effects not set up. Please use SetupGenfitExtrapolationModule.");
76 void SVDROIFinderModule::beginRun()
79 B2DEBUG(21,
"||| SVDROIFinder Parameters:");
80 B2DEBUG(21,
" tolerance: phi = " << m_tolerancePhi);
81 B2DEBUG(21,
" z = " << m_toleranceZ);
82 B2DEBUG(21,
" n sigma: u = " << m_numSigmaTotU);
83 B2DEBUG(21,
" v = " << m_numSigmaTotV);
84 B2DEBUG(21,
" systematic: u = " << m_sigmaSystU);
85 B2DEBUG(21,
" v = " << m_sigmaSystV);
86 B2DEBUG(21,
" max width: u = " << m_maxWidthU);
87 B2DEBUG(21,
" v = " << m_maxWidthV);
89 m_ROIinfo.sigmaSystU = m_sigmaSystU;
90 m_ROIinfo.sigmaSystV = m_sigmaSystV;
91 m_ROIinfo.numSigmaTotU = m_numSigmaTotU;
92 m_ROIinfo.numSigmaTotV = m_numSigmaTotV;
93 m_ROIinfo.maxWidthU = m_maxWidthU;
94 m_ROIinfo.maxWidthV = m_maxWidthV;
95 m_ROIinfo.PXDInterceptListName = m_SVDInterceptListName;
96 m_ROIinfo.ROIListName = m_ROIListName;
97 m_ROIinfo.recoTracksListName = m_recoTracksListName;
99 m_theSVDInterceptor =
new SVDInterceptor(&m_ROIinfo, m_toleranceZ, m_tolerancePhi);
106 void SVDROIFinderModule::event()
109 if (!m_recotracks.isValid()) {
110 B2DEBUG(21,
"RecoTracks array is missing, no SVD ROIs");
115 B2DEBUG(21,
"%%%%%%%% Number of RecoTracks in the events = " << m_recotracks.getEntries());
117 RelationArray recoTrackToSVDIntercepts(m_recotracks, m_intercepts);
118 recoTrackToSVDIntercepts.
create();
121 SVDInterceptsToROIids.
create();
123 m_theSVDInterceptor->fillInterceptList(&m_intercepts, m_recotracks, &recoTrackToSVDIntercepts);
125 m_theStripTranslator->fillRoiIDList(&m_intercepts, &m_rois);
130 void SVDROIFinderModule::endRun()
132 delete m_theStripTranslator;
133 delete m_theSVDInterceptor;
137 void SVDROIFinderModule::terminate()