10#include <arich/modules/arichMCParticles/ARICHMCParticlesModule.h>
13#include <framework/datastore/DataStore.h>
16#include <framework/gearbox/Const.h>
17#include <framework/logging/Logger.h>
19#include <mdst/dataobjects/Track.h>
20#include <tracking/dataobjects/ExtHit.h>
21#include <mdst/dataobjects/MCParticle.h>
42 setDescription(
"Creates collection of MCParticles related to tracks that hit ARICH.");
68 const int pdgCode = abs(particleHypothesis.
getPDGCode());
70 for (
int itrk = 0; itrk <
m_tracks.getEntries(); ++itrk) {
73 const TrackFitResult* fitResult = track->getTrackFitResultWithClosestMass(particleHypothesis);
75 B2ERROR(
"No TrackFitResult for " << particleHypothesis.
getPDGCode());
80 if (!particle)
continue;
84 for (
unsigned i = 0; i < extHits.
size(); i++) {
85 const ExtHit* extHit = extHits[i];
93 track->addRelationTo(arichP);
StoreArray< MCParticle > m_arichMCPs
Required input array of MCParticles.
StoreArray< Track > m_tracks
Required input array of Tracks.
StoreArray< ExtHit > m_extHits
Required input array of ExtHits.
Provides a type-safe way to pass members of the chargedStableSet set.
int getPDGCode() const
PDG code.
EDetector
Enum for identifying the detector components (detector and subdetector).
static const ChargedStable pion
charged pion particle
Store one Ext hit as a ROOT object.
int getPdgCode() const
Get PDG code of this extrapolation's hypothesis.
ExtHitStatus getStatus() const
Get state of extrapolation at this hit.
int getCopyID() const
Get detector-element ID of sensitive element within detector.
Const::EDetector getDetectorID() const
Get detector ID of this extrapolation hit.
ROOT::Math::XYZVector getMomentum() const
Get momentum at this extrapolation hit.
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...
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
ARICHMCParticlesModule()
Constructor.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual ~ARICHMCParticlesModule()
Destructor.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.