9 #include <tracking/modules/pxdDataReduction/PXDROIFinderModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <framework/datastore/RelationArray.h>
12 #include <genfit/MaterialEffects.h>
29 setDescription(
"This module performs the reduction of the PXD data output");
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(
"PXDInterceptListName", m_PXDInterceptListName,
"name of the list of interceptions", std::string(
""));
47 addParam(
"ROIListName", m_ROIListName,
"name of the list of ROIs", std::string(
""));
52 void PXDROIFinderModule::initialize()
66 if (!genfit::MaterialEffects::getInstance()->isInitialized()) {
67 B2FATAL(
"Material effects not set up. Please use SetupGenfitExtrapolationModule.");
72 void PXDROIFinderModule::beginRun()
75 B2DEBUG(1,
"||| PXDROIFinder Parameters:");
76 B2DEBUG(1,
" tolerance: phi = " << m_tolerancePhi);
77 B2DEBUG(1,
" z = " << m_toleranceZ);
78 B2DEBUG(1,
" n sigma: u = " << m_numSigmaTotU);
79 B2DEBUG(1,
" v = " << m_numSigmaTotV);
80 B2DEBUG(1,
" systematic: u = " << m_sigmaSystU);
81 B2DEBUG(1,
" v = " << m_sigmaSystV);
82 B2DEBUG(1,
" max width: u = " << m_maxWidthU);
83 B2DEBUG(1,
" v = " << m_maxWidthV);
85 m_ROIinfo.sigmaSystU = m_sigmaSystU;
86 m_ROIinfo.sigmaSystV = m_sigmaSystV;
87 m_ROIinfo.numSigmaTotU = m_numSigmaTotU;
88 m_ROIinfo.numSigmaTotV = m_numSigmaTotV;
89 m_ROIinfo.maxWidthU = m_maxWidthU;
90 m_ROIinfo.maxWidthV = m_maxWidthV;
91 m_ROIinfo.PXDInterceptListName = m_PXDInterceptListName;
92 m_ROIinfo.ROIListName = m_ROIListName;
93 m_ROIinfo.recoTracksListName = m_recoTracksListName;
95 m_thePXDInterceptor =
new PXDInterceptor(&m_ROIinfo, m_toleranceZ, m_tolerancePhi);
102 void PXDROIFinderModule::event()
110 B2DEBUG(1,
"%%%%%%%% Number of RecoTracks in the events = " << trackList.
getEntries());
112 RelationArray recoTrackToPXDIntercepts(trackList, PXDInterceptList);
113 recoTrackToPXDIntercepts.
create();
115 RelationArray PXDInterceptsToROIids(PXDInterceptList, ROIList);
116 PXDInterceptsToROIids.
create();
122 if (m_thePXDInterceptor) m_thePXDInterceptor->fillInterceptList(&PXDInterceptList, trackList, &recoTrackToPXDIntercepts);
126 if (m_thePixelTranslator) m_thePixelTranslator->fillRoiIDList(&PXDInterceptList, &ROIList);
133 void PXDROIFinderModule::endRun()
135 if (m_thePixelTranslator)
delete m_thePixelTranslator;
136 if (m_thePXDInterceptor)
delete m_thePXDInterceptor;
The PXDInterceptor class fills a StoreArray of PXDIntercepts that will be used to define the PXD ROIs...
The PXD ROI Finder Module.
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.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.