11 #include <tracking/modules/pxdDataReduction/PXDROIFinderModule.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/datastore/RelationArray.h>
14 #include <genfit/MaterialEffects.h>
31 setDescription(
"This module performs the reduction of the PXD data output");
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(
"PXDInterceptListName", m_PXDInterceptListName,
"name of the list of interceptions", std::string(
""));
49 addParam(
"ROIListName", m_ROIListName,
"name of the list of ROIs", std::string(
""));
54 void PXDROIFinderModule::initialize()
59 ROIList.registerInDataStore(DataStore::c_ErrorIfAlreadyRegistered);
62 PXDInterceptList.registerInDataStore(DataStore::c_ErrorIfAlreadyRegistered);
68 if (!genfit::MaterialEffects::getInstance()->isInitialized()) {
69 B2FATAL(
"Material effects not set up. Please use SetupGenfitExtrapolationModule.");
74 void PXDROIFinderModule::beginRun()
77 B2DEBUG(1,
"||| PXDROIFinder Parameters:");
78 B2DEBUG(1,
" tolerance: phi = " << m_tolerancePhi);
79 B2DEBUG(1,
" z = " << m_toleranceZ);
80 B2DEBUG(1,
" n sigma: u = " << m_numSigmaTotU);
81 B2DEBUG(1,
" v = " << m_numSigmaTotV);
82 B2DEBUG(1,
" systematic: u = " << m_sigmaSystU);
83 B2DEBUG(1,
" v = " << m_sigmaSystV);
84 B2DEBUG(1,
" max width: u = " << m_maxWidthU);
85 B2DEBUG(1,
" 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_PXDInterceptListName;
94 m_ROIinfo.ROIListName = m_ROIListName;
95 m_ROIinfo.recoTracksListName = m_recoTracksListName;
97 m_thePXDInterceptor =
new PXDInterceptor(&m_ROIinfo, m_toleranceZ, m_tolerancePhi);
104 void PXDROIFinderModule::event()
112 B2DEBUG(1,
"%%%%%%%% Number of RecoTracks in the events = " << trackList.
getEntries());
114 RelationArray recoTrackToPXDIntercepts(trackList, PXDInterceptList);
115 recoTrackToPXDIntercepts.
create();
117 RelationArray PXDInterceptsToROIids(PXDInterceptList, ROIList);
118 PXDInterceptsToROIids.
create();
124 if (m_thePXDInterceptor) m_thePXDInterceptor->fillInterceptList(&PXDInterceptList, trackList, &recoTrackToPXDIntercepts);
128 if (m_thePixelTranslator) m_thePixelTranslator->fillRoiIDList(&PXDInterceptList, &ROIList);
135 void PXDROIFinderModule::endRun()
137 if (m_thePixelTranslator)
delete m_thePixelTranslator;
138 if (m_thePXDInterceptor)
delete m_thePXDInterceptor;