11#include <framework/core/Module.h>
12#include <framework/gearbox/Const.h>
13#include <framework/datastore/StoreArray.h>
15#include <reconstruction/dataobjects/VXDDedxTrack.h>
16#include <reconstruction/dataobjects/VXDDedxLikelihood.h>
17#include <reconstruction/dataobjects/DedxConstants.h>
19#include <mdst/dataobjects/Track.h>
20#include <mdst/dataobjects/MCParticle.h>
21#include <tracking/dataobjects/RecoTrack.h>
22#include <svd/dataobjects/SVDCluster.h>
23#include <pxd/dataobjects/PXDCluster.h>
25#include <framework/database/DBObjPtr.h>
26#include <svd/dbobjects/SVDdEdxPDFs.h>
27#include <pxd/dbobjects/PXDdEdxPDFs.h>
66 virtual void event()
override;
99 void calculateMeans(
double* mean,
double* truncatedMean,
double* truncatedMeanErr,
const std::vector<double>& dedx)
const;
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Class for accessing objects in the database.
Helper class representing a helical track.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Accessor to arrays stored in the data store.
Extract dE/dx from fitted tracks.
void saveSVDLogLikelihood(double(&logl)[Const::ChargedStable::c_SetSize], double p, float dedx) const
for all particles in the SVD, save log-likelihood values into 'logl'.
DBObjPtr< SVDdEdxPDFs > m_SVDDedxPDFs
SVD DB object for dedx:momentum PDFs.
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 hits 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.
void saveSiHits(VXDDedxTrack *track, const HelixHelper &helix, const std::vector< HitClass * > &hits) const
save energy loss and hit information from SVD/PXDHits to track
DBObjPtr< PXDdEdxPDFs > m_PXDDedxPDFs
PXD DB object for dedx:momentum PDFs.
void calculateMeans(double *mean, double *truncatedMean, double *truncatedMeanErr, const std::vector< double > &dedx) const
Save arithmetic and truncated mean for the 'dedx' values.
StoreArray< VXDDedxTrack > m_dedxTracks
Output array of VXDDedxTracks.
virtual ~VXDDedxPIDModule()
Destructor.
int m_eventID
counter for events
bool m_useSVD
use SVD hits for likelihood
bool detectorEnabled(Dedx::Detector d) const
should info from this detector be included in likelihood?
bool m_ignoreMissingParticles
Ignore particles for which no PDFs are found.
StoreArray< Track > m_tracks
Required array of Tracks.
bool m_onlyPrimaryParticles
Only save data for primary particles (as determined by MC truth)
StoreArray< PXDCluster > m_pxdClusters
Optional array of PXDClusters.
static double getTraversedLength(const PXDCluster *hit, const HelixHelper *helix)
returns traversed length through active medium of given PXDCluster.
StoreArray< RecoTrack > m_recoTracks
Required array of input RecoTracks.
bool m_useIndividualHits
Include PDF value for each hit in likelihood.
VXDDedxPIDModule()
Default constructor.
double m_trackDistanceThreshhold
Use a faster helix parametrisation, with corrections as soon as the approximation is more than ....
void savePXDLogLikelihood(double(&logl)[Const::ChargedStable::c_SetSize], double p, float dedx) const
for all particles in the PXD, save log-likelihood values into 'logl'.
Debug output for VXDDedxPID module.
Abstract base class for different kinds of events.