9 #include <tracking/modules/pxdDataReduction/MCSlowPionPXDROICreatorModule.h>
10 #include <vxd/geometry/GeoCache.h>
11 #include <vxd/geometry/SensorInfoBase.h>
13 #include <pxd/dataobjects/PXDDigit.h>
14 #include <mdst/dataobjects/MCParticle.h>
15 #include <tracking/dataobjects/ROIid.h>
32 setDescription(
"Create artificial ROI just for PXDDigits from slow pions from D* decays based on MC information.");
40 "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"
69 if (not mcParticle.getMother() or
70 not(std::abs(mcParticle.getPDG()) == 211 and
71 std::abs(mcParticle.getMother()->getPDG()) == 413)) {
76 if (relatedPXDDigits.
size() == 0) {
83 for (
const PXDDigit& digit : relatedPXDDigits) {
84 const VxdID& sensor = digit.getSensorID();
87 if (sensor == lastSensor) {
91 const short uCell = digit.getUCellID();
92 const short vCell = digit.getVCellID();
100 m_ROIs.appendNew(
ROIid(minU, maxU, minV, maxV, sensor));
A Class to store the Monte Carlo particle information.
virtual void initialize() override
init the module
virtual void event() override
processes the event
virtual void endRun() override
end the run
uint m_ROICounter
Count the ROI that are created for debugging.
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.
MCSlowPionPXDROICreatorModule()
Constructor: Sets the description, the properties and the parameters of the module.
StoreArray< MCParticle > m_MCParticles
StoreArray for the MCParticles.
uint m_slowPiCounter
Count the slow pions in MC for debugging.
StoreArray< ROIid > m_ROIs
StoreArray for the ROIs.
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.
REG_MODULE(arichBtest)
Register the Module.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Abstract base class for different kinds of events.