9#include <tracking/modules/roiFinding/pxd/MCPXDROICreatorModule.h>
10#include <vxd/geometry/GeoCache.h>
11#include <vxd/geometry/SensorInfoBase.h>
12#include <pxd/dataobjects/PXDDigit.h>
13#include <mdst/dataobjects/MCParticle.h>
14#include <tracking/dataobjects/ROIid.h>
30 setDescription(
"Create artificial ROI just for PXDDigits from all charged primary MCParticles or just slow pions from D* decays based on MC information.");
38 "Size of the ROIs. Set to a rather large value to only create on ROI per sensor instead of one ROI per PXDDigit.",
51 B2DEBUG(29,
"StoreArray names in use: \n"
70 not(std::abs(mcParticle.getCharge()) > 0 and mcParticle.isPrimaryParticle())) {
76 (not mcParticle.getMother() or
77 not(std::abs(mcParticle.getPDG()) == 211 and
78 std::abs(mcParticle.getMother()->getPDG()) == 413))) {
83 if (relatedPXDDigits.
size() == 0) {
88 for (
const PXDDigit& digit : relatedPXDDigits) {
89 const VxdID& sensor = digit.getSensorID();
92 if (sensor == lastSensor) {
96 const short uCell = digit.getUCellID();
97 const short vCell = digit.getVCellID();
105 m_ROIs.appendNew(
ROIid(minU, maxU, minV, maxV, sensor));
MCPXDROICreatorModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void initialize() override
init the module
bool m_createROIForAll
Create ROI for all chargedstable MCParticles.
virtual void event() override
processes the event
std::string m_pxdDigitsName
PXDDigits StoreArray name.
std::string m_MCParticlesName
MCParticles StoreArray name.
std::string m_ROIsName
ROI StoreArray name.
StoreArray< PXDDigit > m_PXDDigits
StoreArray for the PXDDigits.
bool m_createROIForSlowPionsOnly
Create ROI only for slow pions.
StoreArray< MCParticle > m_MCParticles
StoreArray for the MCParticles.
StoreArray< ROIid > m_ROIs
StoreArray for the ROIs.
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
Class to uniquely identify a any structure of the PXD and SVD.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.