10#include <arich/modules/arichRelate/ARICHRelateModule.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>
22#include <arich/dataobjects/ARICHAeroHit.h>
43 setDescription(
"Creates relations between ARICHAeroHits and ExtHits. Allows to store simulation output without MCParticles");
63 B2DEBUG(50,
"No. of hits " << nHits);
66 const MCParticle* particle = DataStore::getRelated<MCParticle>(&aeroHit);
68 B2DEBUG(50,
"No MCParticle for AeroHit!");
73 const Track* track = DataStore::getRelated<Track>(particle);
77 if (!fitResult)
continue;
81 for (
const ExtHit& extHit : extHits) {
83 extHit.getDetectorID() != arich or
84 extHit.getCopyID() != 6789 or
85 extHit.getStatus() != EXT_EXIT)
continue;
86 extHit.addRelationTo(&aeroHit);
Datastore class that holds information on track parameters at the entrance in aerogel.
StoreArray< ARICHAeroHit > m_aeroHits
Required array of input ARICHAeroHits.
StoreArray< Track > m_mdstTracks
Required array of input Tracks.
StoreArray< ExtHit > m_extHits
Required array of input ExtHits.
StoreArray< MCParticle > m_mcParticles
Required array of input MCParticles.
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.
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.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
ARICHRelateModule()
Constructor.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.