11#include <framework/core/Module.h>
12#include <framework/gearbox/Const.h>
13#include <framework/datastore/StoreArray.h>
15#include <reconstruction/dataobjects/DedxConstants.h>
17#include <framework/database/DBObjPtr.h>
65 virtual void event()
override;
82 void calculateMeans(
double& mean,
double& truncatedMean,
double& truncatedMeanErr,
const std::vector<double>& dedx)
const;
Class for accessing objects in the database.
Helper class representing a helical track.
A Class to store the Monte Carlo particle information.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Specialized class for holding the PXD dE/dx PDFs.
This is the Reconstruction Event-Data Model Track.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Specialized class for holding the SVD dE/dx PDFs.
Accessor to arrays stored in the data store.
Class that bundles various TrackFitResults.
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
DBObjPtr< SVDdEdxPDFs > m_SVDDedxPDFs
SVD DB object for dedx vs.
void calculateMeans(double &mean, double &truncatedMean, double &truncatedMeanErr, const std::vector< double > &dedx) const
Save arithmetic and truncated mean for the 'dedx' values.
int m_trackID
counter for tracks in this event
virtual void initialize() override
Initialize the module.
StoreArray< SVDCluster > m_svdClusters
Optional array of SVDClusters.
bool m_usePXD
use PXD data for likelihood
virtual void event() override
This method is called for each event.
StoreArray< MCParticle > m_mcparticles
Optional array of MCParticles.
StoreArray< VXDDedxLikelihood > m_dedxLikelihoods
Output array of VXDDedxLikelihoods.
void checkPDFs()
Check the pdfs for consistency every time they change in the database.
virtual void terminate() override
End of the event processing.
DBObjPtr< PXDdEdxPDFs > m_PXDDedxPDFs
PXD DB object for dedx vs.
StoreArray< VXDDedxTrack > m_dedxTracks
Output array of VXDDedxTracks.
virtual ~VXDDedxPIDModule()
Destructor.
int m_eventID
counter for events
bool m_useSVD
use SVD data for likelihood
void saveSiHits(VXDDedxTrack *track, const std::vector< HitClass * > &hits, const RecoTrack *recoTrack) const
save energy loss and hit information from SVD/PXDHits to track
StoreArray< Track > m_tracks
Required array of Tracks.
bool m_onlyPrimaryParticles
For MC only: if true, only save data for primary particles (as determined by MC truth)
static double getTraversedLength(const HitClass *hit, const RecoTrack *recoTrack, double &p)
returns traversed length through active medium of given hit
StoreArray< PXDCluster > m_pxdClusters
Optional array of PXDClusters.
StoreArray< RecoTrack > m_recoTracks
Required array of RecoTracks.
bool m_useIndividualHits
use individual hits (true) or truncated mean (false) to determine likelihoods
VXDDedxPIDModule()
Default constructor.
Debug output for VXDDedxPID module.
Abstract base class for different kinds of events.