9 #include <tracking/modules/pxdDataReduction/ROIGeneratorModule.h>
10 #include <framework/datastore/StoreObjPtr.h>
11 #include <framework/dataobjects/EventMetaData.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <tracking/dataobjects/ROIid.h>
31 setDescription(
"This module is used to generate a certain number of ROIs");
32 setPropertyFlags(c_ParallelProcessingCertified);
34 addParam(
"ROIListName", m_ROIListName,
"name of the list of ROIs", std::string(
""));
35 addParam(
"nROIs", m_nROIs,
"number of generated ROIs", 1);
37 addParam(
"TrigDivider", m_divider,
"Generates one ROI every TrigDivider events", 2);
38 addParam(
"Layer" , m_layer ,
"on layer", 1);
39 addParam(
"Ladder" , m_ladder ,
" ladder " , 1);
40 addParam(
"Sensor" , m_sensor ,
" sensor " , 1);
42 addParam(
"MinU" , m_minU ,
" min U (pixel column hopefully) ", 0);
43 addParam(
"MaxU" , m_maxU ,
" max U (pixel column hopefully) ", 250 - 1);
46 addParam(
"MinV" , m_minV ,
" min V (pixel column hopefully) ", 0);
47 addParam(
"MaxV" , m_maxV ,
" max v (pixel column hopefully) ", 768 - 1);
49 addParam(
"Random" , m_random ,
"dont use fix position, move pseudo randomly",
false);
52 void ROIGeneratorModule::initialize()
61 void ROIGeneratorModule::event()
67 int tNr = eventMetaDataPtr->getEvent();
70 if (m_divider != 0 && (tNr % m_divider) != 0)
83 int minU = m_minU, maxU = m_maxU, minV = m_minV, maxV = m_maxV;
86 if (m_nROIs == 1 && m_random) {
145 int dU = (m_maxU - m_minU) / (m_nROIs + 1);
146 int dV = (m_maxV - m_minV) / (m_nROIs + 1);
147 for (
int iROI = 1; iROI < m_nROIs; iROI++) {
149 minU = m_minU + dU * iROI;
151 minV = m_minV + dV * iROI;
The ROI generator Module.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
void setMaxUid(double user_maxUid)
set the maximum U id of the ROI
void setSensorID(VxdID user_sensorID)
set the sensor ID of the ROI
void setMinUid(double user_minUid)
set the minimum U id of the ROI
void setMaxVid(double user_maxVid)
set the maximum V id of the ROI
void setMinVid(double user_minVid)
set the minimum V id of the ROI
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
Type-safe access to single objects in the data store.
Class to uniquely identify a any structure of the PXD and SVD.
void setSensorNumber(baseType sensor)
Set the sensor id.
void setLadderNumber(baseType ladder)
Set the ladder id.
void setLayerNumber(baseType layer)
Set the layer id.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.