Belle II Software development
VXDDedxPIDModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/core/Module.h>
12#include <framework/gearbox/Const.h>
13#include <framework/datastore/StoreArray.h>
14
15#include <reconstruction/dataobjects/DedxConstants.h>
16
17#include <framework/database/DBObjPtr.h>
18
19#include <vector>
20
21
22namespace Belle2 {
27 class HelixHelper;
28 class Track;
29 class RecoTrack;
30 class MCParticle;
31 class SVDCluster;
32 class PXDCluster;
33 class VXDDedxTrack;
35 class SVDdEdxPDFs;
36 class PXDdEdxPDFs;
37
51 class VXDDedxPIDModule : public Module {
52
53 public:
54
57
59 virtual ~VXDDedxPIDModule();
60
62 virtual void initialize() override;
63
65 virtual void event() override;
66
68 virtual void terminate() override;
69
70 private:
71
73 void checkPDFs();
74
82 void calculateMeans(double& mean, double& truncatedMean, double& truncatedMeanErr, const std::vector<double>& dedx) const;
83
85 template <class HitClass> static double getTraversedLength(const HitClass* hit, const RecoTrack* recoTrack, double& p);
86
88 template <class HitClass> void saveSiHits(VXDDedxTrack* track, const std::vector<HitClass*>& hits,
89 const RecoTrack* recoTrack) const;
90
91 // module steering parameters
93 bool m_usePXD;
94 bool m_useSVD;
96
97 // required input
100
101 // optional input
105
106 // output
109
110 // PDF's for PID
113
114 // other
117
118 };
119
120} // Belle2 namespace
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Helper class representing a helical track.
Definition HelixHelper.h:28
A Class to store the Monte Carlo particle information.
Definition MCParticle.h:32
Module()
Constructor.
Definition Module.cc:30
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition PXDCluster.h:30
Specialized class for holding the PXD dE/dx PDFs.
Definition PXDdEdxPDFs.h:26
This is the Reconstruction Event-Data Model Track.
Definition RecoTrack.h:79
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition SVDCluster.h:29
Specialized class for holding the SVD dE/dx PDFs.
Definition SVDdEdxPDFs.h:26
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Class that bundles various TrackFitResults.
Definition Track.h:25
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.